home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / general / ctrltest / ctrltest.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.1 KB  |  65 lines

  1. // ctrltest.h : main window class interface
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include "resource.h"
  14. #include "res\otherids.h"
  15.  
  16. /////////////////////////////////////////////////////////////////////////////
  17. // ColorMenu - used for custom menu test
  18. //   included here to show how it should be embedded as a member of the
  19. //   main frame window that uses it.  The implementation is in custmenu.cpp
  20.  
  21. class CColorMenu : public CMenu
  22. {
  23. public:
  24. // Operations
  25.     void AppendColorMenuItem(UINT nID, COLORREF color);
  26.  
  27. // Implementation
  28.     virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMIS);
  29.     virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);
  30.     CColorMenu();
  31.     virtual ~CColorMenu();
  32. };
  33.  
  34. /////////////////////////////////////////////////////////////////////////////
  35. // Main Window
  36. //   used as the context for running all the tests
  37.  
  38. class CTestWindow : public CFrameWnd
  39. {
  40. public:
  41.     // construction helpers
  42.     void SetupMenus();
  43.  
  44. protected:
  45.     // custom menu tests implementation in custmenu.cpp
  46.     void AttachCustomMenu();
  47.     CColorMenu  m_colorMenu;
  48.     virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  49.  
  50. // Implementation
  51.     //{{AFX_MSG(CTestWindow)
  52.     afx_msg void OnTestDerivedEdit();           // simple test
  53.     afx_msg void OnTestWndClassEdit();          // simple test
  54.     afx_msg void OnTestSubclassedEdit();        // simple test
  55.     afx_msg void OnTestBitmapButton1();         // custom control
  56.     afx_msg void OnTestBitmapButton2();         // custom control
  57.     afx_msg void OnTestBitmapButton3();         // custom control
  58.     afx_msg void OnTestCustomList();            // custom control
  59.     afx_msg void OnTestSpinEdit();          // custom control
  60.     //}}AFX_MSG
  61.     DECLARE_MESSAGE_MAP()
  62. };
  63.  
  64. /////////////////////////////////////////////////////////////////////////////
  65.