News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

custom visual styles

Started by anuradha, August 15, 2007, 10:50:21 PM

Previous topic - Next topic

anuradha

hi people
can any one tell me how can I add visual styles to my application???
thankx :bg

thomas_remkus

Can you define a little more about what you are needing? Like ... what are you expecting?

anuradha

hi
thanks for the replies
i just want to know is their any method that can  add xp visual style to application  that i create s...
sorry for my bad english  :red
thanks

evlncrn8

add a manifest, and make sure you call initcommoncontols..

search for 'manifest' on the forum..

MichaelW

To use the XP visual styles you must create an application manifest that specifies which version of ComCtl32.dll should be used. As a minimum you can use the example manifest from here. The application-specific data in the manifest is not necessary, so it can be used exactly as shown. The manifest must be stored in a file with the name appname.exe.manifest, where appname is the actual name of the EXE.

The application resource definition should contain:

#define RT_MANIFEST 24
#define CREATEPROCESS_MANIFEST_RESOURCE_ID  1

CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "test.exe.manifest"

By using CREATEPROCESS_MANIFEST_RESOURCE_ID the manifest is included in the executable, eliminating any dependence on the manifest file (although a manifest file placed in the same directory as the EXE can still override the one in the EXE).

The example app in the attachment creates an edit control with the ES_PASSWORD style. Because of this style, each character in the edit control will display as a black circle if the app is using the XP visual styles, or as an asterisk (*) if not.

The code that I started with is a window demo in which I attempted to explain all the major components. Just ignore any unnecessary comments.


[attachment deleted by admin]
eschew obfuscation

Timbo

Greetings,

With the latest MS linker you can also do the following:

/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"

Which causes the linker to create and embed the manifest directly with no need for messing with resources.

This is the behavior of the linker supplied with VS2k5.

Regards,

Tim