home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ctlcpp.zip / CPPCTL.HPP < prev    next >
C/C++ Source or Header  |  1994-06-06  |  2KB  |  69 lines

  1. #ifndef _CPPCTL_
  2.    #define _CPPCTL_
  3.  
  4. /***************************************************************/
  5. /* Filename: cppctl.hpp                                        */
  6. /*                                                             */
  7. /* Purpose: Contains declaration of MainFrame class which is   */
  8. /*          the application's main window.                     */
  9. /*                                                             */
  10. /* Program name: cppctl.exe     Title: C++ PM Control Test App */
  11. /* OS/2 Developer Magazine, Issue: Sept. '94, page             */
  12. /* Article title: Writing OS/2 PM Controls in C++              */
  13. /* Authors: Eric Snell and Lori Ruffing                        */
  14. /*                                                             */
  15. /* Description: This example shows how to implement an OS/2 PM */
  16. /*              control window in C++.                         */
  17. /*                                                             */
  18. /* Program Requirements: This example requires the IBM C Set++ */
  19. /*                       compiler and libraries.               */
  20. /***************************************************************/
  21.  
  22. #ifndef _IFRAME_
  23.    #include <iframe.hpp>
  24. #endif
  25.  
  26. #ifndef _NEWCTL_
  27.    #include "newctl.hpp"
  28. #endif
  29.  
  30. #ifndef _NEWCTHDR_
  31.    #include "newcthdr.hpp"
  32. #endif
  33.  
  34. #ifndef _IMMOVHDR_
  35.    #include "immovhdr.hpp"
  36. #endif
  37.  
  38. #ifndef _IMMOVEVT_
  39.    #include "immovevt.hpp"
  40. #endif
  41.  
  42. // Align classes on 4 byte boundary
  43. #pragma pack(4)
  44.  
  45. class MainFrame : public IFrameWindow,
  46.                   public IMouseMoveHandler,
  47.                   public NewControlHandler
  48.    {
  49.    public:
  50.       MainFrame();
  51.  
  52.       virtual ~MainFrame();
  53.  
  54.    protected:
  55.       virtual Boolean controlPointer(IControlPointerEvent &evt);
  56.       virtual Boolean button1Click(NewControlEvent& evt);
  57.       virtual Boolean button2Click(NewControlEvent& evt);
  58.  
  59.    private:
  60.       NewControl clientWin;
  61.  
  62.    };
  63.  
  64.  
  65. // Resume compiler default packing
  66. #pragma pack()
  67.  
  68. #endif //#ifndef _CPPCTL_
  69.