Win32: Child controls
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.
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.
MSDN has details on the window style flags if you want to experiment with other options as well.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement