WS_EX_COMPOSITED style (double buffering) problems
I have two problems with this style:
1. If a dialog box is given this style during the WM_INITDIALOG message (i.e. as the dialog is being created, before it is displayed), AND if the dialog box is initially invisible, then my program crashes immediately. It seems like the style is attempting to get the dialog box and all of its controls to draw themselves in the secondary buffer, but this attempt continually fails since they refuse to draw themselves, since their update regions are empty. It is like it wants them to draw, so it tried to send them WM_PAINT messages, but they refuse it each time.
Has anyone experienced this behaviour? I can resolve the situation by making the dialog box initially visible OR by not giving it the WS_EX_COMPOSITED style during WM_INITDIALOG. If I give it the style afterwards, all is fine. Strange...
2. The WS_EX_COMPOSITED style appears to make the 'x' close button not react visibly to the user's actions, even though it still works. So, the button does not depressed when the user clicks it, but when the user let's go, it sends the appropriate message.
Any input / ideas are appreciated.