示例#1
0
DialogItemEx *DialogBuilder::AddCheckbox(const wchar_t* Caption, BoolOption& Value)
{
	const auto Item = AddDialogItem(DI_CHECKBOX, Caption);
	SetNextY(Item);
	Item->X2 = Item->X1 + ItemWidth(*Item);
	Item->Selected = Value;
	SetLastItemBinding(CreateCheckBoxBinding(Value));
	return Item;
}
示例#2
0
DialogItemEx *DialogBuilder::AddCheckbox(lng TextMessageId, Bool3Option& Value)
{
	const auto Item = AddDialogItem(DI_CHECKBOX, GetLangString(TextMessageId));
	Item->Flags |= DIF_3STATE;
	SetNextY(Item);
	Item->X2 = Item->X1 + ItemWidth(*Item);
	Item->Selected = Value;
	SetLastItemBinding(CreateCheckBoxBinding(Value));
	return Item;
}
示例#3
0
		// Добавляет чекбокс.
		T *AddCheckbox(int TextMessageId, int *Value, int Mask=0, bool ThreeState=false)
		{
			T *Item = AddDialogItem(DI_CHECKBOX, GetLangString(TextMessageId));
			if (ThreeState && !Mask)
				Item->Flags |= DIF_3STATE;
			SetNextY(Item);
			Item->X2 = Item->X1 + ItemWidth(*Item);
			if (!Mask)
				Item->Selected = *Value;
			else
				Item->Selected = (*Value & Mask) != 0;
			SetLastItemBinding(CreateCheckBoxBinding(Value, Mask));
			return Item;
		}
示例#4
0
DialogItemEx *DialogBuilder::AddCheckbox(lng TextMessageId, IntOption& Value, int Mask, bool ThreeState)
{
	const auto Item = AddDialogItem(DI_CHECKBOX, GetLangString(TextMessageId));
	if (ThreeState && !Mask)
		Item->Flags |= DIF_3STATE;
	SetNextY(Item);
	Item->X2 = Item->X1 + ItemWidth(*Item);
	if (!Mask)
		Item->Selected = Value;
	else
		Item->Selected = (Value & Mask) != 0;
	SetLastItemBinding(CreateCheckBoxBinding(Value, Mask));
	return Item;
}