470,591 Members | 1,531 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,591 developers. It's quick & easy.

CreateWindowEx with WS_POPUP crashs.

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

Nov 17 '05 #1
3 4715
Jan Schukat wrote:

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.
Nov 17 '05 #2
Julie wrote:

Jan Schukat wrote:

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.


Or you are using the wrong calling convention for your WindowProc.
Nov 17 '05 #3
Julie wrote:
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

Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Torsten Bronger | last post: by
1 post views Thread by Patrick Blackman | last post: by
2 posts views Thread by Patrick Blackman | last post: by
1 post views Thread by Peter Row | last post: by
2 posts views Thread by Tony | last post: by
2 posts views Thread by Marcus Schaefer | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.