MScreenInfoCtl.h
上传用户:zqemid3000
上传日期:2007-01-04
资源大小:158k
文件大小:3k
源码类别:

多显示器编程

开发平台:

Visual C++

  1. #if !defined(AFX_MSCREENINFOCTL_H__223DE675_E7D7_11D2_8572_00001A0169AC__INCLUDED_)
  2. #define AFX_MSCREENINFOCTL_H__223DE675_E7D7_11D2_8572_00001A0169AC__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // MScreenInfoCtl.h : Declaration of the CMScreenInfoCtrl ActiveX Control class.
  7. /////////////////////////////////////////////////////////////////////////////
  8. // CMScreenInfoCtrl : See MScreenInfoCtl.cpp for implementation.
  9. class CMScreenInfoCtrl : public COleControl
  10. {
  11. DECLARE_DYNCREATE(CMScreenInfoCtrl)
  12. // Constructor
  13. public:
  14. CMScreenInfoCtrl();
  15. // Overrides
  16. // ClassWizard generated virtual function overrides
  17. //{{AFX_VIRTUAL(CMScreenInfoCtrl)
  18. public:
  19. virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
  20. virtual void DoPropExchange(CPropExchange* pPX);
  21. virtual void OnResetState();
  22. //}}AFX_VIRTUAL
  23. // Implementation
  24. protected:
  25. ~CMScreenInfoCtrl();
  26. DECLARE_OLECREATE_EX(CMScreenInfoCtrl)    // Class factory and guid
  27. DECLARE_OLETYPELIB(CMScreenInfoCtrl)      // GetTypeInfo
  28. DECLARE_PROPPAGEIDS(CMScreenInfoCtrl)     // Property page IDs
  29. DECLARE_OLECTLTYPE(CMScreenInfoCtrl) // Type name and misc status
  30. // Message maps
  31. //{{AFX_MSG(CMScreenInfoCtrl)
  32. // NOTE - ClassWizard will add and remove member functions here.
  33. //    DO NOT EDIT what you see in these blocks of generated code !
  34. //}}AFX_MSG
  35. DECLARE_MESSAGE_MAP()
  36. // Dispatch maps
  37. //{{AFX_DISPATCH(CMScreenInfoCtrl)
  38. short m_monitorNum;
  39. afx_msg void OnMonitorNumChanged();
  40. afx_msg short GetPrimaryScreen();
  41. afx_msg void SetPrimaryScreen(short nNewValue);
  42. afx_msg short GetScreenWidth(short ScreenNo);
  43. afx_msg void SetScreenWidth(short ScreenNo, short nNewValue);
  44. afx_msg short GetScreenHeight(short ScreenNo);
  45. afx_msg void SetScreenHeight(short ScreenNo, short nNewValue);
  46. afx_msg short GetScreenTop(short ScreenNo);
  47. afx_msg void SetScreenTop(short ScreenNo, short nNewValue);
  48. afx_msg short GetScreenLeft(short ScreenNo);
  49. afx_msg void SetScreenLeft(short ScreenNo, short nNewValue);
  50. //}}AFX_DISPATCH
  51. DECLARE_DISPATCH_MAP()
  52. // Event maps
  53. //{{AFX_EVENT(CMScreenInfoCtrl)
  54. //}}AFX_EVENT
  55. DECLARE_EVENT_MAP()
  56. // Dispatch and event IDs
  57. public:
  58. enum {
  59. //{{AFX_DISP_ID(CMScreenInfoCtrl)
  60. dispidMonitorNum = 1L,
  61. dispidPrimaryScreen = 2L,
  62. dispidScreenWidth = 3L,
  63. dispidScreenHeight = 4L,
  64. dispidScreenTop = 5L,
  65. dispidScreenLeft = 6L,
  66. //}}AFX_DISP_ID
  67. };
  68. };
  69. //{{AFX_INSERT_LOCATION}}
  70. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  71. #endif // !defined(AFX_MSCREENINFOCTL_H__223DE675_E7D7_11D2_8572_00001A0169AC__INCLUDED)