Click here to Skip to main content
15,897,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalrealloc(...) like function in C++ Pin
_moved20-Mar-04 9:46
_moved20-Mar-04 9:46 
GeneralRe: realloc(...) like function in C++ Pin
Neville Franks20-Mar-04 10:58
Neville Franks20-Mar-04 10:58 
GeneralRe: realloc(...) like function in C++ Pin
_moved20-Mar-04 11:18
_moved20-Mar-04 11:18 
GeneralRe: realloc(...) like function in C++ Pin
Ravi Bhavnani20-Mar-04 11:18
professionalRavi Bhavnani20-Mar-04 11:18 
GeneralVery mysterious socket behaviour Pin
Daniel 'Tak' M.20-Mar-04 9:35
Daniel 'Tak' M.20-Mar-04 9:35 
GeneralRe: Very mysterious socket behaviour Pin
bilal7821-Mar-04 23:35
bilal7821-Mar-04 23:35 
GeneralRe: Very mysterious socket behaviour Pin
Daniel 'Tak' M.22-Mar-04 5:49
Daniel 'Tak' M.22-Mar-04 5:49 
GeneralAdding sub menus to a menu Pin
Daniel132420-Mar-04 8:49
Daniel132420-Mar-04 8:49 
Heres what I have...

<br />
{<br />
	CMenu menu;<br />
<br />
	menu.CreatePopupMenu();<br />
<br />
	for (int x = 0; x < ndex; x++)<br />
	{<br />
		Swap = StrArr.GetAt(x);<br />
		if (Swap != "Main")<br />
			menu.AppendMenu(MF_STRING, x, Swap);<br />
	}<br />
<br />
	CPoint point;<br />
	GetCursorPos(&point);<br />
	SetForegroundWindow();<br />
	int Sel = TrackPopupMenuEx(menu.GetSafeHmenu(), TPM_RETURNCMD, point.x, point.y, GetSafeHwnd(), NULL); <br />
	PostMessage(WM_NULL, 0, 0);<br />
	menu.DestroyMenu();<br />
}<br />



I've deleted variable declarations and some code to save space.

With the AppendMenu(), I'm of course adding menu items. What I want to do is add sub menus to each of these menu items.

Instead of clicking on an item and executing a function, I want a sub menu to pop up. Can't figure out how to do it.

Any help?

Thanks!
Daniel
GeneralRe: Adding sub menus to a menu Pin
Antti Keskinen20-Mar-04 23:45
Antti Keskinen20-Mar-04 23:45 
Generallarge and lower case Pin
Lucky200220-Mar-04 6:59
Lucky200220-Mar-04 6:59 
GeneralRe: large and lower case Pin
Ravi Bhavnani20-Mar-04 7:29
professionalRavi Bhavnani20-Mar-04 7:29 
GeneralWindows Master Volume control Pin
impeham20-Mar-04 6:48
impeham20-Mar-04 6:48 
GeneralRe: Windows Master Volume control Pin
Ravi Bhavnani20-Mar-04 7:30
professionalRavi Bhavnani20-Mar-04 7:30 
GeneralUpload Data via HTTP..VC++ Pin
rasha200320-Mar-04 5:05
rasha200320-Mar-04 5:05 
GeneralKnowing with Network Interface will be used Pin
mmica20-Mar-04 4:52
mmica20-Mar-04 4:52 
GeneralRe: Knowing with Network Interface will be used Pin
Roger Wright20-Mar-04 6:57
professionalRoger Wright20-Mar-04 6:57 
QuestionHow could I make folder as Public Share in windows98 system? Pin
.NetRams19-Mar-04 18:50
.NetRams19-Mar-04 18:50 
GeneralMFC Edit Controls. Pin
Ichiban_Addict19-Mar-04 17:11
Ichiban_Addict19-Mar-04 17:11 
GeneralRe: MFC Edit Controls. Pin
l a u r e n19-Mar-04 17:27
l a u r e n19-Mar-04 17:27 
GeneralRe: MFC Edit Controls. Pin
Ravi Bhavnani20-Mar-04 7:32
professionalRavi Bhavnani20-Mar-04 7:32 
GeneralRe: MFC Edit Controls. Pin
MeterMan21-Mar-04 15:54
MeterMan21-Mar-04 15:54 
GeneralRe: MFC Edit Controls. Pin
Ichiban_Addict21-Mar-04 16:08
Ichiban_Addict21-Mar-04 16:08 
GeneralRe: MFC Edit Controls. Pin
MeterMan21-Mar-04 18:07
MeterMan21-Mar-04 18:07 
GeneralStatus bar gripper Pin
sschilachi19-Mar-04 13:36
sschilachi19-Mar-04 13:36 
GeneralRe: Status bar gripper Pin
_moved20-Mar-04 12:39
_moved20-Mar-04 12:39 

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.