Message 1 of 3
Not applicable
07-09-2019
04:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a class MyPane deriver from AcPane. During ARX startup I add it to AutoCAD status bar. My goal is to display popup menu when I left-click on MyPane. There is an event
virtual void AcStatusBarItem::OnLButtonDown(UINT nFlags, CPoint point)
which allows me to do that.
Here is my code
void MyPane::OnLButtonDown(UINT nFlags, CPoint point)
{
CAcModuleResourceOverride resOverride; // I tried to define menu globally to get rid of CAcModuleResourceOverride from here. no luck
CMenu menu;
CMenu.LoadMenu(MAKEINTRESOURCE(IDM_SOME_MENU));
// no need for result right now
DisplayPopupPaneMenu(menu);
}Last line makes AutoCAD crash with access violation error.P.S. MyPane class has ACSB_POPUP style.
Solved! Go to Solution.