Custom Controls
Re:Custom Controls
You don't have to subclass the parent. The windows standard controls behave the same way (no focus when you task switch away). Dialog boxes, if I'm not mistaken, automatically keep track of which child window has focus and put the focus back at the correct child when they are activated again. But if you have a regular old parent window, then not even Windows edit boxes, list boxes, etc. will get input focus unless the parent sets it. So, I guess that means you only have to write the control so that it obtains focus when it is clicked on. It is the parent's responsibility to do everything else.