⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 controlpos2.h

📁 VCsuishu fudai de yixie chengxuyuanma
💻 H
字号:
//------------------------------------------------------------------------------
// ControlPos2.h
// 
//	CControlPos2 
//	Position controls on a form's resize 
//  
#ifndef CONTROLPOS_H_
#define CONTROLPOS_H_
/////////
class CControlPos2
{
public:
	CControlPos2(CWnd* pParent = NULL);
	virtual ~CControlPos2();

public:
	CRect GetNewBound();
	void SetParent(CWnd* pParent);

	BOOL AddControl(CWnd* pControl);
	BOOL AddControl(const UINT& unId);
	BOOL RemoveControl(CWnd* pControl);
	BOOL RemoveControl(const UINT& unId);
	void ResetControls(void);
	virtual void MoveControls(void);

private:
	CWnd*  m_pParent;
	CRect m_rectOriginalParent;
	CObArray m_awndControls;
protected:
	CRect m_rcNewBound;
};

//----------------------------------------------------
// internal structure used to hold all information
// about a CWnd* control
//
typedef struct tagCONTROLDATA
{
	HWND  hControl;	// HWND's never change; some MFC functions return temporary CWnd *'s
	CRect hOriginalButtonRect;
} CONTROLDATA, *LPCONTROLDATA;

#endif

⌨️ 快捷键说明

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