Jump to content
  • Advertisement
Sign in to follow this  
Tjaalie

Child to Parent???

This topic is 4839 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

Hi to all, I'm creating a editor for my engine but now i have an problem. My controls are all put in static controls as childs, now my problem is when a user clicks a button (wich is a child of an static control) the main window (the parent of the static control) doesn't get an WM_COMMAND message, so i wanted to ask is there a way to get the static control pass his messages to the main window??? I hope you understand my problem. Tjaalie,

Share this post


Link to post
Share on other sites
Advertisement
From MSDN:

"A static control normally takes no input and provides no output; however, it can notify its parent of mouse clicks if it's created with SS_NOTIFY style."

Share this post


Link to post
Share on other sites
But thats not what i want i want it to send the messages it gets from controls
inside this one to the main window not to tell it got an mouse click.

Share this post


Link to post
Share on other sites
Quote:
Original post by Tjaalie
Nobody???


If you want a chatroom, get on: irc://irc.afternet.org#GameDev

This isn't one, so there's no need to wet your underwear if you don't get an immediate reply.

Share this post


Link to post
Share on other sites
Well, for starters, I don't think you really want your buttons to be children of static controls. But, I think to work around it you could subclass the static control and then just SendMessage whatever messages you want to the parent.

tj963

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!