ITsVISTA
Information that makes life easier when it comes to installing, managing, and using Windows Vista.
Start About FAQ Blogroll Shop

ITsVISTA KB-Link: KB936852

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

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;
}

For more information on this issue, including potential causes, workarounds, and resolutions, see: Microsoft KB Article KB936852.

Get notified of new posts for FREE via RSS or E-mail

Subscribe to ITsVISTA!

Comments

  • There are no comments yet...Come on, share your thoughts!

Leave a Comment