Context Menu images with CXTPCommandBars problem |
Post Reply |
Author | |
KJM-18
Newbie Joined: 08 August 2008 Location: Canada Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 11 August 2008 at 11:24am |
Thanks for your response. I looked at that sample code however I still could not get my code to work. The SetIcons() function takes a toolbar resource ID and an image list, neither of which my example has. I need to assign different images to menu items at runtime and the images are bitmaps stored in the resource file. I'm new to working in C++ and would really appreciate it if you could modify the sample code I provided or show me a longer code snippet. Many thanks in advance. |
|
Smile and the whole world smiles with you - Chaplin
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Instead of SetMenuItemBitmaps add Images to ImageManager. See our CommandBarIcons .
XTPImageManager()->SetIcons(...);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
KJM-18
Newbie Joined: 08 August 2008 Location: Canada Status: Offline Points: 2 |
Post Options
Thanks(0)
|
Hi, I’m new to C++ and to using Xtreme ToolkitPro (ver. 11.2.2). I’ve been trying to display bitmap images before the text of a dynamically created context menu popup. I can get it to work using just the standard Menu class, but can not get the images to display when using the CXTPCommandBars::TrackPopupMenu code (see below). I’ve looked at all the samples but none of them use dynamically created menus where the images are assigned at run-time. I must be missing a step or something and would appreciate any suggestions. //// TEST CODE FOLLOWS
// void CTreeFormView::PopupEmptyPosition(CSingleOrg* DestSingleOrg, CPoint point, CString SourcePosnNbr, CString SourcePosnID, CString SourceSN, CString SourceMemId, CString SourcePosnOrgId, CString SourcePosnUIC, CString SourceFutureInd)
{ CMenu popup; popup.CreatePopupMenu(); // Simple loop that creates 4 menu items GetWindowRect(&rect); // This is the original code that displays the images popup.DestroyMenu(); ::DeleteObject(FirstBitmap); |
|
Smile and the whole world smiles with you - Chaplin
|
|
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 |