I have a problem with creating and embeding the manifest file for the C++ native application for Windows in Visual Studio 2010 C++. The problem is that when embeding my manifest, the application does not run on Windows XP mode of the Windows 7. The executable cannot be launched at all.
The simplest possible application (that does not work for me after adding the manifest) is probably a message box with the OK button:
See the old look of the OK button and of the background around. How can I add the manifest to make the button look the new way?
The testing example can be created this way:
1. Launch the Visual Studio 2010 C++.
2. Choose from the menu: File -- New -- Project... (Ctrl+Shift+N)
3. From the Installed Templates choose: Visual C++ -- Win32 -- Win32 Project
4. Choose the Location for the project, type-in the Name: test (see the picture)
5. Press OK, Next >, and then check the Additional options: Empty project, and finally press the button Finish (see the image)
6. In Solution Explorer, click the right mouse button over the Source Files -- Add -- New Item... (Ctrl+Shift+A)
7. ... select the C++ File (.cpp), give it the name main.cpp and press the Add button.
8. Copy/paste the following code into the main.cpp.
int WINAPI WinMain(HINSTANCE hInstance,
MessageBox(NULL, "test", "test", MB_ICONINFORMATION);
9. Now, open the Project -- test Properties... (Alt+F7), unfold the Configuration Properties, choose General and change the Character Set to the value "Not Set" and press OK (shown for Debug on the following picture, you can do the same for the Release if you want to compile also the Release version).
10. Compile it (F7) and run it (F5) and you should see...
Now, can you show how exactly should I add the manifest file and what should be its content?
Thanks for your time and experience,
P.S. I am using Windows 7 64-bit.