![]() |
CMenu and custom XTP themes |
Post Reply ![]() |
Author | |
klisa ![]() Newbie ![]() Joined: 10 April 2006 Location: France Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 10 April 2006 at 5:24am |
[Environment: Windows XP SP2, Visual Studio 2003, XTP 9800.] Hi, I need a help/hint regarding the usage of custom XTP themes. Here's is the scenario: - There is a simple custom paint theme in which paint and pane managers are derived from CXTPPaintManager and CXTPDockingPanePaintManager classes, respectively. When the custom theme is applied like this (below is the main frame window's code) CXTPPaintManager* customTheme = ...; the custom theme affects only toolbars/command bars that are created using GetCommandBars()->Add() and CXTPToolBar::LoadToolbar() methods. The main application menu (CMenu) remains drawn in whatever is the current XTP standard theme. Now, if the main application menu becomes a command bar (that is, if it's created like this): CXTPMenuBar* menuBar = GetCommandBars()->SetMenu(_T("Menu Bar"), IDR_MAINFRAME); then the custom theme affects it. Unfortunately, the main application menu absolutely has to stay a CMenu because of the existing code (a lots of it) that enumerates/adds/modifies/removes *CMenu* items. Switching to CXTPMenuBar simply isn't an option because it would require all that code to be changed to work with CXTPCommandBars and CXTPControls instead. The question: Is there a way to keep CMenu as the main application menu (in other words, not to load it as a command bar) and still to have it drawn using the custom theme painting? Thanks, |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |