Leaked source code of windows server 2003
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.

60 lines
1.9 KiB

  1. // VelocityPage.h : Declaration of the CVelocityPage
  2. #ifndef __VELOCITYPAGE_H_
  3. #define __VELOCITYPAGE_H_
  4. #include "resource.h" // main symbols
  5. #include "..\dmtool\tools.h"
  6. #include "ControlHelp.h"
  7. EXTERN_C const CLSID CLSID_VelocityPage;
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CVelocityPage
  10. class ATL_NO_VTABLE CVelocityPage :
  11. public CComObjectRootEx<CComSingleThreadModel>,
  12. public CComCoClass<CVelocityPage, &CLSID_VelocityPage>,
  13. public IPropertyPageImpl<CVelocityPage>,
  14. public CDialogImpl<CVelocityPage>
  15. {
  16. public:
  17. CVelocityPage();
  18. virtual ~CVelocityPage();
  19. enum {IDD = IDD_VELOCITYPAGE};
  20. DECLARE_REGISTRY_RESOURCEID(IDR_VELOCITYPAGE)
  21. DECLARE_PROTECT_FINAL_CONSTRUCT()
  22. BEGIN_COM_MAP(CVelocityPage)
  23. COM_INTERFACE_ENTRY(IPropertyPage)
  24. END_COM_MAP()
  25. BEGIN_MSG_MAP(CVelocityPage)
  26. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog);
  27. MESSAGE_HANDLER(WM_COMMAND, OnCommand);
  28. MESSAGE_HANDLER(WM_HSCROLL, OnSlider);
  29. MESSAGE_HANDLER(WM_PAINT, OnPaint);
  30. CHAIN_MSG_MAP(IPropertyPageImpl<CVelocityPage>)
  31. END_MSG_MAP()
  32. // Handler prototypes:
  33. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  34. LRESULT OnSlider(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  35. LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  36. LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  37. STDMETHOD(SetObjects)(ULONG cObjects,IUnknown **ppUnk);
  38. STDMETHOD(Apply)(void);
  39. private:
  40. IDirectMusicVelocityTool * m_pVelocity;
  41. CSliderValue m_ctStrength;
  42. CSliderValue m_ctLowLimit;
  43. CSliderValue m_ctHighLimit;
  44. CSliderValue m_ctCurveStart;
  45. CSliderValue m_ctCurveEnd;
  46. RECT m_rectDisplay;
  47. void DrawCurve(HDC hDCIn);
  48. };
  49. #endif //__VELOCITYPAGE_H_