TabSheet.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #if !defined(AFX_TABSHEET_H__42EE262D_D15F_46D5_8F26_28FD049E99F4__INCLUDED_)
  2. #define AFX_TABSHEET_H__42EE262D_D15F_46D5_8F26_28FD049E99F4__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // TabSheet.h : header file
  7. //
  8. enum ETabOrientation
  9. {
  10. e_tabTop=0,
  11. e_tabBottom,
  12. e_tabLeft,
  13. e_tabRight,
  14. e_tabNOF,
  15. };
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CTabSheet window
  18. #define MAXPAGE 100
  19. class CTabSheet : public CTabCtrl
  20. {
  21. // Construction
  22. public:
  23. CTabSheet();
  24. ETabOrientation m_eTabOrientation; // current tab orientation
  25. // Attributes
  26. public:
  27. // Operations
  28. public:
  29. // Overrides
  30. // ClassWizard generated virtual function overrides
  31. //{{AFX_VIRTUAL(CTabSheet)
  32. //}}AFX_VIRTUAL
  33. // Implementation
  34. public:
  35. int GetCurSel();
  36. int SetCurSel(int nItem);
  37. void Show();
  38. void SetRect();
  39. BOOL AddPage(LPCTSTR title, CDialog *pDialog, UINT ID);
  40. virtual ~CTabSheet();
  41. // Generated message map functions
  42. protected:
  43. LPCTSTR m_Title[MAXPAGE];
  44. UINT m_IDD[MAXPAGE];
  45. CDialog* m_pPages[MAXPAGE];
  46. int m_nNumOfPages;
  47. int m_nCurrentPage;
  48. //{{AFX_MSG(CTabSheet)
  49. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  50. //}}AFX_MSG
  51. DECLARE_MESSAGE_MAP()
  52. public:
  53. afx_msg void OnPaint();
  54. void DrawThemesXpTabItem(CDC* pDC, int ixItem, const CRect& rcItem, UINT uiFlag);
  55. void DrawTabItem(CDC* pDC, int ixItem, const CRect& rcItemC, UINT uiFlags);
  56. };
  57. /////////////////////////////////////////////////////////////////////////////
  58. // Helper functions
  59. HRESULT DrawThemesPart(HDC hDC, int iPartId, int iStateId, LPCSTR uiPartNameID, LPRECT prcRcBx);
  60. BOOL IsThemeActiveXP();
  61. int DWordAlign(int n);
  62. template <class T> void SwapVars(T& a,T& b) { T t=a; a=b; b=t; }
  63. /////////////////////////////////////////////////////////////////////////////
  64. //{{AFX_INSERT_LOCATION}}
  65. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  66. #endif // !defined(AFX_TABSHEET_H__42EE262D_D15F_46D5_8F26_28FD049E99F4__INCLUDED_)