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

Article translations Article translations
Article ID: 936852 - View products that this article applies to.
Expand all | Collapse all

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 <windows.h>
//#include <afx.h>

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

Properties

Article ID: 936852 - Last Review: May 15, 2007 - Revision: 1.0
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
Keywords: 
kbtshoot kbexpertiseinter KB936852

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com