![]() |
Context Menu images with CXTPCommandBars problem |
Post Reply ![]() |
Author | |
KJM-18 ![]() Newbie ![]() ![]() Joined: 08 August 2008 Location: Canada Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() Posted: 08 August 2008 at 5:24pm |
//// 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
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
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 |