Child message not handled

I am new to API programming and I created standard window: registered WNDCLASSEX and wrote procedure WindowProcedure for message processing, then created window (that is child to desktop) with hwnd handlename.

I added groupbox with group handlename as child window to hwnd and then added button with search handlename as child of group.

IN WindowProcedure I wrote processing for WM_COMMAND message but it does nothing when I click to search.

I tought of mistake in WindowProcedure code and then added one button that is directly child of hwnd and when I click to that button I get what I want (I mean part of code that is responsible for WM_COMMAND responds to clicking on this button).

I tried to add BS_NOTIFY style to search but it did not help? Can anyone give suggestion about this problem that is most probably caused by these child-nesting sequence hwnd->group->search
The way to do this is to subclass the group box.
Is there any other way like "telling" groupbox children to send messages to WindowProcedure?
Before I replied I did some searching and found no other way.
Thank you very much webJose Do you have any useful link,except those at msdn for that topic.
Note that groupboxes are normally (i.e. when used in dialogs) the siblings of the buttons, static controls, edit controls, etc. they contain, rather than the parent. Hence the dozy behaviour.

Andy
Last edited on
Tkank you very much for help. I solved problem but I still don't understand code at link posted by webJose but it doesn't matter now. I am sure that I will after some time.
Topic archived. No new replies allowed.