Microsoft KB Archive/936852

= Message boxes differ in Windows Vista and in Windows XP, although you use the same code to generate the message boxes =

Article ID: 936852

Article Last Modified on 5/15/2007

-

APPLIES TO


 * Windows Vista Ultimate
 * Windows Vista Enterprise
 * Windows Vista Business
 * Windows Vista Home Premium
 * Windows Vista Home Basic
 * Windows Vista Starter
 * Windows Vista Ultimate 64-bit Edition
 * Windows Vista Enterprise 64-bit Edition
 * Windows Vista Business 64-bit Edition
 * Windows Vista Home Premium 64-bit Edition

-



SYMPTOMS
Message boxes differ in Windows Vista and in Microsoft Windows XP, although you use the same code to generate the message boxes.

For example, when you use the following code sample to generate the same message box in Windows Vista and in Windows XP, the text in the message box wraps in Windows Vista. However, the text does not wrap in Windows XP. Also, the buttons in the message box are right justified in Windows Vista. The buttons are centered in Windows XP. //#include 
 * 1) include 

int WINAPI WinMain(HINSTANCE hlnstance, HINSTANCE hPrevInstance, PSTR szcmdline, int iCmdShow) { MessageBox(NULL, TEXT(&quot;Hello! This is a MessageBox test! Hello! This is a MessageBox test! Hello! This is a MessageBox test!&quot;), TEXT(&quot;MessageBox test&quot;),MB_ICONEXCLAMATION|MB_YESNO); return 0; }

Keywords: kbtshoot kbexpertiseinter KB936852

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.