![]() |
How to set icons to Context Menu? |
Post Reply ![]() |
Author | |
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() Posted: 28 May 2010 at 5:25pm |
I have this code to display a context menu in a dialog....
if (point.x < 0 || point.y < 0 ){ point.x = 0; point.y = 0; ClientToScreen(&point); } CMenu myMenu; myMenu.LoadMenu(IDR_POPUP_SELECT); CMenu* myPopup = myMenu.GetSubMenu(0); CXTPCommandBars::TrackPopupMenu(myPopup,TPM_LEFTALIGN| TPM_RIGHTBUTTON,point.x,point.y, this);And I have 32bit, 24x24 pixels PNG image whih contains the context menu icons, I have tried
XTPImageManager() ->SetIcons(IDB_PNG_CONTEXT_ICONS), but it did not work. |
|
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit Language: Visual C++ (VS 2019) |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
When you call XTPImageManager()->SetIcons(IDB_PNG_CONTEXT_ICONS) you also need Toolbar resource with buttons "describing" each image id. |
|
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 |