a couple weeks back, peter was trying to create a window from a dialog. i'm using plain api and i followed ken's advice of CreateWindow(Ex). the window gets created but it won't show. i've tried calling ShowWindow but to no avail. any suggestions.
a couple weeks back, peter was trying to create a window from a dialog. i'm using plain api and i followed ken's advice of CreateWindow(Ex). the window gets created but it won't show. i've tried calling ShowWindow but to no avail. any suggestions.
assuming the last arguement to winmain is iCmdShow and your HWND is hwnd then after creating the window you need to do this :-
ShowWindow(hwnd,iCmdShow);
UpdateWindow(hwnd);
That will cause your window to be shown on the screen and painted. You will need to take care of the WM_PAINT message in your window procedure.....
If that doesn't work then post your code for more help.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi