Click here to Skip to main content
15,886,806 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDynamic popup menu [edited - bis] Pin
toxcct26-Jul-05 3:04
toxcct26-Jul-05 3:04 
GeneralRe: Dynamic popup menu Pin
mark novak26-Jul-05 3:09
mark novak26-Jul-05 3:09 
GeneralRe: Dynamic popup menu Pin
toxcct26-Jul-05 3:19
toxcct26-Jul-05 3:19 
GeneralRe: Dynamic popup menu Pin
mark novak26-Jul-05 3:33
mark novak26-Jul-05 3:33 
GeneralRe: Dynamic popup menu Pin
toxcct26-Jul-05 3:43
toxcct26-Jul-05 3:43 
GeneralRe: Dynamic popup menu Pin
mark novak26-Jul-05 3:50
mark novak26-Jul-05 3:50 
GeneralRe: Dynamic popup menu Pin
toxcct26-Jul-05 3:59
toxcct26-Jul-05 3:59 
GeneralRe: Dynamic popup menu Pin
mark novak26-Jul-05 4:15
mark novak26-Jul-05 4:15 
Sorry, remember when I told you to use CreateMenu()? Try calling CreatePopupMenu(). Also remember when I told you to call GetSubMenu(), that doesn't matter anymore with CreatePopupMenu(). Yeah I know, sorry, I never made it out of highschool.

CMenu popup_menu;<br />
popup_menu.CreatePopupMenu();<br />
<br />
popup_menu.AppendMenu(MF_STRING, 2, _T("I know they're stolen"));<br />
popup_menu.AppendMenu(MF_STRING, 3, _T("But I don't feel bad"));<br />
<br />
CRect rect;<br />
// ... get a valid rect from somewhere<br />
<br />
popup_menu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, rect.right, rect.top, AfxGetMainWnd());

GeneralRe: Dynamic popup menu Pin
toxcct26-Jul-05 5:11
toxcct26-Jul-05 5:11 
GeneralRe: Dynamic popup menu Pin
mark novak26-Jul-05 5:30
mark novak26-Jul-05 5:30 
GeneralRe: Dynamic popup menu Pin
toxcct26-Jul-05 20:35
toxcct26-Jul-05 20:35 
GeneralRe: Dynamic popup menu Pin
mark novak27-Jul-05 1:54
mark novak27-Jul-05 1:54 
GeneralRe: Dynamic popup menu Pin
toxcct27-Jul-05 2:00
toxcct27-Jul-05 2:00 
GeneralRe: Dynamic popup menu Pin
mark novak27-Jul-05 2:13
mark novak27-Jul-05 2:13 
GeneralString Converstions Pin
tomek1826-Jul-05 2:59
tomek1826-Jul-05 2:59 
GeneralRe: String Converstions Pin
mark novak26-Jul-05 3:02
mark novak26-Jul-05 3:02 
GeneralRe: String Converstions Pin
tomek1826-Jul-05 3:10
tomek1826-Jul-05 3:10 
GeneralRe: String Converstions Pin
mark novak26-Jul-05 3:24
mark novak26-Jul-05 3:24 
GeneralRe: String Converstions Pin
tomek1826-Jul-05 3:18
tomek1826-Jul-05 3:18 
GeneralRe: String Converstions Pin
tomek1826-Jul-05 3:43
tomek1826-Jul-05 3:43 
GeneralRe: String Converstions Pin
mark novak26-Jul-05 4:04
mark novak26-Jul-05 4:04 
GeneralRe: String Converstions Pin
tomek1826-Jul-05 4:17
tomek1826-Jul-05 4:17 
GeneralRe: String Converstions Pin
mark novak26-Jul-05 4:25
mark novak26-Jul-05 4:25 
GeneralRe: String Converstions Pin
Tim Smith26-Jul-05 3:30
Tim Smith26-Jul-05 3:30 
GeneralRe: String Converstions Pin
tomek1826-Jul-05 4:19
tomek1826-Jul-05 4:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.