Ok, I am totally aware this is probably a lame question. The fact is that I have been working on this for so long that I can find an answer anymore. Iīm getting (even more) retarded.
My question is simple:
Why canīt an Edit Control created at WM_CREATE using CreateWindowEx and a Edit Control created at a resource file have the exact same appearance? The one created in the resource file has that "3D style" no matter how much I play with itīs styles, I canīt get rid of it and make it "Flat" like the one created at WM_CREATE.
The same thing happens with ListBoxes, and Static controls.
Hereīs an example using a listbox:
Code:
//This is in my WNDPROC at WM_CREATE:
textdebug = CreateWindowEx (0, TEXT ("listbox"), TEXT("test"),
WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | LBS_NOINTEGRALHEIGHT | LBS_NOSEL |
LBS_DISABLENOSCROLL, 15, 252, 333, 104, mainWindow, (HMENU) 1201, hInstance, NULL) ;
//This is in dialogs.rc
ID_STATUSDLG DIALOG DISCARDABLE 1, 12, 237, 223
//EXSTYLE I have tried all possible styles here
STYLE WS_CHILD /*I have tried all possible styles here*/
FONT 1, "MS Sans Serif"
BEGIN
LISTBOX "test", IDC_TEXTDEBUG, 5, 141, 223, 64, WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL |
LBS_NOINTEGRALHEIGHT | LBS_NOSEL | LBS_DISABLENOSCROLL
END
If you add this example above to a sample program youīll see what I am talking about. Besides the normal difference in metrics, thereīs that 3D border around the control created into the resource file. I need to get rid of that.
Any help will be great, thanks