📄 hxsplitterwnd.h
字号:
#if !defined(AFX_HXSPLITTERWND_H__A5A1888D_A351_434D_AF11_222FAA2FA6C7__INCLUDED_)
#define AFX_HXSPLITTERWND_H__A5A1888D_A351_434D_AF11_222FAA2FA6C7__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// HxSplitterWnd.h : header file
// Author: truezq 2004-01-19
// 思路来源于 class ZSplitter
// author: Melnikov Mike,Nestor Crew of Animatek Inc. **
/////////////////////////////////////////////////////////////////////////////
#include <vector>
using namespace std;
// CHxSplitterWnd window
enum MoveDirection
{
MD_HORIZONTAL = 0X01,
MD_VERTICAL = 0X02,
};
enum WindowSide
{
SIDE_LEFT = 0,
SIDE_RIGHT = 1,
};
class CHxSplitterWnd : public CWnd
{
// Construction
public:
CHxSplitterWnd();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHxSplitterWnd)
//}}AFX_VIRTUAL
BOOL Create( CWnd* pParentWnd);
// Implementation
public:
void RelayWindows();
MoveDirection SetMoveDirection(MoveDirection nDirect);
BOOL AddWindow(int nID, WindowSide nSide);
virtual ~CHxSplitterWnd();
// Generated message map functions
protected:
BOOL CountNewRect(CRect& rc, int nIdx, CPoint ptDiff);
//{{AFX_MSG(CHxSplitterWnd)
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnPaint();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
CPoint m_pointDragStart;
bool m_bInDragTestNow;
private:
CWnd* GetSomeWnd(WindowSide nSide);
void MoveOneWindow(CPoint ptNewPos, CPoint ptDiff);
void ReleaseMouse();
MoveDirection m_meDirection;
vector<int> m_vIDS;
vector<int> m_vStyle;
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HXSPLITTERWND_H__A5A1888D_A351_434D_AF11_222FAA2FA6C7__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -