c++ - Windows XP Style: Why do we get dark grey background on static text widgets? -


We are writing windows desktop app using C ++ and Win32. Our dialog box has an ugly look with "Windows XP style": the background of the static text is gray. While the dialog box background is too gray, this is not a problem, but inside a tab control, where the background is white, the brown background for the text is very noticeable.

First we have done many of our drawing of control, but these days we are trying to use Enfell as standard as possible, and avoid overriding the maximum standard behavior.

We are using Win32 API, which is getting a while but I think the problem happens with ATL also. We are creating a dialog template. Text is a "static" control (0x0082 ) In the style we have set for the style is "SS_LEFT" Text Control is inside a tab control: "SysTabControl32" with only one flag: WS_CLIPSIBLINGS is set to use it with SS_WHITERECT and WS_EX_TRANSPARENT and other settings Have done, no benefit .

All this is pulled with standard Windows dialog box message handlers. My main question is, "What are we doing wrong?"

Any thoughts?

"How can I work around this? P>

Common way to implement pages in tab control This problem is necessary to solve MS: -

Instead of creating separate controls in the tab area, create a model related child communication for each page and control it with the main dialogue Make page dialogs (not tabs) as their parents and use them The subject switches between the tabs, just show and hide the relevant page dialog.

WM_INITDIALOG Handler for each page, call the Usesem API

With the code, ETDT_ENABLETAB it automatically changes the color of the background of the dialog and controls all of its controls on one tab to properly paint it.

If you override Gone WM_ERASEBKGND or WM_CTLCOLOR * in your pages in DialogProc The default handling (refunds FALSE) has to be returned because the syntax in these methods is that the code is going to heavy weightlifting style bits should only be set, although the hair page dialog page was being created on a normal window 9x tabbed dialog.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -