home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / bmp2.zip / ROPS.C < prev    next >
C/C++ Source or Header  |  1995-08-06  |  4KB  |  106 lines

  1. #pragma    title("ROP Viewer  --  Version 1  --  (ROPs.C)")
  2. #pragma    subtitle("   Module Purpose - Interface Definitions")
  3.  
  4. #define    INCL_DOS           /* Include OS/2 DOS Kernal        */
  5. #define    INCL_WIN           /* Include OS/2 PM Windows Interface    */
  6.  
  7. #include <os2.h>
  8.  
  9. #include "appdefs.h"
  10. #include "rops.h"
  11.  
  12. /* This    module contains    routine    used to    contain    the main entry point to    */
  13. /* the application.                            */
  14.  
  15. /* Filename:   ROPs.C                            */
  16.  
  17. /*  Version:   1                            */
  18. /*  Created:   1995-08-06                        */
  19. /*  Revised:   1995-08-06                        */
  20.  
  21. /* Routines:   INT main(INT argc, CHAR *argv[ ]);            */
  22.  
  23.  
  24. /************************************************************************/
  25. /************************************************************************/
  26. /************************************************************************/
  27. /* DISCLAIMER OF WARRANTIES:                        */
  28. /* -------------------------                        */
  29. /* The following [enclosed] code is sample code    created    by IBM        */
  30. /* Corporation and Prominare Inc.  This    sample code is not part    of any    */
  31. /* standard IBM    product    and is provided    to you solely for the purpose    */
  32. /* of assisting    you in the development of your applications.  The code    */
  33. /* is provided "AS IS",    without    warranty of any    kind.  Neither IBM nor    */
  34. /* Prominare shall be liable for any damages arising out of your    */
  35. /* use of the sample code, even    if they    have been advised of the    */
  36. /* possibility of such damages.                        */
  37. /************************************************************************/
  38. /************************************************************************/
  39. /************************************************************************/
  40. /*               D I S C L A I M E R                */
  41. /* This    code is    provided on an as is basis with    no implied support.    */
  42. /* It should be    considered freeware that cannot    be rebundled as        */
  43. /* part    of a larger "*ware" offering without our consent.        */
  44. /************************************************************************/
  45. /************************************************************************/
  46. /************************************************************************/
  47.  
  48. /* Copyright ╕ International Business Machines Corp., 1995.        */
  49. /* Copyright ╕ 1995  Prominare Inc.  All Rights    Reserved.        */
  50.  
  51. /* --------------------------------------------------------------------    */
  52.  
  53. static HMODULE hmod;           /* DLL Module Handle            */
  54.  
  55. PSZ pszROPsClassName = (PSZ)"ROPs";
  56.  
  57.  
  58. INT main(INT argc, CHAR    *argv[ ])
  59.  
  60. {
  61. QMSG  qmsg;               /* PM Message Queue Holder        */
  62.  
  63.                /* Initialize the program for PM    and create the    */
  64.                /* message queue                    */
  65.  
  66. hmqROPs    = WinCreateMsgQueue(hAB    = WinInitialize(0UL), 0L);
  67.  
  68.                /* Register the window class            */
  69.  
  70. if ( !WinRegisterClass(hAB, pszROPsClassName, (PFNWP)ROPsTestWndProc,
  71.                CS_SYNCPAINT | CS_SIZEREDRAW, 8UL) )
  72.    return(0);
  73.                /* Create the main program window        */
  74.  
  75. if ( !(hwndROPsFrame = CreateStdWindow(HWND_DESKTOP, WS_VISIBLE,
  76.                        FCF_NOBYTEALIGN | FCF_TASKLIST |    
  77.                        FCF_TITLEBAR | FCF_ICON | FCF_SYSMENU |
  78.                        FCF_MENU    | FCF_MINMAX | FCF_HORZSCROLL |    
  79.                        FCF_VERTSCROLL |    FCF_SIZEBORDER,
  80.                        pszROPsClassName, (PSZ)"ROPs Test", 0L,
  81.                        (HMODULE)NULL, WIN_ROPSTEST, &hwndROPs, 10, 31, 226, 101)) )
  82.    return(0);
  83.  
  84. InitApp(hwndROPsFrame, hwndROPs, NULL);
  85.  
  86.                /* Get and dispatch the message to program    */
  87.                /* windows                    */
  88.  
  89. while (    WinGetMsg(hAB, &qmsg, (HWND)NULL, 0UL, 0UL) )
  90.    WinDispatchMsg(hAB, &qmsg);
  91.  
  92.                /* Have received    a WM_QUIT, start the program    */
  93.                /* shutdown by destroying the program windows    */
  94.                /* and destroying the message queue        */
  95.  
  96. WinDestroyWindow(hwndROPsFrame);
  97.  
  98. WinDestroyMsgQueue(hmqROPs);
  99.  
  100.                /* Notify PM that main program thread not needed    */
  101.                /* any longer                    */
  102. WinTerminate(hAB);
  103.                /* Exit back to OS/2 cleanly            */
  104. return(0);
  105. }
  106.