Click here to Skip to main content
15,918,168 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Checking an Application Pin
Peter Weyzen7-Jul-03 21:29
Peter Weyzen7-Jul-03 21:29 
Generalreserved words in VC 6 Pin
sharlila5-Jul-03 0:31
sharlila5-Jul-03 0:31 
GeneralRe: reserved words in VC 6 Pin
Ryan Binns5-Jul-03 0:46
Ryan Binns5-Jul-03 0:46 
GeneralRe: reserved words in VC 6 Pin
sharlila5-Jul-03 1:36
sharlila5-Jul-03 1:36 
Generalactually I am wrong Pin
sharlila5-Jul-03 1:40
sharlila5-Jul-03 1:40 
GeneralRe: reserved words in VC 6 Pin
Ryan Binns5-Jul-03 1:41
Ryan Binns5-Jul-03 1:41 
Generalok, thanks :-) Pin
sharlila5-Jul-03 1:53
sharlila5-Jul-03 1:53 
QuestionChange menu items texts? Pin
Dominik Reichl4-Jul-03 23:27
Dominik Reichl4-Jul-03 23:27 
Hello,

I am trying to dynamically change the texts of the menu items of my main menu. The program should translate the menu items to the local language at runtime. I am using the BCMenu class:

UINT nItem = 0;
CString strItem;
CString strNew;
char *pszSrc = NULL;
while(1)
{
    if(m_menu.GetMenuText(nItem, strItem, MF_BYPOSITION) == FALSE) break;

    pszSrc = strItem.LockBuffer();
    strNew = TRL(pszSrc);
    strItem.UnlockBuffer();
    if(m_menu.SetMenuText(nItem, strNew, MF_BYPOSITION) == FALSE) { ASSERT(FALSE); }

    MessageBox(strItem + " -> " + strNew);

    nItem++;
}

m_bMenu = SetMenu(&m_menu);
ASSERT(m_bMenu == TRUE);
The TRL function takes a char * as input and returns a char * to the translated string. This works very well as one can see in the dislayed message box (strItem+"->"+strNew).

The items are translated correctly, but the menu doesn't change. The menu items remain english, untranslated. But the SetMenuText function returns TRUE...

Any idea what is going on? Confused | :confused:
-Dominik



_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? Wink | ;)

AnswerRe: Change menu items texts? Pin
Ryan Binns4-Jul-03 23:45
Ryan Binns4-Jul-03 23:45 
GeneralRe: Change menu items texts? Pin
Dominik Reichl4-Jul-03 23:57
Dominik Reichl4-Jul-03 23:57 
GeneralQuestion about the DHTML editing control Pin
Scozturk4-Jul-03 21:10
professionalScozturk4-Jul-03 21:10 
GeneralMFC Learning Pin
SheheerZahid4-Jul-03 21:07
SheheerZahid4-Jul-03 21:07 
GeneralRe: MFC Learning Pin
Ryan Binns4-Jul-03 21:20
Ryan Binns4-Jul-03 21:20 
GeneralRe: MFC Learning Pin
Michael Dunn5-Jul-03 5:27
sitebuilderMichael Dunn5-Jul-03 5:27 
GeneralRe: MFC Learning Pin
Ryan Binns5-Jul-03 13:56
Ryan Binns5-Jul-03 13:56 
GeneralRe: MFC Learning...Thanks a lot indeed Pin
SheheerZahid5-Jul-03 5:58
SheheerZahid5-Jul-03 5:58 
GeneralRe: MFC Learning...Thanks a lot indeed Pin
Ryan Binns5-Jul-03 13:59
Ryan Binns5-Jul-03 13:59 
Generaljunk character display in microsoft date time picker control Pin
Raghunandan S4-Jul-03 21:03
Raghunandan S4-Jul-03 21:03 
GeneralRe: junk character display in microsoft date time picker control Pin
Michael Dunn4-Jul-03 21:18
sitebuilderMichael Dunn4-Jul-03 21:18 
GeneralRe: junk character display in microsoft date time picker control Pin
Raghunandan S5-Jul-03 1:45
Raghunandan S5-Jul-03 1:45 
GeneralRe: junk character display in microsoft date time picker control Pin
Michael Dunn5-Jul-03 5:30
sitebuilderMichael Dunn5-Jul-03 5:30 
GeneralQues on Load Icon Pin
SatyaDY4-Jul-03 20:47
SatyaDY4-Jul-03 20:47 
GeneralRe: Ques on Load Icon Pin
Ryan Binns4-Jul-03 21:16
Ryan Binns4-Jul-03 21:16 
GeneralRe: Ques on Load Icon Pin
SatyaDY6-Jul-03 17:44
SatyaDY6-Jul-03 17:44 
GeneralRe: Ques on Load Icon Pin
Ryan Binns6-Jul-03 18:11
Ryan Binns6-Jul-03 18:11 

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.