Click here to Skip to main content
15,886,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Corrected Version. Pin
Andrew Brock12-Jan-11 19:37
Andrew Brock12-Jan-11 19:37 
GeneralRe: While Statement Issue. Pin
Andrew Brock12-Jan-11 19:31
Andrew Brock12-Jan-11 19:31 
AnswerRe: While Statement Issue. Pin
Luc Pattyn12-Jan-11 18:05
sitebuilderLuc Pattyn12-Jan-11 18:05 
GeneralRe: While Statement Issue. Pin
Mike Certini12-Jan-11 18:17
Mike Certini12-Jan-11 18:17 
QuestionDisabling popup menu item Pin
David Crow12-Jan-11 8:01
David Crow12-Jan-11 8:01 
AnswerRe: Disabling popup menu item PinPopular
User 742933812-Jan-11 8:29
professionalUser 742933812-Jan-11 8:29 
GeneralRe: Disabling popup menu item [SOLVED] Pin
David Crow12-Jan-11 8:54
David Crow12-Jan-11 8:54 
AnswerRe: Disabling popup menu item Pin
Niklas L12-Jan-11 21:18
Niklas L12-Jan-11 21:18 
If you want to use your regular OnUpdateBlaBla functions, you could do something like
// Mimic OnUpdate... for each item.
CCmdUI cmdUI;
cmdUI.m_pMenu = pPopup;
cmdUI.m_pSubMenu = NULL;
cmdUI.m_nIndexMax = pPopup->GetMenuItemCount();
for (int i = 0; i < pPopup->GetMenuItemCount(); ++i)
{
	cmdUI.m_nID = pPopup->GetMenuItemID(i);
	if (cmdUI.m_nID != ID_SEPARATOR)
	{
		cmdUI.m_nIndex = i;
		cmdUI.DoUpdate(this, cmdUI.m_nID < 0xF000);
	}
}

before calling TrackPopupMenu. This makes life easier if you have the same command in another menu and or toolbar button. Then you only need to maintain the logic in the OnUpdateBlaBla functions.

QuestionRe: Disabling popup menu item Pin
David Crow14-Jan-11 3:20
David Crow14-Jan-11 3:20 
AnswerRe: Disabling popup menu item [modified] Pin
Niklas L16-Jan-11 20:47
Niklas L16-Jan-11 20:47 
AnswerRe: Disabling popup menu item Pin
JohnCz14-Jan-11 12:56
JohnCz14-Jan-11 12:56 
Questionpreallocating logging files for performance purposes Pin
Alan Kurlansky12-Jan-11 4:36
Alan Kurlansky12-Jan-11 4:36 
AnswerRe: preallocating logging files for performance purposes Pin
Richard MacCutchan12-Jan-11 5:05
mveRichard MacCutchan12-Jan-11 5:05 
AnswerRe: preallocating logging files for performance purposes [modified] Pin
Andrew Brock12-Jan-11 5:15
Andrew Brock12-Jan-11 5:15 
AnswerRe: preallocating logging files for performance purposes Pin
jschell12-Jan-11 8:39
jschell12-Jan-11 8:39 
Questionhow to show bookmarks in a popupmenu? Pin
yogish29312-Jan-11 0:47
yogish29312-Jan-11 0:47 
AnswerRe: how to show bookmarks in a popupmenu? Pin
Richard MacCutchan12-Jan-11 1:09
mveRichard MacCutchan12-Jan-11 1:09 
GeneralRe: how to show bookmarks in a popupmenu? Pin
yogish29312-Jan-11 1:38
yogish29312-Jan-11 1:38 
GeneralRe: how to show bookmarks in a popupmenu? Pin
Richard MacCutchan12-Jan-11 1:42
mveRichard MacCutchan12-Jan-11 1:42 
GeneralRe: how to show bookmarks in a popupmenu? Pin
yogish29312-Jan-11 1:57
yogish29312-Jan-11 1:57 
GeneralRe: how to show bookmarks in a popupmenu? Pin
Richard MacCutchan12-Jan-11 2:20
mveRichard MacCutchan12-Jan-11 2:20 
GeneralRe: how to show bookmarks in a popupmenu? Pin
Maximilien12-Jan-11 2:54
Maximilien12-Jan-11 2:54 
AnswerRe: how to show bookmarks in a popupmenu? Pin
User 742933812-Jan-11 1:14
professionalUser 742933812-Jan-11 1:14 
QuestionHow to create a Floating Image over another Image ? Pin
002comp12-Jan-11 0:46
002comp12-Jan-11 0:46 
AnswerRe: How to create a Floating Image over another Image ? Pin
Cool_Dev12-Jan-11 1:23
Cool_Dev12-Jan-11 1:23 

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.