title: C++/Win32 : XP Visual Styles - no controls are showing up?
body: <p>Okay, so i'm pretty new to C++ &amp; the Windows API and i'm just writing a small application. I wanted my application to make use of visual styles in both XP, Vista and Windows 7 so I added this line to the top of my code:</p>
  
  <pre><code>#pragma comment(linker,"\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
  </code></pre>
  
  <p>It seemed to work perfectly on my Windows 7 machine and also Vista machine. But when I tried the application on XP the application wouldn't load any controls (e.g. buttons, labels etc.) - not even messageboxes would display.</p>
  
  <p>This image shows a small test application which i've just put together to demonstrate what i'm trying to explain: <a href="http://img704.imageshack.us/img704/2250/myapp.png" rel="nofollow noreferrer">http://img704.imageshack.us/img704/2250/myapp.png</a></p>
  
  <p>In this test application i'm not using any particularly fancy or complicated code. I've effectively just taken the most basic sample code from the MSDN Library (<a href="http://msdn.microsoft.com/en-us/library/ff381409.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ff381409.aspx</a>) and added a section to the WM_CREATE message to create a button:</p>
  
  <pre><code>MyBtn = CreateWindow(L"Button", L"My Button", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE, 25, 25, 100, 30, hWnd, NULL, hInst, 0);
  </code></pre>
  
  <p>But I just can't figure out what's going on and why its not working. Any ideas guys? Thank you in advanced.</p>
  
  <p>(By the way the application works in XP if i remove the manifest section from the top - obviously without visual styles though. I should also probably mention that the app was built using Visual C++ 2010 Express on a Windows 7 machine - if that makes a difference?)</p>