• Advertisement
Sign in to follow this  

Win32 controls inside a groupbox

This topic is 4824 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a MDI child form with a groupbox control inside, inside the groupbox is a standard button. How do i handle the button click event for this button? Using WM_COMMAND as normal doesnt seem to work and im guessing its because the buttons a child of the groupbox and not of the mdi child window. How do i do this? Thanks

Share this post


Link to post
Share on other sites
Advertisement
You can set the owner of the button to the dialog where you want to process WM_COMMAND. It should get sent there then.

I'm not sure, but i think PreTranslateMessage might also catch that one.

Share this post


Link to post
Share on other sites
How do you set the parent to be the Groupbox and the owner to be the mdi child?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
group boxes are just another type of button and should never be the parent or the owner of other controls that are considered to be on the same level as them. just make the MDI child window the parent and owner of the group box when it's created, just like the rest of the controls.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement