![]() |
Main menu in different fonts |
Post Reply ![]() |
Author | |
kanitamildasan ![]() Senior Member ![]() ![]() Joined: 01 February 2006 Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() Posted: 09 February 2006 at 12:39am |
Hi, I have an application which toggle the main menu strings between two different languages at runtime when menu is in 'non-english' font the last main menu item caption in the event handler of the last menu item i have changed the entire menubar font by using CMenu cmenu; ... pMenuBar->LoadMenu(&cmenu); ... XTPPaintManager()->SetCommandBarsFontIndirect(&lf);&a mp;a mp;a mp;a mp;n bsp; XTPPaintManager()->RefreshMetrics(); but how can i change only the last menu item caption to a different font ? thanks in advance |
|
Xtreme ToolkitPro 12.1.1
Win XP (32bit) - SP2 Visual C++ 6.0 SP 6 |
|
![]() |
|
kanitamildasan ![]() Senior Member ![]() ![]() Joined: 01 February 2006 Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() |
hi, Do i need to derive from CXTPMenuBar and override the OnPaint to change the font when last Button is going to drawn on the screen ? |
|
![]() |
|
kanitamildasan ![]() Senior Member ![]() ![]() Joined: 01 February 2006 Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() |
hi, anyone ? |
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello, Here sample:
class CXTPOffice2003ThemeEx : public CXTPOffice2003Theme void RefreshMetrics() LOGFONT lf; m_fontItalic.DeleteObject(); lf.lfItalic = 1; lf.lfItalic = 0;
if (pButton->GetID() == ID_LANGUAGE_FRANCH) return CXTPOffice2003Theme::DrawControlPopupParent(pDC, pButton, bDraw); } protected:
usage: CXTPPaintManager::SetCustomTheme(new CXTPOffice2003ThemeEx);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
kanitamildasan ![]() Senior Member ![]() ![]() Joined: 01 February 2006 Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() |
Hi, [- Hearty Thanks -] I got what i need by overriding DrawControlToolbarParent() If i allow my application user to change the themes on the fly like Customthemes sample the only way is to derive and override DrawControlToolbarParent() for all themes (ex CXTPOffice2003Theme,CXTPWhidbeyTheme etc) ?
|
|
Xtreme ToolkitPro 12.1.1
Win XP (32bit) - SP2 Visual C++ 6.0 SP 6 |
|
![]() |
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 |