CreateWindowEx with WS_POPUP crashs.

  • Thread starter Thread starter Jan Schukat
  • Start date Start date
J

Jan Schukat

It s just a Windows application with a WinMain function, an own
registered Window Class and a CreateWindowEx call, no mfc and other
gimmicks.
I made several applications with a the main window being a WS_POPUP
window before, always worked fine. This one is a little more
complicated, but it is still the only window of the application. It is
no WS_CHILD. The application works with every other style. But whenever
I call CreateWindowEx with an WS_POPUP style it horribly crashs.
CreateWindowEx doesn't even return, it just crashs. So my question is,
under which circumstances can this happen? Too bad I have no sources of
CreateWindowEx ;)

Jan
 
Jan said:
It s just a Windows application with a WinMain function, an own
registered Window Class and a CreateWindowEx call, no mfc and other
gimmicks.
I made several applications with a the main window being a WS_POPUP
window before, always worked fine. This one is a little more
complicated, but it is still the only window of the application. It is
no WS_CHILD. The application works with every other style. But whenever
I call CreateWindowEx with an WS_POPUP style it horribly crashs.
CreateWindowEx doesn't even return, it just crashs. So my question is,
under which circumstances can this happen? Too bad I have no sources of
CreateWindowEx ;)

Jan

Post the source to your WindowProc. You are probably doing something wrong in
your WM_CREATE.
 
Julie said:
Post the source to your WindowProc. You are probably doing something wrong in
your WM_CREATE.

Or you are using the wrong calling convention for your WindowProc.
 
Julie said:
Post the source to your WindowProc. You are probably doing something wrong in
your WM_CREATE.


Or you are using the wrong calling convention for your WindowProc.

I am able to change the style to popup after the window was created, so
I'm able to get what I want. Yet, it's interesting to know what makes it
crash when I try to create it with WS_POPUP.

My WndProc doesn't handle WM_CREATE, and it works fine with all other
messages once the window is created.

Thanks

Jan
 
Back
Top