当前位置: 首页>>代码示例>>C++>>正文


C++ SetCheck函数代码示例

本文整理汇总了C++中SetCheck函数的典型用法代码示例。如果您正苦于以下问题:C++ SetCheck函数的具体用法?C++ SetCheck怎么用?C++ SetCheck使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SetCheck函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetCheck

HTREEITEM KUIMulStatusTree::InsertItem(LPCTSTR lpszItem, HTREEITEM hParent, HTREEITEM hInsertAfter,  int nCheck)
{
	HTREEITEM hResult = CTreeViewCtrl::InsertItem(lpszItem, hParent, hInsertAfter);

	SetCheck(hResult, nCheck);

	return hResult;
}
开发者ID:6520874,项目名称:pcmanager,代码行数:8,代码来源:kuimulstatustree.cpp

示例2: InsertItem

int CPPageInternalFiltersListBox::AddFilter(filter_t* filter, bool checked)
{
    int index = InsertItem(GetItemCount(), filter->label);
    // SetItemDataPtr must be called before SetCheck
    SetItemData(index, reinterpret_cast<DWORD_PTR>(filter));
    SetCheck(index, checked);

    return index;
}
开发者ID:1ldk,项目名称:mpc-hc,代码行数:9,代码来源:PPageInternalFilters.cpp

示例3: AddString

int CPPageInternalFiltersListBox::AddFilter(filter_t* filter, bool checked)
{
    int index = AddString(filter->label);
    // SetItemDataPtr must be called before SetCheck
    SetItemDataPtr(index, filter);
    SetCheck(index, checked);

    return index;
}
开发者ID:GenomeXP,项目名称:mpc-hc,代码行数:9,代码来源:PPageInternalFilters.cpp

示例4: SetCheck

// 键盘事件处理
BOOL CCheckButton::OnControlKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
	// 处理快捷键
	if((m_nShortcutKey != 0) && (nChar == m_nShortcutKey) && (nFlags == m_nShortcutFlag))
	{
		SetCheck(!GetCheck());
		return true;
	}

	// 如果当前处于焦点状态,用空格键可以切换check
	if(m_bIsFocus && (nChar == VK_SPACE) && (nFlags == 0))
	{
		SetCheck(!GetCheck());
		return true;
	}

	return false;
}
开发者ID:LLLiuWeicai,项目名称:webposclient,代码行数:19,代码来源:CheckButton.cpp

示例5: SetCheck

// 从XML设置check属性
HRESULT CCheckButton::OnAttributeCheck(const CString& strValue, BOOL bLoading)
{
	if (strValue.IsEmpty()) return E_FAIL;

	BOOL bCheck = (strValue == "true");
	SetCheck(bCheck);

	return bLoading?S_FALSE:S_OK;
}
开发者ID:Gu-Yue,项目名称:DuiVision,代码行数:10,代码来源:CheckButton.cpp

示例6: SetCheck

bool Checkbox::OnMouseButtonEvent(bool bPressed, int /*iMouseButton*/, unsigned int /*x*/, unsigned int /*y*/)
{
    if (bPressed)
        return false;

    SetCheck(!IsChecked());

    return true;
}
开发者ID:vividos,项目名称:MultiplayerOnlineGame,代码行数:9,代码来源:Checkbox.cpp

示例7: SetItemData

int CIconListBox::AddString(LPCTSTR lpszItem, int iImg)
{
	int iRet = CListBox::AddString(lpszItem);
	if (iRet >= 0){
		SetItemData(iRet, iImg);
		SetCheck(iImg,1);
		SetCurSel(iImg);
	}
	return iRet;
}
开发者ID:lupnfer,项目名称:camc,代码行数:10,代码来源:IconListBox.cpp

示例8: GetCount

void ShipCheckListBox::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
	if (nChar == VK_SPACE)
	{
		int i, list_size;

		list_size = GetCount();
		for (i=0; i<list_size; i++)
			if (GetSel(i) > 0)
			{
				if (GetCheck(i))
					SetCheck(i, 0);
				else
					SetCheck(i, 1);
			}

	} else
		CCheckListBox::OnKeyDown(nChar, nRepCnt, nFlags);
}
开发者ID:RandomTiger,项目名称:fs2_source,代码行数:19,代码来源:ShipCheckListBox.cpp

示例9: SetCheck

void CheckButton::OnMouseLeftButtonUp(suic::MouseEventArg& e)
{
    if (IsMouseOver())
    {
        // 触发选中事件
        SetCheck(!_bChecked);
    }

    __super::OnMouseLeftButtonUp(e);
}
开发者ID:Alxe013,项目名称:sharpui,代码行数:10,代码来源:CheckButton.cpp

示例10: if

//
/// transfers state information for the TCheckBox
//
/// Overrides TWindow::Transfer. Transfers the check state of the check box to or
/// from buffer, using the values specified in the table in GetCheck(). If direction
/// is tdGetDate, the check box state is transferred into the buffer. If direction
/// is tdSetData, the check box state is changed to the settings in the transfer
/// buffer.
/// Transfer() returns the size of the transfer data in bytes. To get the size without
/// actually transferring the check box, use tdSizeData as the direction argument.
//
uint
TCheckBox::Transfer(void* buffer, TTransferDirection direction)
{
  if (direction == tdGetData)
    *(uint16*)buffer = (uint16)GetCheck();

  else if (direction == tdSetData)
    SetCheck(*(uint16*)buffer);

  return sizeof(uint16);
}
开发者ID:AlleyCat1976,项目名称:Meridian59_103,代码行数:22,代码来源:checkbox.cpp

