<p>I'm updating some of our legacy C++ code to use the "MFC feature pack" that Microsoft released for Visual Studio 2008. We've used the new classes to derive our application from CFrameWndEx, and are applying the Office 2007 styles to give our application a more modern appearance. This gives us gradient filled window titles, status bars etc, and the use of the ribbon toolbars.</p>

<p>However, our application contains some owner drawn controls, and I'd like to update these to match the color scheme used by the feature pack. Ideally I'd like to know the light and shaded toolbar colors that are currently in use.</p>

<p>I've had a hunt around the documentation and web and have not yet found anything. Does anyone know how to find this information out?</p>

<p>[Edit]</p>

<p>In particular we need to find out which colors are being used at runtime. You can change the appearance of your application at runtime using the new static function CMFCVisualManager::SetDefaultManager.</p>

<p>The following msdn page shows you what kind of styles are available, in particular the Office2007 look:
<a href="http://msdn.microsoft.com/en-us/library/cc137831.aspx" rel="nofollow noreferrer">link to msdn</a></p>

[{'answer_id': 8796, 'author': 'GateKiller', 'author_id': 383, 'author_profile': 'https://Stackoverflow.com/users/383', 'pm_score': 0, 'selected': False, 'text': '<p>Have you tried: <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=19E3BF38-434B-4DDD-9592-3749F6647105&amp;displaylang=en" rel="nofollow noreferrer">2007 Office System Document: UI Style Guide for Solutions and Add Ins</a>\n?</p>\n'}, {'answer_id': 8804, 'author': 'Will Dean', 'author_id': 987, 'author_profile': 'https://Stackoverflow.com/users/987', 'pm_score': 2, 'selected': True, 'text': "<p>Have you looked in the MFC source code, which you'll find in something like</p>\n\n<p>C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc</p>\n"}, {'answer_id': 8825, 'author': 'GateKiller', 'author_id': 383, 'author_profile': 'https://Stackoverflow.com/users/383', 'pm_score': 0, 'selected': False, 'text': '<p>I guess you could use your favourite image editor and pick the colors from a screen grab.</p>\n'}, {'answer_id': 9703, 'author': 'John Sibly', 'author_id': 1078, 'author_profile': 'https://Stackoverflow.com/users/1078', 'pm_score': 0, 'selected': False, 'text': '<p>"I guess you could use your favourite image editor and pick the colors from a screen grab."</p>\n\n<p>This is essentially what I\'m doing at the moment, and I\'ve defined a list of constants from which I pull out the colours. Doesn\'t seem very elegant though!</p>\n'}, {'answer_id': 9733, 'author': 'Aidan Ryan', 'author_id': 1042, 'author_profile': 'https://Stackoverflow.com/users/1042', 'pm_score': 0, 'selected': False, 'text': '<p>Looks like CMFCVisualManager offers several methods for getting color information, e.g.</p>\n\n<pre><code>CMFCVisualManager::GetSmartDockingBaseGuideColors()\nCMFCVisualManager::GetToolbarHighlightColor()\n</code></pre>\n\n<p>Take a look at the MSDN docs for CMFCVisualManager.</p>\n'}, {'answer_id': 9741, 'author': 'Aidan Ryan', 'author_id': 1042, 'author_profile': 'https://Stackoverflow.com/users/1042', 'pm_score': 0, 'selected': False, 'text': '<p>@GateKiller, the OP isn\'t developing an Office 2007 add-in, so the UI guidelines won\'t really help. It\'s an MFC application using the <a href="http://blogs.msdn.com/somasegar/archive/2008/04/07/visual-c-2008-feature-pack-shipped.aspx" rel="nofollow noreferrer">Visual C++ 2008 Feature Pack</a> which allows MFC apps to take on the Office 2007 look and feel.</p>\n'}, {'answer_id': 12129, 'author': 'John Sibly', 'author_id': 1078, 'author_profile': 'https://Stackoverflow.com/users/1078', 'pm_score': 1, 'selected': False, 'text': "<blockquote>\n<p>Looks like CMFCVisualManager offers several methods for getting color information, e.g.</p>\n<p>CMFCVisualManager::GetSmartDockingBaseGuideColors()\nCMFCVisualManager::GetToolbarHighlightColor()</p>\n<p>Take a look at the MSDN docs for CMFCVisualManager.</p>\n</blockquote>\n<p>Good suggestion, but unfortunately they just return various shades of grey, when currently I'm running my application with the style CMFCVisualManagerOffice2007::Office2007_LunaBlue</p>\n<p>Annoyingly the msdn help is &quot;under construction&quot; so doesn't even tell you what they are supposed to be doing!</p>\n"}, {'answer_id': 14866, 'author': 'Aidan Ryan', 'author_id': 1042, 'author_profile': 'https://Stackoverflow.com/users/1042', 'pm_score': 0, 'selected': False, 'text': "<blockquote>\n  <p>Good suggestion, but unfortunately they just return various shades of grey, when currently I'm running my application with the style CMFCVisualManagerOffice2007::Office2007_LunaBlue</p>\n</blockquote>\n\n<p>CMFCVisualManagerOffice2007::GetTabFrameColors - the clrFace output param is grey?</p>\n\n<p>Perhaps they're all masks on top of a single base hue for each theme?  Assuming you can determine which color scheme is in effect with CMFCVisualManagerOffice2007::GetStyle(), perhaps you can figure out what that hue is and then do some masking with the GetxxxColor() methods.</p>\n"}, {'answer_id': 202080, 'author': 'Rob', 'author_id': 9236, 'author_profile': 'https://Stackoverflow.com/users/9236', 'pm_score': 1, 'selected': False, 'text': "<p><code>afxGlobalData</code> contains some useful information on the current colours, brushes and fonts being used by the MFC Feature Pack.  In particular I use <code>afxGlobalData.m_clrBarFace</code> when painting my own control bar backgrounds.</p>\n\n<p>(note that I am not in front of my work PC so the above syntax isn't spot on.)</p>\n"}]
['https://Stackoverflow.com/questions/8761', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1078/']