Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Error in DockingDemo
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Error in DockingDemo

 Post Reply Post Reply
Author
Message
Gian View Drop Down
Newbie
Newbie
Avatar

Joined: 29 June 2004
Location: Italy
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gian Quote  Post ReplyReply Direct Link To This Post Topic: Error in DockingDemo
    Posted: 01 July 2004 at 6:49am
i've tried to add a ON_WM_RBUTTONDOWN() event function to display a popup menu in the TreeCtrl controls (CTabClassTree)  when the right mouse button is pressed.
The function is

    CPoint pt = point;
    ClientToScreen(&pt);

    CXTMenu menu;
    VERIFY(menu.LoadMenu(IDR_POPUP));

    CXTMenu* pPopup = menu.GetSubMenu(0);
    pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y,
        this);

IDR_POPUP is a simple menu with ID_EDIT_COPY, ID_EDIT_CUT, ID_EDIT_PASTE

when the menu is displayed the icons of Copy Cut Paste  are not visible. Only changing the CWnd owner parameter in the TrackPopupMenu call to CFrameWnd the icons are loaded.

In a program of mine i need to show the icons but also link the menu item selection to some functions in the TreeCtrl class, so i cant make CFrameWnd the owner.

How i can fix this?

Thanks
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.203 seconds.