home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / win_lrn / message / messbox.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-08-11  |  682 b   |  23 lines

  1. /*
  2.  *  MessageBox
  3.  *
  4.  *  This program demonstrates the use of the MessageBox function.  It
  5.  *  will display a simple message.
  6.  */
  7.  
  8. #include <windows.h>
  9.  
  10. int     PASCAL WinMain (hInstance, hPrevInstance, lpszCmdLine, cmdShow)
  11. HANDLE    hInstance, hPrevInstance;
  12. LPSTR     lpszCmdLine;
  13. int       cmdShow;
  14.   {
  15.   MessageBox (GetFocus(),  /*  Because we have no parent window we feed it
  16.                             *  the current focus.
  17.                             */
  18.   (LPSTR) "This is a Message Box",   /*  The message  */
  19.   (LPSTR) "OK",                      /*  Message Header  */
  20.   MB_OK);                            /* Type of buttons      */
  21.   return 0;
  22.   }
  23.