frame.h

来自「数据加密算法」· C头文件 代码 · 共 51 行

H
51
字号
#pragma once

class CDancerFrame ;

// a CSplitterWnd-derived class that can notify its parent
class CNotifySplitter : public CSplitterWnd
{
	CDancerFrame* m_pFrame ;

public :
	CNotifySplitter ( ) ;
	~CNotifySplitter ( ) ;

	void AttachTo ( CDancerFrame* pFrame ) ; // attach to frame

	// override
	virtual void StopTracking ( BOOL bAccept ) ; // called when a dragging stopped
} ;

// child frame
class CDancerFrame : public CMDIChildWnd
{
	DECLARE_DYNCREATE ( CDancerFrame )
	DECLARE_MESSAGE_MAP ( )

private :
	// attribute
	CNotifySplitter m_wndHSplitter , m_wndVSplitter ;
	FLOAT m_fHRatio , m_fVRatio ;
	BOOL m_bReady ;

public :
	CDancerFrame ( ) ;
	~CDancerFrame ( ) ;

	// implementation
	void ResizeViews ( int cx , int cy ) ; // resize views when frame is sized
	void SaveSize ( ) ; // save views' size

protected:
	// override
	virtual BOOL OnCreateClient (
		LPCREATESTRUCT lpCreateStruct ,
		CCreateContext* pContext ) ;
	virtual BOOL PreCreateWindow ( CREATESTRUCT& CreateStruct ) ;

	// msg handler
	afx_msg int OnCreate ( LPCREATESTRUCT lpCreateStruct ) ;
	afx_msg void OnSize ( UINT nType , int cx , int cy ) ;
	afx_msg void OnClose ( ) ;
} ;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?