![]() |
How to add Icon for ?TrackPopupMenu |
Post Reply ![]() |
Author | |
sanbao439 ![]() Newbie ![]() Joined: 18 June 2008 Location: China Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() Posted: 18 June 2008 at 2:20am |
I create a popupmenu, but don't know how to add icon for it.
CMenu menu;
VERIFY(menu.LoadMenu(IDR_MENU_POPUP)); CXTPPopupBar* pPopupBar = CXTPPopupBar::CreatePopupBar(GetCommandBars()); CMenu* pPopup = menu.GetSubMenu(0); pPopupBar->LoadMenu(pPopup); CXTPCommandBars::TrackPopupMenu(pPopupBar, (TPM_RECURSE | TPM_RIGHTBUTTON | TPM_NONOTIFY), point.x, point.y, this); pPopupBar->GetImageManager()->SetIcons(IDB_BITMAP_TREE, IDR_MAINFRAME_ALPHA, xtpImageNormal); pPopupBar->InternalRelease(); pPopupBar = NULL; |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Code is right.
Just switch pPopupBar->GetImageManager()->SetIcons
and
CXTPCommandBars::TrackPopupMenu
lines :-)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
sanbao439 ![]() Newbie ![]() Joined: 18 June 2008 Location: China Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() |
I switched it! but It can't display icon! Can you give me a sample about right-click menu? I can't find the sample in your sample with XTPToolkitPro. Thanks a lot. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Check Samples\CommandBars\CustomThemes sample,
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
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 |