Jump to content
  • Advertisement
Sign in to follow this  
Lord Maz

Win32: Child controls

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

Heya people, I'm having some trouble with my controls. I have a window which owns a tab window. The tab window, in turn, owns a button. The problem is that I'm trying to redraw the button manually, but I can't catch the redraw message when the button has the tab window as parent. It works fine when use the main window instead - but I'd rather have the tab window as parent; don't know what will happend on other windows platforms if I don't get the child hierarchy right. Anyone have any idea how I'm supposed to make the tabwindow route the button messages to the main window? I'm using c++ and the win32 api only.

Share this post


Link to post
Share on other sites
Advertisement
What window are you listening for messages on? Make sure you have a WndProc set up for the button's HWND if you are trying to get WM_PAINT messages for it. If that is already set up correctly, try setting (or not setting, if it is already set) the window style WS_CLIPCHILDREN on the tab window when you create it. Failing that, try calling RedrawWindow() for the tab window and/or the button window when the parent window gets a WM_PAINT. You may also want to check the WM_PAINT semantics and make sure there's nothing else you've missed.

MSDN has details on the window style flags if you want to experiment with other options as well.

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!