-
view window
my computer seems to have a problem where it compiles ain api code without any errors and then can't view the window. Even on some of my old prodjects thay don't work. I use Dev c++.
I have realised that it is only when i use windclass. winclassex works fine.
Thanks in advance
-
Are you checking the return values of the API calls to make sure there are not errors? Are you showing the windows with SW_SHOW?
-
-
Code:
ShowWindow(hwnd,SW_SHOW);
-
When you start the WinMain you define an integer, specifically int iCmdShow. You can call it different things but you can use that variable to show your window also. If you just want it visible that's how I do it, if I want it transparent or whatever I use those SW values. The iCmdShow integer is defined like this, in case you don't know what variable I am talking about.
Code:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCe hPrevInstance,PSTR szCmdLine,int iCmdShow)
{
Then just use the ShowWindow function like this:
Code:
ShowWindow(hwnd,iCmdShow);
UpdateWindow(hwnd);
Note: Depending on the purpose of your program you may or may not want to include UpdateWindow. Usually you do but just in case you might not.
-