If I create an MFC application with VS 2005 App Wizard then it puts the following into stdafx.h:
#ifdef _UNICODE#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='22.214.171.124' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
The effect of this is that a Unicode app gets the XP look and a non-Unicode app doesn't. If I remove the #ifdef _UNICODE then the non-Unicode app gets the XP look. So why is the #ifdef _UNICODE in there
I have a large non-Unicode app (it will become Unicode in time, but not just now) which I would like to give the XP look but am concerned that I'm storing up trouble by modifying bits of auto-generated code.
On the same subject, the App Wizard also puts this code fragment into the app's InitInstance() method:
// InitCommonControlsEx() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles. Otherwise, any window creation will fail.
InitCtrls.dwSize = sizeof(InitCtrls);
// Set this to include all the common control classes you want to use
// in your application.
InitCtrls.dwICC = ICC_WIN95_CLASSES;
If I remove this code fragment everything still works, so the statement Otherwise, any window creation will fail. is a wrong