Click here to Skip to main content
15,919,879 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Testing for empty C-Style string... Pin
PJ Arends21-Nov-05 12:11
professionalPJ Arends21-Nov-05 12:11 
GeneralRe: Testing for empty C-Style string... Pin
Blake Miller22-Nov-05 4:25
Blake Miller22-Nov-05 4:25 
AnswerRe: Testing for empty C-Style string... Pin
toxcct21-Nov-05 22:22
toxcct21-Nov-05 22:22 
AnswerRe: Testing for empty C-Style string... Pin
Owner drawn22-Nov-05 1:11
Owner drawn22-Nov-05 1:11 
AnswerRe: Testing for empty C-Style string... Pin
wboncal22-Nov-05 7:59
wboncal22-Nov-05 7:59 
QuestionHow to print content of a CRichEditCtrl to a Rect Pin
AnTri21-Nov-05 9:43
AnTri21-Nov-05 9:43 
AnswerRe: How to print content of a CRichEditCtrl to a Rect Pin
Aamir Butt21-Nov-05 21:21
Aamir Butt21-Nov-05 21:21 
QuestionCheck box next to selected menu items Pin
NYTSX21-Nov-05 9:05
NYTSX21-Nov-05 9:05 
Hello,

I have a dialog app with a menu that allows the user to bring up different windows as they wish. I remember seeing a tutorial/article that had an easy way of placing a check mark next to the menu option that was already selected. (Essentially having the window being displayed already)

Can someone point me to this article.

Currently I am using this code that I had copied way back when(It dies on the first line, even though it works on my older app):

void CMyDialog::CheckMenu(int checked) <br />
{<br />
	CMenu* pMainMenu = GetParent()->GetMenu();<br />
	<br />
	// the menu position in the menu<br />
	CMenu* pSubmenu = pMainMenu->GetSubMenu(2);<br />
		<br />
	// vertical item position<br />
	UINT g = pSubmenu->GetMenuItemID(1); <br />
	<br />
	CString mnustr;<br />
	<br />
	pSubmenu->GetMenuString(1, mnustr, MF_BYPOSITION); <br />
	<br />
<br />
	if (checked) <br />
		pSubmenu->ModifyMenu(1, MF_BYPOSITION | MF_STRING | MF_CHECKED, g, mnustr);<br />
	else <br />
		pSubmenu->ModifyMenu(1, MF_BYPOSITION | MF_STRING | MF_DISABLED, g, mnustr);<br />
}


Thanks!

-- modified at 15:06 Monday 21st November, 2005
AnswerRe: Check box next to selected menu items Pin
Maximilien21-Nov-05 9:24
Maximilien21-Nov-05 9:24 
GeneralRe: Check box next to selected menu items Pin
NYTSX21-Nov-05 9:30
NYTSX21-Nov-05 9:30 
AnswerRe: Check box next to selected menu items Pin
NYTSX22-Nov-05 1:53
NYTSX22-Nov-05 1:53 
QuestionDebugging DLL problem Pin
Bob Stanneveld21-Nov-05 7:57
Bob Stanneveld21-Nov-05 7:57 
AnswerRe: Debugging DLL problem Pin
douglasjordan21-Nov-05 8:13
douglasjordan21-Nov-05 8:13 
GeneralRe: Debugging DLL problem Pin
Bob Stanneveld21-Nov-05 9:16
Bob Stanneveld21-Nov-05 9:16 
AnswerRe: Debugging DLL problem Pin
Chris Meech21-Nov-05 8:22
Chris Meech21-Nov-05 8:22 
GeneralRe: Debugging DLL problem Pin
Bob Stanneveld21-Nov-05 9:18
Bob Stanneveld21-Nov-05 9:18 
AnswerRe: Debugging DLL problem Pin
Chris Losinger21-Nov-05 8:26
professionalChris Losinger21-Nov-05 8:26 
GeneralRe: Debugging DLL problem Pin
Bob Stanneveld21-Nov-05 9:20
Bob Stanneveld21-Nov-05 9:20 
GeneralRe: Debugging DLL problem Pin
Chris Losinger21-Nov-05 9:27
professionalChris Losinger21-Nov-05 9:27 
GeneralRe: Debugging DLL problem Pin
Bob Stanneveld21-Nov-05 9:38
Bob Stanneveld21-Nov-05 9:38 
QuestionLRU &amp; FIFO Pin
Jeannie Brown21-Nov-05 6:01
Jeannie Brown21-Nov-05 6:01 
AnswerRe: LRU &amp;amp; FIFO Pin
toxcct21-Nov-05 6:21
toxcct21-Nov-05 6:21 
QuestionCan I call a DLL which was created from VB.net? Pin
ATC21-Nov-05 5:01
ATC21-Nov-05 5:01 
AnswerRe: Can I call a DLL which was created from VB.net? Pin
toxcct21-Nov-05 5:08
toxcct21-Nov-05 5:08 
GeneralRe: Can I call a DLL which was created from VB.net? Pin
ATC21-Nov-05 7:36
ATC21-Nov-05 7:36 

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.