creating a messagebox on Windows

This tip submitted by Amarjeet Kawathe on 2010-01-25 19:08:30. It has been viewed 4314 times.
Rating of 6.1 with 9 votes



You can use the following code to create a message box on Windows that displays simple messages like "Wrong Choice, Are you sure" etc..

#include 
#include "windows.h"
int main()
{
  MessageBox(0,"Message to be displayed e.g Wrong Choice!","Caption e.g. Warning",MB_OK);
}




More tips

Help your fellow programmers! Add a tip!