Click here to Skip to main content
15,896,154 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get full path of exe file? Pin
pubududilena15-Nov-04 6:15
pubududilena15-Nov-04 6:15 
GeneralRe: How to get full path of exe file? Pin
Maximilien15-Nov-04 6:24
Maximilien15-Nov-04 6:24 
GeneralRe: How to get full path of exe file? Pin
dabs15-Nov-04 6:28
dabs15-Nov-04 6:28 
GeneralRe: How to get full path of exe file? Pin
pubududilena15-Nov-04 6:49
pubududilena15-Nov-04 6:49 
GeneralRe: How to get full path of exe file? Pin
Maximilien15-Nov-04 7:31
Maximilien15-Nov-04 7:31 
GeneralScroll bar Pin
shijuck15-Nov-04 2:00
shijuck15-Nov-04 2:00 
GeneralScrool Bar Painting issue Pin
anuragvelekkattu15-Nov-04 1:53
anuragvelekkattu15-Nov-04 1:53 
GeneralON_UPDATE_COMMAND_UI impossible to change the state of items Pin
madretierra15-Nov-04 1:06
madretierra15-Nov-04 1:06 
Hello,

is there anybody to explain me how to disable an item from a menu ?
One of my items are for exemple ID__STOP :

in my .h file:
afx_msg void OnChoixMenuStop();
afx_msg void OnUpdateMenuStop(CCmdUI *pCmdUI);

and in my .cpp file :

BEGIN_MESSAGE_MAP(CAppDlg, CDialog)

ON_COMMAND(ID__STOP, OnChoixMenuStop)
ON_UPDATE_COMMAND_UI(ID__STOP, OnUpdateMenuStop)

END_MESSAGE_MAP()

void CAppDlg::OnContextMenu(CWnd* pWnd, CPoint point)
{

CMenu menu;

menu.LoadMenu(IDR_POPUPMENU);
menu.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,point.x, point.y, this);

}


void CAppDlg::OnUpdateMenuStop(CCmdUI *pCmdUI)
{

pCmdUI->Enable(FALSE);

}
I would like to get it grayed or disabled but i can't...
Please if you can help me it would be great !

There is no way to happiness, happiness is the way !
GeneralRe: ON_UPDATE_COMMAND_UI impossible to change the state of items Pin
Archigal15-Nov-04 3:05
Archigal15-Nov-04 3:05 
GeneralRe: ON_UPDATE_COMMAND_UI impossible to change the state of items Pin
madretierra15-Nov-04 3:17
madretierra15-Nov-04 3:17 
GeneralImage Colour Management Pin
apollo-house15-Nov-04 0:48
apollo-house15-Nov-04 0:48 
GeneralEnumDisplaySettings gives wrong values Pin
Ray Adams14-Nov-04 23:48
Ray Adams14-Nov-04 23:48 
GeneralRe: EnumDisplaySettings gives wrong values Pin
Antony M Kancidrowski15-Nov-04 0:33
Antony M Kancidrowski15-Nov-04 0:33 
GeneralRe: EnumDisplaySettings gives wrong values Pin
Ray Adams15-Nov-04 0:46
Ray Adams15-Nov-04 0:46 
GeneralRe: EnumDisplaySettings gives wrong values Pin
Antony M Kancidrowski15-Nov-04 3:02
Antony M Kancidrowski15-Nov-04 3:02 
GeneralRe: EnumDisplaySettings gives wrong values Pin
Ray Adams15-Nov-04 18:03
Ray Adams15-Nov-04 18:03 
GeneralSchewchuk (revised) Pin
Keck14-Nov-04 23:47
Keck14-Nov-04 23:47 
GeneralSharing Database Connection Pin
shiraztk14-Nov-04 23:20
shiraztk14-Nov-04 23:20 
GeneralHelp! need some tutorials on dialogs in an NONE dialog based application Pin
Ibana14-Nov-04 23:01
Ibana14-Nov-04 23:01 
GeneralRe: Help! need some tutorials on dialogs in an NONE dialog based application Pin
shiraztk15-Nov-04 0:02
shiraztk15-Nov-04 0:02 
GeneralRe: Help! need some tutorials on dialogs in an NONE dialog based application Pin
Michael P Butler15-Nov-04 0:18
Michael P Butler15-Nov-04 0:18 
GeneralA C++ programming question Pin
ting66814-Nov-04 22:56
ting66814-Nov-04 22:56 
GeneralRe: A C++ programming question Pin
Andrew Walker14-Nov-04 23:10
Andrew Walker14-Nov-04 23:10 
GeneralRe: A C++ programming question Pin
shiraztk14-Nov-04 23:12
shiraztk14-Nov-04 23:12 
Generalcorrect me if i'm wrong Pin
Budric B.15-Nov-04 5:33
Budric B.15-Nov-04 5:33 

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.