Find out which colours are in use when using the MFC Feature pack in Office 2007 style?

Have you looked in the MFC source code, which you'll find in something like C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\src\mfc.

Looks like CMFCVisualManager offers several methods for getting color information, e.g. CMFCVisualManager::GetSmartDockingBaseGuideColors() CMFCVisualManager::GetToolbarghlightColor() Take a look at the MSDN docs for CMFCVisualManager. Good suggestion, but unfortunately they just return various shades of grey, when currently I'm running my application with the style CMFCVisualManagerOffice2007::Office2007_LunaBlue Annoyingly the msdn help is "under construction" so doesn't even tell you what they are supposed to be doing!

AfxGlobalData contains some useful information on the current colours, brushes and fonts being used by the MFC Feature Pack. In particular I use afxGlobalData. M_clrBarFace when painting my own control bar backgrounds.(note that I am not in front of my work PC so the above syntax isn't spot on.).

I guess you could use your favourite image editor and pick the colors from a screen grab.

I guess you could use your favourite image editor and pick the colors from a screen grab. " 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!

Looks like CMFCVisualManager offers several methods for getting color information, e.g. CMFCVisualManager::GetSmartDockingBaseGuideColors() CMFCVisualManager::GetToolbarghlightColor() Take a look at the MSDN docs for CMFCVisualManager.

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 Visual C++ 2008 Feature Pack which allows MFC apps to take on the Office 2007 look and feel.

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.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions