Click here to Skip to main content
15,889,116 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
Saurabh.Garg31-Mar-08 21:33
Saurabh.Garg31-Mar-08 21:33 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
kutti31-Mar-08 21:35
kutti31-Mar-08 21:35 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
Saurabh.Garg31-Mar-08 22:48
Saurabh.Garg31-Mar-08 22:48 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
kutti31-Mar-08 22:54
kutti31-Mar-08 22:54 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
Saurabh.Garg31-Mar-08 23:23
Saurabh.Garg31-Mar-08 23:23 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
kutti1-Apr-08 2:25
kutti1-Apr-08 2:25 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
Saurabh.Garg1-Apr-08 4:07
Saurabh.Garg1-Apr-08 4:07 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
kutti8-Apr-08 1:48
kutti8-Apr-08 1:48 
now i can able to check and uncheck only for the first time.

Following is the code of COMMAND event handler which do that,

<br />
  <br />
  UINT state = submenu->GetMenuState(ID_TEST_MAINSTREAM, MF_BYCOMMAND);<br />
<br />
  if (state & MF_CHECKED)<br />
  {<br />
      nRet = submenu->CheckMenuItem(2,MF_BYPOSITION |MF_UNCHECKED);	<br />
  }<br />
    else<br />
    {<br />
	nRet = submenu->CheckMenuItem(2, MF_BYPOSITION|MF_CHECKED);<br />
    }<br />
	<br />
   UINT state2 = submenu->GetMenuState(2, MF_BYPOSITION);<br />
<br />


In first click, the menu item state is changed.
when i check the value of state2 variable, it is 0 .
when I click the same menu item next time, GetMenuState() returns 8.

why the checking state of the menu item is not updating ?
QuestionRe: check/ uncheck menu item in a pop up menu Pin
David Crow1-Apr-08 3:41
David Crow1-Apr-08 3:41 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
Hamid_RT7-Apr-08 2:57
Hamid_RT7-Apr-08 2:57 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
kutti7-Apr-08 18:12
kutti7-Apr-08 18:12 
GeneralConnecting SQL Server DB in C++/VC++ Pin
Sgg24531-Mar-08 19:58
Sgg24531-Mar-08 19:58 
QuestionRe: Connecting SQL Server DB in C++/VC++ Pin
CPallini31-Mar-08 21:47
mveCPallini31-Mar-08 21:47 
QuestionRe: Connecting SQL Server DB in C++/VC++ Pin
David Crow1-Apr-08 3:43
David Crow1-Apr-08 3:43 
GeneralRe: Connecting SQL Server DB in C++/VC++ Pin
Hamid_RT7-Apr-08 2:56
Hamid_RT7-Apr-08 2:56 
Questionclosing and reopening exploere.exe using win32 or anyother language Pin
Jach Mullan31-Mar-08 19:53
Jach Mullan31-Mar-08 19:53 
GeneralRe: closing and reopening exploere.exe using win32 or anyother language Pin
Nibu babu thomas31-Mar-08 20:48
Nibu babu thomas31-Mar-08 20:48 
Questionhiding the taskbar icons using win32 Pin
Jach Mullan31-Mar-08 19:50
Jach Mullan31-Mar-08 19:50 
GeneralRe: hiding the taskbar icons using win32 [modified] Pin
Nibu babu thomas31-Mar-08 21:34
Nibu babu thomas31-Mar-08 21:34 
QuestionPossible to load swf in resource? Pin
manish.patel31-Mar-08 19:32
manish.patel31-Mar-08 19:32 
GeneralRe: Possible to load swf in resource? Pin
Mark Salsbery1-Apr-08 6:55
Mark Salsbery1-Apr-08 6:55 
GeneralRe: Possible to load swf in resource? Pin
manish.patel1-Apr-08 18:17
manish.patel1-Apr-08 18:17 
GeneralRe: Possible to load swf in resource? Pin
Mark Salsbery1-Apr-08 19:00
Mark Salsbery1-Apr-08 19:00 
GeneralDisabling Standard buttons in propertysheet Pin
Gita.Bairavi31-Mar-08 18:57
Gita.Bairavi31-Mar-08 18:57 
QuestionHow to cal a PropertySheet inside a PropertySheet Pin
Gita.Bairavi31-Mar-08 18:13
Gita.Bairavi31-Mar-08 18:13 

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.