Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Recommended Posts

You can popup your menu,

 

CMenu YourMenu;

///load a menu from resource ,etc

YourMenu.TrackPopupMenu( TPM_LEFTALIGN|TPM_LEFTBUTTON, pos.x, pos.y, get_MainFrame());

 

and read/process messages around here.

code:

static BOOL AppPreTranslateMessage(MSG* pMsg)

{

AFX_MANAGE_STATE(AfxGetStaticModuleState())

 

if(pMsg->message==WM_COMMAND&&(UINT)pMsg->wParam==IDR_MENU1_ITEM1)

{

 

// do something;

return true;

}

 

return theApp.PreTranslateMessage(pMsg);

}

 

 

 

 


Link to comment
Share on other sites

ok.

how about this method.

 

1, add a dummy menu by using insetthirdpartymenu()

2, get a menu from the main window and remove it by using GetSubMenu()and RemoveMenu()

3, popup your menu (pMenu->TrackPopupMenu())

 

 

I dont have X3 and the sdk yet,

but there should be a function to register AppPreTranslateMessage() function..

 

if it does not exist, try subclassing the main window..

Link to comment
Share on other sites

Hi..

 

I tried with above method. am getting buttons. but they are not rooting to the process functions defined.

 

is there any other method for adding a popmenu with insertthirdpartymenu() function only . in this function i am giving process function for each buttton. but, am not able to get popmenu buttons on GUI.

Link to comment
Share on other sites
  • 3 months later...
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...