Creat 中 CRect(0,0,0,0)含义 creat是什么意思
creat rife ehjoylife\u4ec0\u4e48\u610f\u601dcreat rife ehjoy life
\u521b\u9020\u6d41\u884c\u4eab\u53d7\u751f\u6d3b
creat
N.\u7a7f\u5fc3\u83b2.
另附上MSDN的说明:
CEdit::Create
BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID );
Return Value
Nonzero if initialization is successful; otherwise 0.
Parameters
dwStyle
Specifies the edit control’s style. Apply any combination of edit styles to the control.
rect
Specifies the edit control’s size and position. Can be a CRect object or RECT structure.
pParentWnd
Specifies the edit control’s parent window (usually a CDialog). It must not be NULL.
nID
Specifies the edit control’s ID.
Remarks
You construct a CEdit object in two steps. First, call the CEdit constructor, then call Create, which creates the Windows edit control and attaches it to the CEdit object.
When Create executes, Windows sends theWM_NCCREATE,WM_NCCALCSIZE,WM_CREATE, andWM_GETMINMAXINFO messages to the edit control.
These messages are handled by default by the OnNcCreate, OnNcCalcSize, OnCreate, and OnGetMinMaxInfo member functions in the CWnd base class. To extend the default message handling, derive a class from CEdit, add a message map to the new class, and override the above message-handler member functions. Override OnCreate, for example, to perform needed initialization for the new class.
Apply the following window styles to an edit control.
WS_CHILD Always
WS_VISIBLE Usually
WS_DISABLED Rarely
WS_GROUP To group controls
WS_TABSTOP To include edit control in the tabbing order
Example
void CMyView::OnInitialUpdate()
{
CView::OnInitialUpdate();
// dynamically create an edit control on the view
CEdit* pEdit = new CEdit;
pEdit->Create(ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER,
CRect(10, 10, 100, 100), this, 1);
}
创建一个矩形。这里创建的空间你应该看不到。因为大小是0
坐标是(0,0,0,0)
CRect(0,0,0,0)描述编辑框的位置和大小,一般是left,top,right,bottom4个参数,分别代表矩形的左,上,右,下的坐标
你的程序不对哦,应该是Create把
CRect(0,0,0,0),就是一左上角为坐标远点,以点(0,0)和(0,0)建立矩形
扩展阅读:code2790057小奶猫 ... creatures 中文翻译 ... creative ... 在线翻译英译汉 ... creator 中文翻译 ... cream发音 ... coherent ... achievement ... create是什么意思 ...