Click here to Skip to main content
15,846,342 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
Saurabh.Garg31-Mar-08 22:33
Saurabh.Garg31-Mar-08 22:33 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
kutti31-Mar-08 22:35
kutti31-Mar-08 22:35 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
Saurabh.Garg31-Mar-08 23:48
Saurabh.Garg31-Mar-08 23:48 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
kutti31-Mar-08 23:54
kutti31-Mar-08 23:54 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
Saurabh.Garg1-Apr-08 0:23
Saurabh.Garg1-Apr-08 0:23 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
kutti1-Apr-08 3:25
kutti1-Apr-08 3:25 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
Saurabh.Garg1-Apr-08 5:07
Saurabh.Garg1-Apr-08 5:07 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
kutti8-Apr-08 2:48
kutti8-Apr-08 2: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 4:41
David Crow1-Apr-08 4:41 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
Hamid_RT7-Apr-08 3:57
Hamid_RT7-Apr-08 3:57 
GeneralRe: check/ uncheck menu item in a pop up menu Pin
kutti7-Apr-08 19:12
kutti7-Apr-08 19:12 
GeneralConnecting SQL Server DB in C++/VC++ Pin
Sgg24531-Mar-08 20:58
Sgg24531-Mar-08 20:58 
QuestionRe: Connecting SQL Server DB in C++/VC++ Pin
CPallini31-Mar-08 22:47
mveCPallini31-Mar-08 22:47 
QuestionRe: Connecting SQL Server DB in C++/VC++ Pin
David Crow1-Apr-08 4:43
David Crow1-Apr-08 4:43 
GeneralRe: Connecting SQL Server DB in C++/VC++ Pin
Hamid_RT7-Apr-08 3:56
Hamid_RT7-Apr-08 3:56 
Questionclosing and reopening exploere.exe using win32 or anyother language Pin
Jach Mullan31-Mar-08 20:53
Jach Mullan31-Mar-08 20:53 
GeneralRe: closing and reopening exploere.exe using win32 or anyother language Pin
Nibu babu thomas31-Mar-08 21:48
Nibu babu thomas31-Mar-08 21:48 
Questionhiding the taskbar icons using win32 Pin
Jach Mullan31-Mar-08 20:50
Jach Mullan31-Mar-08 20:50 
GeneralRe: hiding the taskbar icons using win32 [modified] Pin
Nibu babu thomas31-Mar-08 22:34
Nibu babu thomas31-Mar-08 22:34 
QuestionPossible to load swf in resource? Pin
manish.patel31-Mar-08 20:32
manish.patel31-Mar-08 20:32 
GeneralRe: Possible to load swf in resource? Pin
Mark Salsbery1-Apr-08 7:55
Mark Salsbery1-Apr-08 7:55 
GeneralRe: Possible to load swf in resource? Pin
manish.patel1-Apr-08 19:17
manish.patel1-Apr-08 19:17 
GeneralRe: Possible to load swf in resource? Pin
Mark Salsbery1-Apr-08 20:00
Mark Salsbery1-Apr-08 20:00 
GeneralDisabling Standard buttons in propertysheet Pin
Gita.Bairavi31-Mar-08 19:57
Gita.Bairavi31-Mar-08 19:57 
QuestionHow to cal a PropertySheet inside a PropertySheet Pin
Gita.Bairavi31-Mar-08 19:13
Gita.Bairavi31-Mar-08 19: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.