Michael Kaufmann wrote:
Changelog:
- Detect if the image of the current process has a manifest. If yes,
enable some Windows XP-specific features (as described in MSDN)
- Destruction of the control window: Destroy bitmaps loaded at control
creation time (removed a resource leak)
- Always stretch bitmaps and icons to the whole client area
- Windows XP mode: Different bitmap background, different icon
background.
- Add some notes
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.
- Filip
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
An even better summary is in WWN 243: http://www.winehq.org/site?issue=243#Button%20Code%20Audit