<p>Can you use CMFCVisualManager with a dialog based application to change the applications appearance? If so how is it done?</p>

<p>The idea is to change the shape, colour etc. of controls such as push buttons using the MFC Feature Pack released with MSVC 2008.</p>

[{'answer_id': 73033, 'author': 'Roel', 'author_id': 11449, 'author_profile': 'https://Stackoverflow.com/users/11449', 'pm_score': 2, 'selected': False, 'text': '<p>No, can\'t be done, at least not if you\'re talking about the Feature Pack version. Version 10 of the BCGSoft libraries do have this functionality, see for example: <a href="http://www.bcgsoft.com/bcgcontrolbarpro-versions.htm" rel="nofollow noreferrer">http://www.bcgsoft.com/bcgcontrolbarpro-versions.htm</a> and <a href="http://www.bcgsoft.com/images/SkinnedBuiltInDlgs.jpg" rel="nofollow noreferrer">http://www.bcgsoft.com/images/SkinnedBuiltInDlgs.jpg</a>. The MFC feature pack is more or less the previous version of the BCGSoft libraries, MS bought a license from them.</p>\n'}, {'answer_id': 93554, 'author': 'djeidot', 'author_id': 4880, 'author_profile': 'https://Stackoverflow.com/users/4880', 'pm_score': 0, 'selected': False, 'text': '<p>You need to add the Common Controls manifest to your project resources. Here is the code for the manifest file:</p>\n\n<pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;\n&lt;assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"&gt;\n&lt;assemblyIdentity\n version="1.0.0.0"\n processorArchitecture="X86"\n name="Program Name"\n type="win32"\n/&gt;\n&lt;description&gt;Description of Program&lt;/description&gt;\n&lt;dependency&gt;\n &lt;dependentAssembly&gt;\n &lt;assemblyIdentity\n   type="win32"\n   name="Microsoft.Windows.Common-Controls"\n   version="6.0.0.0"\n   processorArchitecture="X86"\n   publicKeyToken="6595b64144ccf1df"\n   language="*"\n /&gt;\n &lt;/dependentAssembly&gt;\n&lt;/dependency&gt;\n&lt;/assembly&gt;\n</code></pre>\n'}, {'answer_id': 1467172, 'author': 'djeidot', 'author_id': 4880, 'author_profile': 'https://Stackoverflow.com/users/4880', 'pm_score': 0, 'selected': False, 'text': '<p>I think you can have some MFC-feature-pack features by implementing <code>OnApplicationLook</code> on your base <code>CDialog</code> (check Step 4 on <a href="http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/print.php/c14929__2" rel="nofollow noreferrer">this page</a>). It might be better to implement the whole <code>OnApplicationLook</code> method, but you can test your application simply by adding this to <code>OnInitDialog</code>:</p>\n\n<pre><code>CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Silver);\nCMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2007));\nCDockingManager::SetDockingMode(DT_SMART);\nRedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_FRAME | RDW_ERASE);\n</code></pre>\n'}, {'answer_id': 26944194, 'author': 'Ziggyware', 'author_id': 4255207, 'author_profile': 'https://Stackoverflow.com/users/4255207', 'pm_score': 0, 'selected': False, 'text': '<p>This is the least amount of code to enable the Visual Styles. You should be able to pop your CDialog into the frame easily. The IDR_MAINFRAME is a menu resource.</p>\n\n<pre><code>class CMFCApplication2Dlg : public CFrameWndEx\n{\n    CMFCMenuBar bar;\npublic:\n    CMFCApplication2Dlg() : CFrameWndEx()\n    {\n        LoadFrame(IDR_MAINFRAME);\n        bar.Create(this);\n    }\n};\n\nclass CMFCApplication2App : public CWinAppEx\n{\npublic:\n    virtual BOOL InitInstance()\n    {\n        CWinAppEx::InitInstance();\n\n        CMFCVisualManagerOffice2007::SetStyle(\n            CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);\n\n        CMFCVisualManager::SetDefaultManager(\n            RUNTIME_CLASS(CMFCVisualManagerOffice2007));\n\n        SetRegistryKey(_T("Local AppWizard-Generated Applications"));\n\n        m_pMainWnd = new CMFCApplication2Dlg();\n\n        m_pMainWnd-&gt;ShowWindow(SW_SHOW);\n        m_pMainWnd-&gt;UpdateWindow();\n\n        return TRUE;\n    }\n};\n\nCMFCApplication2App theApp;\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/72573', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/12346/']