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

C / C++ / MFC

 
GeneralRe: MFC Printing Pin
Steve S29-Oct-03 22:39
Steve S29-Oct-03 22:39 
GeneralControl window sizing... Pin
Nitron29-Oct-03 8:26
Nitron29-Oct-03 8:26 
GeneralNevermind... Pin
Nitron29-Oct-03 8:55
Nitron29-Oct-03 8:55 
GeneralRe: Nevermind... Pin
winalice29-Oct-03 9:37
winalice29-Oct-03 9:37 
GeneralRe: Nevermind... Pin
Nitron29-Oct-03 9:39
Nitron29-Oct-03 9:39 
GeneralRe: Control window sizing... Pin
winalice29-Oct-03 9:36
winalice29-Oct-03 9:36 
GeneralRe: Control window sizing... Pin
David Crow29-Oct-03 10:19
David Crow29-Oct-03 10:19 
QuestionMerging menus? Pin
Dominik Reichl29-Oct-03 8:22
Dominik Reichl29-Oct-03 8:22 
Hello!

Assume this: you have a popup menu and a main menu. Now I want to "copy" the popup menu items into a specific submenu of the main menu.

I tried this:
m_popmenu.LoadMenu(IDR_PWLIST_MENU);
CMenu *pDest = m_menu.GetSubMenu(1);
CMenu *pSrc = m_popmenu.GetSubMenu(0);
UINT i = 0;
UINT uState, uID;
CString str;
for(i = 0; i < pSrc->GetMenuItemCount(); i++)
{
    uID = pSrc->GetMenuItemID(i);
    uState = pSrc->GetMenuState(i, MF_BYPOSITION);
    pSrc->GetMenuString(i, str, MF_BYPOSITION);
    pDest->AppendMenu(uState, uID, (LPCTSTR)str);
}
m_popmenu.DestroyMenu();
But unfortunately this doesn't work correctly... It copies the items to the main menu but without text and the command ID or item ID is lost somehow...

What am I doing wrong? How would you merge two menus?

Confused | :confused:
Dominik



_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? Wink | ;)
(doesn't work on NT)

AnswerRe: Merging menus? Pin
igor196029-Oct-03 10:45
igor196029-Oct-03 10:45 
GeneralCreateWindowEx is stupid and nonsensical Pin
super_matt29-Oct-03 7:56
super_matt29-Oct-03 7:56 
GeneralRe: CreateWindowEx is stupid and nonsensical Pin
alex.barylski29-Oct-03 10:03
alex.barylski29-Oct-03 10:03 
GeneralRe: CreateWindowEx is stupid and nonsensical Pin
super_matt29-Oct-03 11:17
super_matt29-Oct-03 11:17 
GeneralRe: CreateWindowEx is stupid and nonsensical Pin
Steve S29-Oct-03 22:43
Steve S29-Oct-03 22:43 
GeneralRe: CreateWindowEx is stupid and nonsensical Pin
David Crow30-Oct-03 2:18
David Crow30-Oct-03 2:18 
GeneralRe: CreateWindowEx is stupid and nonsensical Pin
Steve S30-Oct-03 4:49
Steve S30-Oct-03 4:49 
GeneralRe: CreateWindowEx is stupid and nonsensical Pin
David Crow30-Oct-03 2:20
David Crow30-Oct-03 2:20 
GeneralRe: CreateWindowEx is stupid and nonsensical Pin
super_matt30-Oct-03 7:50
super_matt30-Oct-03 7:50 
GeneralHelp - COM Ports Pin
raheela29-Oct-03 7:12
raheela29-Oct-03 7:12 
GeneralRe: Help - COM Ports Pin
David Crow29-Oct-03 7:26
David Crow29-Oct-03 7:26 
GeneralVisual C++.net Removing Member Variable Pin
mfcuser29-Oct-03 6:48
mfcuser29-Oct-03 6:48 
GeneralRe: Visual C++.net Removing Member Variable Pin
Peter Molnar29-Oct-03 13:53
Peter Molnar29-Oct-03 13:53 
Questionhow to get a list of ALL the truetype fonts Pin
JP GOBLET29-Oct-03 6:43
JP GOBLET29-Oct-03 6:43 
AnswerRe: how to get a list of ALL the truetype fonts Pin
David Crow29-Oct-03 7:21
David Crow29-Oct-03 7:21 
GeneralRe: how to get a list of ALL the truetype fonts Pin
JP GOBLET29-Oct-03 21:29
JP GOBLET29-Oct-03 21:29 
GeneralCHtmlView Pin
includeh1029-Oct-03 6:36
includeh1029-Oct-03 6: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.