00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #pragma once
00023
00024 #include "CtrlCoolBar.h"
00025
00026 class CSkinWindow;
00027 class CGraphItem;
00028 class CMonitorBarCtrl;
00029
00030
00031 class CRemoteWnd : public CWnd
00032 {
00033
00034 public:
00035 CRemoteWnd();
00036 virtual ~CRemoteWnd();
00037
00038 DECLARE_DYNAMIC(CRemoteWnd)
00039
00040
00041 protected:
00042 class CmdButton : public CCmdUI
00043 {
00044 public:
00045 CmdButton(LPCTSTR pszName);
00046 BOOL HitTest(const CPoint& point, BOOL bAll = FALSE) const;
00047 void Paint(CDC* pdcWindow, CRect& rcWindow, CSkinWindow* pSkin, CmdButton* pHover, CmdButton* pDown);
00048 public:
00049 virtual void Show(BOOL bShow = TRUE);
00050 virtual void Enable(BOOL bOn = TRUE);
00051 virtual void SetCheck(int nCheck = 1);
00052 virtual void Execute(CFrameWnd* pTarget);
00053 public:
00054 CString m_sName;
00055 CRect m_rc;
00056 BOOL m_bVisible;
00057 BOOL m_bEnabled;
00058 BOOL m_bChecked;
00059 BOOL m_bChanged;
00060 };
00061
00062
00063 public:
00064 BOOL Create(CMonitorBarCtrl* pMonitor);
00065 BOOL IsVisible();
00066 void OnSkinChange();
00067 protected:
00068 CmdButton* HitTestButtons(const CPoint& ptIn, BOOL bAll = FALSE) const;
00069 void UpdateCmdButtons();
00070 void PaintHistory(CDC* pDC, CGraphItem* pTxItem, CGraphItem* pRxItem, DWORD nMaximum);
00071 void PaintFlow(CDC* pDC, BOOL* pbDest, CRect* prcDest, BOOL* pbSrc, CRect* prcSrc, CGraphItem* pItem, DWORD nMaximum);
00072 void PaintScaler(CDC* pDC);
00073 void PaintMedia(CDC* pDC);
00074 void PaintStatus(CDC* pDC);
00075 void TrackScaler();
00076 void TrackSeek();
00077 void TrackVol();
00078
00079
00080 protected:
00081 static LPCTSTR m_hClass;
00082 CMonitorBarCtrl* m_pMonitor;
00083 protected:
00084 CSkinWindow* m_pSkin;
00085 CList<CmdButton*> m_pButtons;
00086 CmdButton* m_pCmdHover;
00087 CmdButton* m_pCmdDown;
00088 CString m_sStatus;
00089 BOOL m_bStatus;
00090 int m_nTimer;
00091 protected:
00092 CRect m_rcBackground;
00093 BOOL m_bsStatusText;
00094 CRect m_rcsStatusText;
00095 protected:
00096 BOOL m_bsHistoryDest;
00097 CRect m_rcsHistoryDest;
00098 BOOL m_bsHistoryTx[2];
00099 CRect m_rcsHistoryTx[2];
00100 BOOL m_bsHistoryRx[2];
00101 CRect m_rcsHistoryRx[2];
00102 BOOL m_bsFlowTxDest;
00103 CRect m_rcsFlowTxDest;
00104 BOOL m_bsFlowTxSrc[2];
00105 CRect m_rcsFlowTxSrc[2];
00106 BOOL m_bsFlowRxDest;
00107 CRect m_rcsFlowRxDest;
00108 BOOL m_bsFlowRxSrc[2];
00109 CRect m_rcsFlowRxSrc[2];
00110 BOOL m_bsScalerTrack;
00111 CRect m_rcsScalerTrack;
00112 BOOL m_bsScalerTab;
00113 CRect m_rcsScalerTab;
00114 BOOL m_bsScalerBar;
00115 CRect m_rcsScalerBar;
00116 BOOL m_bScaler;
00117 CRect m_rcScalerTab;
00118 protected:
00119 BOOL m_bsMediaSeekTrack;
00120 CRect m_rcsMediaSeekTrack;
00121 BOOL m_bsMediaSeekTab;
00122 CRect m_rcsMediaSeekTab;
00123 BOOL m_bsMediaSeekBar;
00124 CRect m_rcsMediaSeekBar;
00125 BOOL m_bsMediaVolTrack;
00126 CRect m_rcsMediaVolTrack;
00127 BOOL m_bsMediaVolTab;
00128 CRect m_rcsMediaVolTab;
00129 BOOL m_bsMediaVolBar;
00130 CRect m_rcsMediaVolBar;
00131 BOOL m_bMediaSeek;
00132 float m_nMediaSeek;
00133 CRect m_rcMediaSeekTab;
00134 BOOL m_bMediaVol;
00135 float m_nMediaVol;
00136 CRect m_rcMediaVolTab;
00137 BOOL m_bsMediaStates[2][3];
00138 CRect m_rcsMediaStates[2][3];
00139
00140
00141 protected:
00142 DECLARE_MESSAGE_MAP()
00143 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00144 afx_msg void OnDestroy();
00145 afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
00146 afx_msg LONG OnIdleUpdateCmdUI(WPARAM wParam, LPARAM lParam);
00147 afx_msg void OnTimer(UINT nIDEvent);
00148 afx_msg void OnSize(UINT nType, int cx, int cy);
00149 afx_msg void OnPaint();
00150 afx_msg void OnNcPaint();
00151 afx_msg BOOL OnNcActivate(BOOL bActive);
00152 afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp);
00153 afx_msg UINT OnNcHitTest(CPoint point);
00154 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00155 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00156 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00157 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00158 afx_msg void OnNcLButtonDblClk(UINT nFlags, CPoint point);
00159 afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00160 virtual INT_PTR OnToolHitTest(CPoint point, TOOLINFO* pTI) const;
00161 };