Microsoft KB Archive/152670

{|
 * width="100%"|

PRB: Only One Language Can Be Used on MessageBoxEx Pushbuttons

 * }

Q152670

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK) for Windows NT, version 3.51
 * Microsoft Windows NT Server version 3.51
 * Microsoft Windows NT Workstation version 3.51
 * Microsoft Windows 4.0
 * Microsoft Windows 95

-

SYMPTOMS
When MessageBoxEx is called, regardless of the value of wLanguageID (the last parameter of MessageBoxEx), the pushbutton text can only be displayed in the native language of the operating system.

On Windows NT 3.51, if the wLanguageID is the native language ID of the operating system or the wLanguageID is MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), the pushbutton text is displayed in the native language of that version of NT. Otherwise, the pushbuttons are blank.

For example, on US Windows NT 3.51:

  MessageBoxEx( hWnd, "string", "title", MB_RETRYCANCEL,

MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)); would display a MessageBox with two buttons reading: "retry" and "cancel."

However, on the same operating system:

  MessageBoxEx( hWnd, "string", "title", MB_RETRYCANCEL,

MAKELANGID(LANG_FRENCH, SUBLANG_FRENCH)); would display a MessageBox with two blank buttons.

On Windows 95 or Windows NT 4.0, regardless of what is specified in wLanguageID, the pushbutton text is in the native language of that version of Windows 95. For example, on US Windows 95, both:

  MessageBoxEx( hWnd, "string", "title", MB_RETRYCANCEL,

MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)); -and-

  MessageBoxEx( hWnd, "string", "title", MB_RETRYCANCEL,         MAKELANGID(LANG_FRENCH, SUBLANG_FRENCH)); would display a Message Box with two buttons reading: "retry" and "cancel."

Windows 2000 will have the ability to display the pushbutton text in the language specified in wLanguageID.

STATUS
This behavior is by design.

Additional query words: 4.00 resource NLS

Keywords : kbOSWinNT351 kbSDKWin32 kbOSWin95 kbIntlDev

Issue type : kbprb

Technology : kbWinNTsearch kbWinNTWsearch kbWinNT351xsearch kbWinNTW351xsearch kbWinNTW351 kbWinNTSsearch kbWinNTS351 kbWinNTS351xsearch kbWin32SDKSearch kbAudDeveloper kbWin3xSearch kbWin95search kbSDKSearch kbZNotKeyword3 kbWin32sSearch kbWin32SDKNT351