www.pudn.com > MFCVista.rar > IontrlPos.h


 
 
#pragma once 
#include "afxwin.h" 
//控件位置 
class AFX_EXT_CLASS CIontrlPos:public CRect 
{ 
private: 
	CRect	m_rctClient; 
	CPoint	m_ptMouse; 
public: 
	CWnd	*m_pWnd; 
	bool	m_bDlgWnd; 
	CIontrlPos(CWnd *pWnd,bool bDlgWnd=0); 
	CIontrlPos(); 
	bool	Load(CWnd *pWnd,bool bDlgWnd=0);	 
	virtual ~CIontrlPos(void); 
public:	 
	int //--{{对Dialog类型有意义 
			m_iParentWndTitleHeight, 
			m_iParentWndRectThick; 
	    //--}} 
public:	 
	bool	MoveWindowEx(int xPos=-1,int yPos=-1,int Width=-1,int Height=-1); 
	bool	MoveXY(int xPos,int yPos=0); 
	bool	MoveWH(int Width,int Height=0);		 
	void	Update(); 
	bool	MouseIn(); 
	CRect	&GetClientRectEx(); 
};