The Office visual styles are encapsulated by the
CMFCVisualManagerOffice2007 class, but the data that controls how the
styles are rendered are actually stored in resources within the MFC90(u)(d)
DLLs. You can examine all of the data by looking at the folders with color
names (Aqua, Black, Blue, Silver) under Microsoft Visual Studio
9.0\VC\atlmfc\include folder:
C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include\Aqua
C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include\Blue
C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include\Black
C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include\Silver
There is an XML file named Style.xml for each of these, and a complex
hierarchy of properties within them. The CTagManager class is used by the
CMFCVisualManagerOffice2007 class to load the XML resources from the MFC
DLL and examine the values of various properties.
The style of Scrollbar is not defined in the above packages, thus you do
not see Scrollbar have the Office 2007 style.
Although you cannot modify the resources within the MFC DLLs, you have some
other options to customize the style:
a) Create a new class derived from CMFCVisualManagerOffice2007 which sets
the m_bNcTextCenter to false in an override of OnUpdateSystemColors
(probably after calling the base class version) before OnDrawNcCaption or
OnDrawNcText will be called.
b) Create a customized style, including the style.xml resource, and load it
from a class derived from CMFCVisualManagerOffice2007. The source code of
the CMFCVisualManagerOffice2007 class (and its base classes
CMFCVisualManagerOffice2003, CMFCVisualManagerOfficeXP, and
CMFCVisualManager) can be used as a reference to see how the style
resources are used to dictate the way the window elements are drawn. If you
do so, you can create your own style resources and embed them into your
module and load the m_hinstRes in your override of OnUpdateSystemColors so
that your resources will be used.
c) Create a new class which inherits CMFCVisualManagerOffice2007 and
override OnNcPaint method.
I'm connecting to the product group of the CMFCVisualManagerOffice2007, and
will try to give you their comments.
Regards,
Jialiang Ge
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
MSDN Managed Newsgroup support offering is for non-urgent issues where an
initial response from the community or a Microsoft Support Engineer within
2 business day is acceptable. Please note that each follow up response may
take approximately 2 business days as the support professional working with
you may need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations that require urgent,
real-time or phone-based interactions. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Regards,
Boris
I'm attempting to connect to product group. I will update you as soon as I
get their comments. Thanks for your patience.
Regards,
Jialiang Ge (jia...@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
This feature will be considered in future releases of MFC.
Thanks for your suggestion.
Crag
"bmelt" <bmelt...@community.nospam> wrote in message
news:FE0EE121-30FD-4EFB...@microsoft.com...