Adding Manifest file method
- Create a text file with name YourAppName.exe.manifest in your executable path. For eg: if your executable's name is TestApp.exe manifest file's name will be TestApp.exe.manifest
- Paste the below code to the manifest file you created. Replace CompanyName.ProductName.YourApp and Your application description here with your application details in the manifest file.
- Now you can run your application and feel the difference !
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>Embeding manifest in your executable
<assembly
xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="CompanyName.ProductName.YourApp"
type="win32" />
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*" />
</dependentAssembly>
</dependency>
</assembly>
- Take Workspace window->Resource tab of your Visual Studio IDE
- Right click on the resources and choose insert , then Insert Resource dialog will be shown.
- Select Custom... button of the Insert Resource dialog and enter the custom resource type as 24 and press OK.
- Copy and paste the above shown manifest file after specific modifications (mentioned in the previous method)
- Change the Resource ID of the newly added IDR_DEFAULT1 to 1
- Call InitCommonControls() (include commctrl.h and link comctl32.lib)from any of your init function such as InitInstace() or Winmain()
- Rebuild the application, everything is embedded in your application. Execute it and feel the XP style.
No comments:
Post a Comment