请输入您要查询的百科知识:

 

词条 GetCheck
释义

CButton::GetCheck

函数原型:

int GetCheck( ) const;

返回值:

The return value from a button control created with the BS_AUTOCHECKBOX, BS_AUTORADIOBUTTON, BS_AUTO3STATE, BS_CHECKBOX, BS_RADIOBUTTON, or BS_3STATE style is one of the following values:

BST_UNCHECKED Button state is unchecked.

BST_CHECKED Button state is checked.

BST_INDETERMINATE Button state is indeterminate (applies only if the button has the BS_3STATE or BS_AUTO3STATE style).

例子:

CButton myButton;// Create an auto 3-state

button.myButton.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_AUTO3STATE, CRect(10,10,100,30), pParentWnd, 1);

// Set the check state to the next state

// (i.e. BST_UNCHECKED changes to BST_CHECKED

// BST_CHECKED changes to BST_INDETERMINATE

// BST_INDETERMINATE changes to BST_UNCHECKED).

myButton.SetCheck( ((myButton.GetCheck()+ 1 ) % 3) );

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2024/12/23 5:59:34