Print Page | Close Window

How to set icons to Context Menu?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=16768
Printed Date: 20 June 2025 at 6:00pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to set icons to Context Menu?
Posted By: evoX
Subject: How to set icons to Context Menu?
Date 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)



Replies:
Posted By: Oleg
Date Posted: 30 May 2010 at 3:11am
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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net