Skip to main content
gamedev.net
🔒 Locked

ShowWindow error

Started by diablo Aug 26, 2000 at 8:41 AM 0 replies 850+ views
Original Post
diablo
diablo
I have made a little DirectDraw program, but when I run it, the ShowWindow function goes wrong. In the code I don''t see any error: if (!ShowWindow(hWnd, SW_SHOW)) MessageBox(hWnd, "Error showing window", "ERROR!", MB_OK); for some reason, it goes wrong. I can''t just leave the showwindow out, because then the program exists before the DirectDraw initialization stuff. Can anyone help me out Thanks Diablo
freeman_swe
freeman_swe
Hi

You only need
ShowWindow(hWnd, SW_SHOW);
take away the if statement

you see the result of ShowWindow is (from whe win32.hlp)

If the window was previously visible, the return value is nonzero.
If the window was previously hidden, the return value is zero.

/ Micke

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.