home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 30 fixes_v / 30-fixes_v.zip / c32_b.zip / PMHC.B < prev    next >
Text File  |  1994-01-11  |  656b  |  35 lines

  1. //
  2. // For OS/2 2.x:
  3. //    wcl386 pmhello.c -bt=os2v2 -l=os2v2_pm
  4. //
  5. // For OS/2 1.x:
  6. //    wcl pmhello.c -bt=os2 /"sys os2 pm op stack=8k"
  7. //
  8.  
  9. #define    INCL_WIN
  10. #include <os2.h>
  11.  
  12. HMQ        hMessageQueue;
  13. HAB        AnchorBlock;
  14.  
  15. int main( void )
  16. {
  17.     AnchorBlock = WinInitialize( 0 );
  18.     if( AnchorBlock == 0 ) return( 0 );
  19.  
  20.     hMessageQueue = WinCreateMsgQueue( AnchorBlock, 0 );
  21.     if( hMessageQueue == 0 ) return( 0 );
  22.  
  23.     WinMessageBox( HWND_DESKTOP,
  24.            0,
  25.            "Hello World",
  26.            "WATCOM Example",
  27.            0,
  28.            MB_NOICON | MB_OK );
  29.  
  30.     WinDestroyMsgQueue( hMessageQueue );
  31.     WinTerminate( AnchorBlock );
  32.  
  33.     return( 1 );
  34. }
  35.