controlpos2.h
来自「VCsuishu fudai de yixie chengxuyuanma」· C头文件 代码 · 共 46 行
H
46 行
//------------------------------------------------------------------------------
// 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 + =
减小字号Ctrl + -
显示快捷键?