示例11: SetCheck

// 键盘事件处理
BOOL CDuiRadioButton::OnControlKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
	// 处理快捷键
	if((m_nShortcutKey != 0) && (nChar == m_nShortcutKey) && (nFlags == m_nShortcutFlag))
	{
		SetCheck(TRUE);
		SendMessage(MSG_BUTTON_CHECK, 0, GetCheck());
		return true;
	}

	// 如果当前处于焦点状态,用空格键可以切换check
	if(m_bIsFocus && (nChar == VK_SPACE) && (nFlags == 0))
	{
		SetCheck(TRUE);
		SendMessage(MSG_BUTTON_CHECK, 0, GetCheck());
		return true;
	}

	return false;
}
开发者ID:blueantst,项目名称:DuiVision,代码行数:21,代码来源:RadioButton.cpp

示例12: OnLButtonUp

/////////////////////////////////////////////////////////////////////////////
//
//Method......: OnLButtonUp
//Class.......: CxSkinButton
//
//Author......: Milan Gardian
//Created.....: MAR-2001
//
//Return value: NONE
//Parameters..: As follows
//    > [in] nFlags: not used
//    > [in] point: coordinates of the mouse pointer when this event was spawned
//Exceptions..: NONE
//------------
//Description :
//
//  > Handle event when left button is released (goes up)
//
//---------------------------------------------------------
void CxSkinButton::OnLButtonUp(UINT nFlags, CPoint point)
{
    //TRACE("* %08X: up\n", ::GetTickCount());

	if (m_Style){ //track mouse for radio & check buttons
		POINT p2 = point;
		::ClientToScreen(m_hWnd, &p2);
		HWND mouse_wnd = ::WindowFromPoint(p2);
		if (mouse_wnd == m_hWnd){ // mouse is in button
			if (m_Style==BS_CHECKBOX) SetCheck(m_Checked ? 0 : 1);
			if (m_Style==BS_RADIOBUTTON) SetCheck(1);
		}
	}
	//Pass this message to the ToolTip control
	RelayEvent(WM_LBUTTONUP,(WPARAM)nFlags,MAKELPARAM(LOWORD(point.x),LOWORD(point.y)));

    //Default-process the message
    m_button_down = false;
	CButton::OnLButtonUp(nFlags, point);
}
开发者ID:BackupTheBerlios,项目名称:nextemf,代码行数:39,代码来源:xSkinButton.cpp

示例13: SetTextFromOption

bool COptionsPageEditAssociations::LoadPage()
{
	bool failure = false;

	COptions* pOptions = COptions::Get();

	SetTextFromOption(XRCID("ID_ASSOCIATIONS"), OPTION_EDIT_CUSTOMASSOCIATIONS, failure);
	SetCheck(XRCID("ID_INHERIT"), pOptions->GetOptionVal(OPTION_EDIT_INHERITASSOCIATIONS) != 0, failure);

	return !failure;
}
开发者ID:AbelTian,项目名称:filezilla,代码行数:11,代码来源:optionspage_edit_associations.cpp

示例14: SetCheck

void CMyCheckBox::OnLButtonDown(UINT nFlags, CPoint point)
{
	BOOL bChecked=0;
	if (m_nMyCBoxID==MyCBox_LiveView)
	{
		m_bCheckedLiveview ^= 1;
		 SetCheck(m_bCheckedLiveview ? BST_CHECKED : BST_UNCHECKED);
		 bChecked=m_bCheckedLiveview;
	}
	else if (m_nMyCBoxID==MyCBox_IPWall)
	{
		m_bCheckedIPwall ^= 1;
		 SetCheck(m_bCheckedIPwall ? BST_CHECKED : BST_UNCHECKED);
		 bChecked=m_bCheckedIPwall;
	}
    
   
    ((CMainFrame*)AfxGetMainWnd())->m_bAutoScan  = bChecked;
    ((CMainFrame*)AfxGetMainWnd())->vSetAutoScan(bChecked,m_nMyCBoxID);
    CButton::OnLButtonDown(nFlags, point);
}
开发者ID:YTYOON,项目名称:eNVR,代码行数:21,代码来源:DlgMatrixTag.cpp

示例15: Reset

void OptionsColumns::OnResetCanon()
{
	Reset(item_canon_);

	SetCheck(COL_EXP_PROG, false);		// exp. program
	SetCheck(COL_LIGHT_SRC, false);		// light src.

	SetCheck(COL_CAN_LENS, true);		// lens attached
	SetCheck(COL_CAN_TIMER, true);		// self timer
	SetCheck(COL_CAN_DRIVE, true);		// drive mode
	SetCheck(COL_CAN_FOCUS, true);		// focus mode
	SetCheck(COL_CAN_PROGRAM, true);	// program
	SetCheck(COL_CAN_MET_MODE, true);	// metering
}
开发者ID:mikekov,项目名称:ExifPro,代码行数:14,代码来源:OptionsColumns.cpp


注:本文中的SetCheck函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。