Click here to Skip to main content
15,917,061 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to convert a integer value to CString Pin
Nitron14-May-04 8:31
Nitron14-May-04 8:31 
AnswerRe: How to convert a integer value to CString: (Ans: CString::Format) Pin
huaiyeu14-May-04 8:41
huaiyeu14-May-04 8:41 
QuestionHow to create a new codec for Windows Media Player... Pin
JSVachon14-May-04 6:31
JSVachon14-May-04 6:31 
AnswerRe: How to create a new codec for Windows Media Player... Pin
Alexander M.,14-May-04 8:05
Alexander M.,14-May-04 8:05 
GeneralRe: How to create a new codec for Windows Media Player... Pin
JSVachon14-May-04 10:01
JSVachon14-May-04 10:01 
GeneralRe: How to create a new codec for Windows Media Player... Pin
Member 42102515-May-04 7:08
Member 42102515-May-04 7:08 
GeneralRe: How to create a new codec for Windows Media Player... Pin
JSVachon17-May-04 5:13
JSVachon17-May-04 5:13 
General[MFC] Menu headaches Pin
Maarten Kools14-May-04 6:27
professionalMaarten Kools14-May-04 6:27 
Hi. I'm translating some menu options and I'm running into a problem with it.

I have this menu item, which is a popup menu, inside the Edit menu.

For setting menu item text, I have made the following function:
ASSERT( pMenu != NULL);
ASSERT( ::IsMenu( pMenu->GetSafeHmenu()) != FALSE);

UINT nFlags = pMenu->GetMenuState( nPos, MF_BYPOSITION);
UINT_PTR nNewID = 0;
if( nFlags & MF_POPUP)
{
    CMenu *pSubMenu = pMenu->GetSubMenu( nPos);
    ASSERT_VALID( pSubMenu);
    nNewID = (UINT_PTR)pSubMenu->GetSafeHmenu();
}
else
{
    nNewID = pMenu->GetMenuItemID( nPos);
}

return (pMenu->ModifyMenu( nPos, nFlags | MF_BYPOSITION, nNewID, inText) != 0);

This function works fine, I've been using the same function to translate some other menu items (I've added an item next to file, edit, etc.).

But for some reason these other menu options end up being empty. But when I try to retrieve the text, with GetMenuString, it shows what I entered in the resource... now, what the heck am I doing wrong here??
GeneralRe: [MFC] Menu headaches Pin
Roger Allen14-May-04 6:47
Roger Allen14-May-04 6:47 
GeneralRe: [MFC] Menu headaches Pin
Maarten Kools14-May-04 7:14
professionalMaarten Kools14-May-04 7:14 
GeneralRe: [MFC] Menu headaches Pin
Roger Allen14-May-04 23:53
Roger Allen14-May-04 23:53 
GeneralRe: [MFC] Menu headaches Pin
Maarten Kools15-May-04 6:27
professionalMaarten Kools15-May-04 6:27 
Question4 Direction Spin Control, how? Pin
mound14-May-04 5:27
mound14-May-04 5:27 
AnswerRe: 4 Direction Spin Control, how? Pin
David Crow14-May-04 5:39
David Crow14-May-04 5:39 
GeneralRe: 4 Direction Spin Control, how? Pin
mound14-May-04 5:48
mound14-May-04 5:48 
GeneralRe: 4 Direction Spin Control, how? Pin
David Crow19-May-04 4:14
David Crow19-May-04 4:14 
GeneralRe: 4 Direction Spin Control, how? Pin
mound20-May-04 4:11
mound20-May-04 4:11 
GeneralRe: 4 Direction Spin Control, how? Pin
David Crow20-May-04 4:20
David Crow20-May-04 4:20 
QuestionHow to launch "My Computer"? Pin
Abin14-May-04 5:15
Abin14-May-04 5:15 
AnswerRe: How to launch "My Computer"? Pin
David Crow14-May-04 5:33
David Crow14-May-04 5:33 
AnswerRe: How to launch "My Computer"? Pin
perminder9029-Jun-11 2:33
perminder9029-Jun-11 2:33 
GeneralMSComm Pin
ketil b14-May-04 5:06
ketil b14-May-04 5:06 
GeneralRe: MSComm Pin
Member 42102514-May-04 14:42
Member 42102514-May-04 14:42 
GeneralRe: MSComm Pin
Anonymous15-May-04 4:24
Anonymous15-May-04 4:24 
Questionhow to get current identity Pin
ravjak14-May-04 4:23
ravjak14-May-04 4: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.