Tuesday, October 25, 2005

WS_EX_CONTROLPARENT

There's an MFC window style that you need to set when a window is going to contain child controls. WS_EX_CONTROLPARENT. This bad-boy is a must when you're nesting windows (a la AWT or Motif).

What happens when you omit it? You can create a parent window without this style, but your children will behave funny, and your program can crash often. For example, hitting tab in a control may put your message pump in an infinite loop. Message boxes and other popup children might cause lock-ups as well. All sorts of bad side-effects.

1 Comments:

At 3:58 AM, Blogger GregRomanssen said...

Hi, any C# example? I am suffering from this in MMC and Property pages ... :(

 

Post a Comment

<< Home