1

I've created a modal dialog box, like this

IDD_FORMVIEW DIALOGEX 500, 200, 257, 98
STYLE DS_ABSALIGN | DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU

FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
    LTEXT           "xxx",IDC_STATIC,31,32,194,16
    PUSHBUTTON      "OK",IDOK,92,65,76,26
END

Is there any way to make the button Windows 7 themed? Meaning with the mouseover highlight and not as dull as it is now, cause it's by default on .NET applications but I can't get it like that here.

Chris Becke
  • 34,244
  • 12
  • 79
  • 148
ᴘᴀɴᴀʏɪᴏᴛɪs
  • 7,169
  • 9
  • 50
  • 81
  • have you embedded any manifests allowing to use XP+ theming options? – Necrolis May 31 '11 at 10:47
  • possible duplicate of [How to change the control themes in a Win32 API application?](http://stackoverflow.com/questions/3524009/how-to-change-the-control-themes-in-a-win32-api-application) – Chris Becke May 31 '11 at 12:03
  • With questions like this, it would also be relevant to include a tag describing your development environment (visual studio / mingw etc) as the solutions can differ depending on the build environment. – Chris Becke May 31 '11 at 12:05

1 Answers1

3

This is a clear duplicate of existing questions. The canonical answer by Microsoft is the MSDN article on Enabling Visual Styles.

Basically, your application needs to have an application manifest file that lists the Microsoft.Windows.Common-Controls 6.0.0.0 assembly as a dependentAssembly.

Chris Becke
  • 34,244
  • 12
  • 79
  • 148