The information in this article applies to:
SYMPTOMSCMenu::GetMenuString truncates menu strings longer than 256 characters. This problem is most commonly seen when retrieving a file name from the "most recently used" list on the File menu. These file names are occasionally longer than 256 characters. CAUSEThe CMenu member function int CMenu::GetMenuString(UINT nIDItem, CString& rString, UINT nFlags) const, hard codes the maximum length for a retrieved menu string at 256 characters. See VC98\MFC\Include\Afxwin.h, line 1043. RESOLUTIONTo work around this problem, use the LPTSTR version of this function; for example, int CMenu::GetMenuString(UINT nIDItem, LPTSTR lpString, int nMaxCount, UINT nFlags) const. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why MORE INFORMATIONSteps to Reproduce Behavior
Additional query words:
Keywords : kbservicepack kbMFC KbUIDesign kbVC600bug kbVS600sp2 kbVS600SP1 kbVS600sp3fix |
Last Reviewed: May 19, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |