-
Window not showing
for some reason another window isnt showing in my program..hwnd shows but hwnd2 doesnt..
Code:
hwnd = CreateWindowEx(0, szClassName, _T("Test") ,
WS_OVERLAPPED | WS_MINIMIZEBOX | WS_SYSMENU, CW_USEDEFAULT, CW_USEDEFAULT,
425, 350, HWND_DESKTOP, NULL,
hThisInstance, NULL);
this is the main window...also the program is unicode
Code:
hwnd2 = CreateWindow(
szClassName,
_T("test") ,
WS_OVERLAPPED | WS_MINIMIZEBOX | WS_SYSMENU,
CW_USEDEFAULT, CW_USEDEFAULT,
425, 350,
hwnd, NULL,
hThisInstance, NULL);
thats the window im trying to get to show.
Code:
ShowWindow(hwnd , SW_SHOW);
ShowWindow(hwnd2 , SW_SHOW);
UpdateWindow(hwnd);
UpdateWindow(hwnd2);
it seems all perfect but wont show
-
Since both windows are top level windows, try passing NULL as the parentHwnd argument to both calls.
-
-
Are you sure they are not just overlapping? The styles you are using do not have a title bar or sizing border. Try adding WS_CAPTION.
-
-
If the return value from CreateWindow or CreateWindowEx is NULL then you can use GetLastError to get more information about that error.
-
i have and the window creates fine
-
I can't replicate the problem with the information you have supplied so all I can suggest is that you create a very minimal, compilable example and see if that gives you the same results. If it does then post/attach that code so we can take a look at it.