Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.1 KiB

  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. #include "resource.h"
  13. #include "res\otherids.h"
  14. /////////////////////////////////////////////////////////////////////////////
  15. // ColorMenu - used for custom menu test
  16. // included here to show how it should be embedded as a member of the
  17. // main frame window that uses it. The implementation is in custmenu.cpp
  18. class CColorMenu : public CMenu
  19. {
  20. public:
  21. // Operations
  22. void AppendColorMenuItem(UINT nID, COLORREF color);
  23. // Implementation
  24. virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMIS);
  25. virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);
  26. CColorMenu();
  27. virtual ~CColorMenu();
  28. };
  29. /////////////////////////////////////////////////////////////////////////////
  30. // Main Window
  31. // used as the context for running all the tests
  32. class CTestWindow : public CFrameWnd
  33. {
  34. public:
  35. // construction helpers
  36. void SetupMenus();
  37. protected:
  38. // custom menu tests implementation in custmenu.cpp
  39. void AttachCustomMenu();
  40. CColorMenu m_colorMenu;
  41. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  42. // Implementation
  43. //{{AFX_MSG(CTestWindow)
  44. afx_msg void OnTestDerivedEdit(); // simple test
  45. afx_msg void OnTestWndClassEdit(); // simple test
  46. afx_msg void OnTestSubclassedEdit(); // simple test
  47. afx_msg void OnTestBitmapButton1(); // custom control
  48. afx_msg void OnTestBitmapButton2(); // custom control
  49. afx_msg void OnTestBitmapButton3(); // custom control
  50. afx_msg void OnTestCustomList(); // custom control
  51. afx_msg void OnTestSpinEdit(); // custom control
  52. //}}AFX_MSG
  53. DECLARE_MESSAGE_MAP()
  54. };
  55. /////////////////////////////////////////////////////////////////////////////