Static control [10/10]: Support the Windows XP mode of the static control

Michael Kaufmann hallo at michael-kaufmann.ch
Sun Jan 15 15:28:45 CST 2006


Hi Filip,

>This doesn't seem right. User32 shouldn't be checking manifests, I would 
>expect the STATIC control to be subclassed in COMCTL32 and the WinXP 
>functionality implemented there.
>  
>

You're right, but it's not easy to implement it in the same way as 
Windows does. Windows has two implementations of the basic controls, one 
in user32.dll and one in comctl32.dll (as summarized in WWN 267: 
http://www.winehq.org/site?issue=267#Theming%20Revisited ). The controls 
in comctl32.dll contain the Windows XP version of the controls, 
user32.dll contains the controls that are compatible with older versions 
of Windows.

I've discovered that applications which contain a manifest use the 
controls from comctl32.dll even if they don't link to that file (even if 
they don't call InitCommonControls). I've got a test application that 
just displays an edit box with the ES_PASSWORD style, which shows 
asterisks (old edit control in user32) or black circles (new edit 
control in comctl32). The test application has a manifest, so it 
displays black circles and uses themes even if it never calls 
InitCommonControls.

If themes are disabled, Windows XP still displays the edit box with the 
black circles and doesn't fall back to the old controls.

So I agree that I've not implemented it the same way as Windows, but 
implementing it the same way would be difficult because we need two 
versions of the edit and the static control and detect at the right time 
which version to use.

Regards
Michael




More information about the wine-devel mailing list