QQDlg.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /************************************************************************
  2. * 程序名: 精仿QQ主界面
  3. * 制作人: 李克平, 2011年04月11日
  4. * 版本号: 1.0
  5. ************************************************************************/
  6. // QQDlg.h : 头文件
  7. //
  8. #pragma once
  9. #include "SkinWin.h"
  10. #include "SkinButton.h"
  11. #include "SkinStatic.h"
  12. #include "SkinTab.h"
  13. #include "EnBitmap.h"
  14. #include "SkinEdit.h"
  15. #include "GfxOutBarCtrl.h"
  16. #include "MyListCtrl.h"
  17. #include "afxwin.h"
  18. // CQQDlg 对话框
  19. class CQQDlg : public CDialog
  20. {
  21. // 构造
  22. public:
  23. CQQDlg(CWnd* pParent = NULL); // 标准构造函数
  24. CTreeCtrl wndTree;
  25. CGfxOutBarCtrl m_outBarCtrl;
  26. CMyListCtrl m_MyFriendListCtrl;
  27. protected:
  28. void AdjustControl();
  29. void ReDrawCrl(CDC* m_MemDC);
  30. void ChangeWindowRgn();
  31. CString GetStrCurrentTime();
  32. //修正移动时窗口的大小
  33. void FixMoving(UINT fwSide, LPRECT pRect);
  34. //修正改改变窗口大小时窗口的大小
  35. void FixSizing(UINT fwSide, LPRECT pRect);
  36. //从收缩状态显示窗口
  37. void DoShow();
  38. //从显示状态收缩窗口
  39. void DoHide();
  40. //重载函数,只是为了方便调用
  41. BOOL SetWindowPos(const CWnd* pWndInsertAfter,
  42. LPCRECT pCRect, UINT nFlags = SWP_SHOWWINDOW);
  43. private:
  44. CSkinWin m_skinWin;
  45. BOOL m_bFirst;
  46. CString strThemePath;
  47. CEnBitmap m_mainPanle;
  48. CEnBitmap m_leftPanle;
  49. HRGN m_hrgn;
  50. BOOL bScreenMax;
  51. CRect m_rectRestoreWin;
  52. CImageList m_imHead;
  53. CFont m_font;
  54. BOOL m_isSizeChanged; //窗口大小是否改变了
  55. BOOL m_isSetTimer; //是否设置了检测鼠标的Timer
  56. INT m_oldWndHeight; //旧的窗口宽度
  57. INT m_taskBarHeight; //任务栏高度
  58. INT m_edgeHeight; //边缘高度
  59. INT m_edgeWidth; //边缘宽度
  60. INT m_hideMode; //隐藏模式
  61. BOOL m_hsFinished; //隐藏或显示过程是否完成
  62. BOOL m_hiding; //该参数只有在!m_hsFinished才有效
  63. //真:正在隐藏,假:正在显示
  64. // 实现
  65. protected:
  66. HICON m_hIcon;
  67. // 对话框数据
  68. enum { IDD = IDD_QQ_DIALOG };
  69. CSkinStatic m_staUserHead;
  70. CSkinStatic m_staUserStatus;
  71. CSkinStatic m_staSysTime;
  72. CSkinEdit m_editSearch;
  73. CSkinButton m_btnWealth;
  74. CSkinButton m_btnTool;
  75. CSkinButton m_btnSMS;
  76. CSkinButton m_btnSell;
  77. CSkinButton m_btnPet;
  78. CSkinButton m_btnMusic;
  79. CSkinButton m_btnMSG;
  80. CSkinButton m_btnMail;
  81. CSkinButton m_btnLive;
  82. CSkinButton m_btnList;
  83. CSkinButton m_btnGame;
  84. CSkinButton m_btnSearch;
  85. CSkinButton m_btnColor;
  86. CSkinButton m_btnChat;
  87. CSkinButton m_btnBRW;
  88. CSkinButton m_btnApp;
  89. CSkinButton m_btnOnline;
  90. CSkinButton m_btnMainMenu;
  91. CSkinButton m_btnMainFigure;
  92. CSkinButton m_btnClose;
  93. CSkinButton m_btnMax;
  94. CSkinButton m_btnMin;
  95. CSkinTab m_skinTab;
  96. // 生成的消息映射函数
  97. virtual BOOL OnInitDialog();
  98. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
  99. afx_msg void OnClose();
  100. afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
  101. afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  102. afx_msg void OnMin();
  103. afx_msg void OnMax();
  104. afx_msg void OnSizing(UINT fwSide, LPRECT pRect);
  105. afx_msg void OnMoving(UINT fwSide, LPRECT pRect);
  106. afx_msg void OnTimer(UINT_PTR nIDEvent);
  107. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  108. afx_msg LRESULT OnNcHitTest(CPoint point);
  109. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  110. afx_msg void OnBnClickedBtnMainmenu();
  111. afx_msg void OnBnClickedBtnColor();
  112. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  113. afx_msg void OnPaint();
  114. afx_msg HCURSOR OnQueryDragIcon();
  115. afx_msg void OnSize(UINT nType, int cx, int cy);
  116. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  117. virtual BOOL PreTranslateMessage(MSG* pMsg);
  118. DECLARE_MESSAGE_MAP()
  119. };