Click here to Skip to main content
15,911,360 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionVectors :( Pin
Eytukan6-Sep-05 2:05
Eytukan6-Sep-05 2:05 
AnswerRe: Vectors Pin
toxcct6-Sep-05 2:22
toxcct6-Sep-05 2:22 
GeneralRe: Vectors Pin
Eytukan6-Sep-05 4:02
Eytukan6-Sep-05 4:02 
GeneralRe: Vectors Pin
Eytukan6-Sep-05 4:05
Eytukan6-Sep-05 4:05 
AnswerRe: Vectors :( Pin
Roland Pibinger6-Sep-05 8:03
Roland Pibinger6-Sep-05 8:03 
GeneralRe: Vectors :( Pin
Bob Stanneveld6-Sep-05 8:40
Bob Stanneveld6-Sep-05 8:40 
GeneralRe: Vectors :( Pin
markkuk6-Sep-05 12:14
markkuk6-Sep-05 12:14 
QuestionMFC Menu checked on Doc/View app? Pin
lordgreg6-Sep-05 0:58
lordgreg6-Sep-05 0:58 
hi all,..

i'm creating a Doc/View program (single window). this program also has a menu (IDR_MAINFRAME), which looks like this:

[ my_program ]<br />
[ some option ] br />
[ 2nd option ] br />
[ submenu ] br />
    |- [ option_to_check ]<br />
    '- [ another_option_to_check ]<br />
[ exit_option ]


and, i created a handler which runs when i click on "another_option_to_check". when i do that, i would like to UNCHECK "option_to_check" and CHECK another_option_to_check or vice versa if 2nd option is checked.

i tried to do it like this:

<br />
void CVsebnostniTestView::OnMenuRisanjeTocke()<br />
{<br />
	// TODO: Add your command handler code here<br />
<br />
<br />
	CMenu* mmenu;<br />
	mmenu = GetMenu();<br />
<br />
	if( mmenu->GetMenuState(ID_RISANJE_MNOGOKOTNIK, MF_CHECKED) )<br />
		MessageBox( "Option checked!" );<br />
	else<br />
		MessageBox( "Option unchecked!" );<br />
<br />
}<br />


ID_RISANJE_MNOGOKOTNIK = id from option_to_check option in menu.

i also tried with CMenu* mmenu, and then submenu(3) etc. and even that didn't work. what am i doing wrong then?

i would really apretiate any help offered.

thanks and best regards Wink | ;)
AnswerRe: MFC Menu checked on Doc/View app? Pin
Bob Ciora6-Sep-05 7:51
Bob Ciora6-Sep-05 7:51 
GeneralRe: MFC Menu checked on Doc/View app? Pin
lordgreg6-Sep-05 21:47
lordgreg6-Sep-05 21:47 
QuestionRe: MFC Menu checked on Doc/View app? Pin
David Crow6-Jan-11 6:41
David Crow6-Jan-11 6:41 
QuestionMultiple selections in CTreeCtrl Pin
uma_kanth_k6-Sep-05 0:24
uma_kanth_k6-Sep-05 0:24 
GeneralRe: Multiple selections in CTreeCtrl Pin
prasad_som6-Sep-05 0:55
prasad_som6-Sep-05 0:55 
Questionwhat is %ld Pin
Member 21610045-Sep-05 23:52
Member 21610045-Sep-05 23:52 
AnswerRe: what is %ld Pin
toxcct5-Sep-05 23:57
toxcct5-Sep-05 23:57 
QuestionCHtmlEditView and MSHTML usage Pin
sotiris5-Sep-05 23:39
sotiris5-Sep-05 23:39 
Questiontrouble with UpdateAllViews() Pin
/*Trucker*\5-Sep-05 23:09
/*Trucker*\5-Sep-05 23:09 
AnswerRe: trouble with UpdateAllViews() Pin
MailtoGops6-Sep-05 2:30
MailtoGops6-Sep-05 2:30 
GeneralRe: trouble with UpdateAllViews() Pin
/*Trucker*\6-Sep-05 9:49
/*Trucker*\6-Sep-05 9:49 
AnswerRe: trouble with UpdateAllViews() Pin
David Crow6-Sep-05 4:31
David Crow6-Sep-05 4:31 
GeneralRe: trouble with UpdateAllViews() Pin
/*Trucker*\6-Sep-05 9:24
/*Trucker*\6-Sep-05 9:24 
GeneralRe: trouble with UpdateAllViews() Pin
David Crow6-Sep-05 9:49
David Crow6-Sep-05 9:49 
GeneralRe: trouble with UpdateAllViews() Pin
/*Trucker*\6-Sep-05 10:00
/*Trucker*\6-Sep-05 10:00 
GeneralRe: trouble with UpdateAllViews() Pin
David Crow7-Sep-05 3:47
David Crow7-Sep-05 3:47 
QuestionHow to use CRecordset with CByteArray for storing BLOBs Pin
snprani5-Sep-05 23:08
snprani5-Sep-05 23:08 

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.