Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to set icons to Context Menu?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to set icons to Context Menu?

 Post Reply Post Reply
Author
Message
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post Topic: How to set icons to Context Menu?
    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)
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.