![]() |
CXTPControlBitmap on MenuBar |
Post Reply
|
| Author | |
crystyce
Groupie
Joined: 19 August 2008 Location: Romania Status: Offline Points: 15 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTPControlBitmap on MenuBarPosted: 08 February 2010 at 11:46am |
|
How can I make a CXTPControlBitmap show up on a CXTPMenuBar?
I tried this, but I have no ideea how to load the bitmap on the control. Any other method to show a bitmap on the menu bar would be fine too, except for the one using a ReBar. int CMainFrame::OnAfterCreateControl(LPCREATECONTROLSTRUCT lpCreateControl) { CXTPMenuBar* pMenuBar = DYNAMIC_DOWNCAST(CXTPMenuBar, lpCreateControl->pCommandBar); if (pMenuBar) { pMenuBar->SetOwner(this); if (lpCreateControl->strCaption == _T("&Help")) { CXTPControlBitmap* pLabel = new CXTPControlBitmap(); pMenuBar->GetControls()->Add(pLabel,IDB_LOGO); pLabel->SetFlags(pLabel->GetFlags() | xtpFlagRightAlign); } } return FALSE; |
|
|
Product: Xtreme SuitePro (MFC) version 13.1.0
Platform: Windows XP (32bit) - SP 2 Language: Visual C++ 2008 |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 February 2010 at 2:41am |
|
Hi, to load it - add bitmap with IDB_LOGO to resources and line
UINT nCommands2[] = {IDB_LOGO};
pCommandBars->GetImageManager()->SetIcons(IDB_LOGO, nCommands2, _countof(nCommands2), xtpImageNormal); |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
crystyce
Groupie
Joined: 19 August 2008 Location: Romania Status: Offline Points: 15 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 February 2010 at 6:17am |
|
thanks a lot, that works great !
|
|
|
Product: Xtreme SuitePro (MFC) version 13.1.0
Platform: Windows XP (32bit) - SP 2 Language: Visual C++ 2008 |
|
![]() |
|
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 |