Archived

This topic is now archived and is closed to further replies.

Drastick

Child Window

Recommended Posts

I can''t get this child window to run its defined WndProc. Also when I close the child window the parent(main) window processes the message and quits the program. Does anyone have a dead simple example of a windows app that just has a main window with a child who can process its own messages and will close when you hit close, but not quit the app?

Share this post


Link to post
Share on other sites
you need to spank it if it is a bad child. j/k

make sure in your WM_CLOSE of your child winproc, you are destroying the child''s hwnd and not the parent (global?) hwnd..

I fseek, therefore I fam.

Share this post


Link to post
Share on other sites
right, but like I said the childs proc that handles the messages is not getting run at all! Where and how are you telling it to handle the messages and how do you keep its messages from interfearing with the messages from the main frame

Share this post


Link to post
Share on other sites
you will need to register the child window also.. when you CreateEx() your child window, make sure you have WS_CHILD in with your other window styles.

let''s see your code, it would probably help out a great deal to help you debug..

I fseek, therefore I fam.

Share this post


Link to post
Share on other sites
Yeah post your code that'll help...You only need to register and create the window with its own window procedure that way you can handle the messages...

[edited by - FtMonkey on October 9, 2003 6:22:54 PM]

Share this post


Link to post
Share on other sites