home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / S12679.ZIP / HELLO.C < prev    next >
C/C++ Source or Header  |  1990-08-24  |  2KB  |  65 lines

  1. /****************************** Module Header ******************************\
  2. * Module Name: HELLO.C
  3. *
  4. * The sample shows how to guarantee that an application will return to
  5. * the full screen screen group which started it once the application
  6. * terminates.
  7. *
  8. * Ed Mills
  9. * August 1990
  10. *
  11. * Created by Microsoft Corp., 1988
  12. *
  13. \***************************************************************************/
  14.  
  15. #define INCL_PM
  16. #include <os2.h>
  17. #include "hello.h"
  18.  
  19. HAB     hAB;
  20. HMQ     hmqHello;
  21. HWND    hwndHelloFrame;
  22.  
  23.  
  24. /***************************** Private Function ****************************\
  25. *
  26. * Hello World Main procedure
  27. *
  28. * Effects: Set globals   - hAB        Handle to Application Anchor Block
  29. *             - hmqHello   Handle to application window msg queue
  30. *
  31. * Warnings: None
  32. *
  33. \***************************************************************************/
  34.  
  35. int cdecl main( )
  36. {
  37.     hAB = WinInitialize(NULL);
  38.  
  39.     hmqHello = WinCreateMsgQueue(hAB, 0);
  40.  
  41.     hwndHelloFrame = WinCreateWindow(HWND_DESKTOP,
  42.                      /* It must be a frame. */
  43.                      WC_FRAME,
  44.                      NULL,
  45.                      /* It must be visible. */
  46.                      WS_VISIBLE,
  47.                      /* This keeps it from ever showing. */
  48.                      0, 0, 0, 0,
  49.                      NULL,
  50.                      HWND_TOP,
  51.                      NULL, NULL, NULL);
  52.  
  53.  
  54.     WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
  55.           "This is just a simple message box", "FULLSCRN",
  56.           1717, MB_OK);
  57.  
  58.  
  59.     WinDestroyWindow( hwndHelloFrame );
  60.  
  61.     WinDestroyMsgQueue( hmqHello );
  62.     WinTerminate( hAB );
  63.     return(0);
  64. }
  65.