本文整理汇总了C++中CCheckBox::GetCheck方法的典型用法代码示例。如果您正苦于以下问题:C++ CCheckBox::GetCheck方法的具体用法?C++ CCheckBox::GetCheck怎么用?C++ CCheckBox::GetCheck使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCheckBox
的用法示例。
在下文中一共展示了CCheckBox::GetCheck方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ExtractProc
//.........这里部分代码省略.........
ExtractRadioSave.SetCheck(1, pOption->bSaveSrc);
ExtractRadioSave.SetCheck(2, pOption->bSaveDir);
ExtractEditSave.Create(hWnd, pOption->SaveDir, ID++, x_save + xx * 2 + 40, y_save += 20, 200, 22);
ExtractEditSave.Enable(pOption->bSaveDir);
ExtractBtnSave.Create(hWnd, _T("Browse"), ID++, x_save + xx * 2 + 250, y_save + 1, 50, 20);
ExtractBtnSave.Enable(pOption->bSaveDir);
//
y = (y_image > y_save) ? y_image : y_save;
ExtractLabelBuf.Create(hWnd, _T("Buffer Size(KB)"), ID++, x, y += 44, 100, 20);
ExtractEditBuf.Create(hWnd, pOption->BufSize, ID++, x + 100, y - 4, 110, 22);
//
ExtractLabelTmp.Create(hWnd, _T("Temporary Folder"), ID++, x, y += 24, 100, 20);
ExtractEditTmp.Create(hWnd, pOption->TmpDir, ID++, x + 100, y - 4, 200, 22);
ExtractBtnTmp.Create(hWnd, _T("Browse"), ID++, x + 310, y - 3, 50, 20);
break;
}
case WM_COMMAND:
// Checkbox
if (LOWORD(wp) >= ExtractCheck.front().GetID() && LOWORD(wp) <= ExtractCheck.back().GetID())
{
PropSheet_Changed(::GetParent(hWnd), hWnd);
break;
}
// Alpha blend check box
if (LOWORD(wp) == ExtractCheckAlpha.GetID())
{
ExtractEditAlpha.Enable(ExtractCheckAlpha.GetCheck());
PropSheet_Changed(::GetParent(hWnd), hWnd);
break;
}
//Output image format radio button
if (LOWORD(wp) >= ExtractRadioImage.GetID(0) && LOWORD(wp) <= ExtractRadioImage.GetID(1))
{
PropSheet_Changed(::GetParent(hWnd), hWnd);
break;
}
// Destination radio button
if (LOWORD(wp) >= ExtractRadioSave.GetID(0) && LOWORD(wp) <= ExtractRadioSave.GetID(2))
{
ExtractEditSave.Enable(ExtractRadioSave.GetCheck(2));
ExtractBtnSave.Enable(ExtractRadioSave.GetCheck(2));
PropSheet_Changed(::GetParent(hWnd), hWnd);
break;
}
// Output folder browse
if (LOWORD(wp) == ExtractBtnSave.GetID())
{
TCHAR szSaveDir[_MAX_DIR];
ExtractEditSave.GetText(szSaveDir, sizeof(szSaveDir));
if (FolderDlg.DoModal(hWnd, _T("Select the output folder"), szSaveDir))
ExtractEditSave.SetText(szSaveDir);
break;
}
// Temporary folder browse
if (LOWORD(wp) == ExtractBtnTmp.GetID())
示例2: SusieProc
LRESULT COption::SusieProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
{
static CFolderDialog FolderDlg;
static SOption* pOption = &m_option_tmp;
static CCheckBox SusieCheckUse, SusieCheckFirst;
static CLabel SusieLabelDir;
static CEditBox SusieEditDir;
static CButton SusieBtnDir, SusieBtnUpdate;
static std::array<CButton, 2> SusieBtn;
static CSusieListView SusieListView;
static CSusie susie;
switch (msg)
{
case WM_INITDIALOG:
{
UINT ID = 10000;
const int x = 10;
const int xx = 15;
int y = 0;
SusieCheckUse.Create(hWnd, _T("Use Susie Plugins"), ID++, x + 15, y += 20, 200, 20);
SusieCheckUse.SetCheck(pOption->bSusieUse);
SusieLabelDir.Create(hWnd, _T("Susie Folder"), ID++, x + xx, y += 24, 75, 20);
SusieEditDir.Create(hWnd, pOption->SusieDir, ID++, x + xx + 75, y - 4, 200, 22);
SusieEditDir.Enable(pOption->bSusieUse);
SusieBtnDir.Create(hWnd, _T("Browse"), ID++, x + xx + 280, y - 3, 50, 20);
SusieBtnDir.Enable(pOption->bSusieUse);
SusieCheckFirst.Create(hWnd, _T("Give Susie plugins priority when decoding"), ID++, x + xx, y += 20, 250, 20);
SusieCheckFirst.SetCheck(pOption->bSusieFirst);
SusieCheckFirst.Enable(pOption->bSusieUse);
SusieListView.Create(hWnd, *pOption, x + xx, y += 30, 500, 190);
SusieListView.Close();
SusieListView.Enable(pOption->bSusieUse);
SusieListView.Show();
SusieBtnUpdate.Create(hWnd, _T("Update"), ID++, x + 290, y += 200, 50, 20);
SusieBtnUpdate.Enable(pOption->bSusieUse);
SusieBtn[0].Create(hWnd, _T("All ON"), ID++, x + 350, y, 80, 20);
SusieBtn[0].Enable(pOption->bSusieUse);
SusieBtn[1].Create(hWnd, _T("All OFF"), ID++, x + 430, y, 80, 20);
SusieBtn[1].Enable(pOption->bSusieUse);
break;
}
case WM_COMMAND:
// Use Susie plugins
if (LOWORD(wp) == SusieCheckUse.GetID())
{
const BOOL flag = SusieCheckUse.GetCheck();
SusieEditDir.Enable(flag);
SusieBtnDir.Enable(flag);
SusieCheckFirst.Enable(flag);
SusieListView.Enable(flag);
SusieBtnUpdate.Enable(flag);
SusieBtn[0].Enable(flag);
SusieBtn[1].Enable(flag);
PropSheet_Changed(::GetParent(hWnd), hWnd);
// Click here to show / hide the list of checkboxes, de-selected state
pOption->bSusieUse = flag;
SusieListView.SetItemSelAll(0);
break;
}
// Susie Folder Browse
if (LOWORD(wp) == SusieBtnDir.GetID())
{
TCHAR szSusieDir[_MAX_DIR];
SusieEditDir.GetText(szSusieDir, sizeof(szSusieDir));
if (FolderDlg.DoModal(hWnd, _T("Select the Susie folder"), szSusieDir))
SusieEditDir.SetText(szSusieDir);
}
// Give Susie plugins priority on decoding
if (LOWORD(wp) == SusieCheckFirst.GetID())
{
PropSheet_Changed(::GetParent(hWnd), hWnd);
break;
}
// Update
if (LOWORD(wp) == SusieBtnUpdate.GetID())
{
susie.LoadSpi(pOption->SusieDir);
susie.Init();
SusieListView.Show();
SusieListView.Update();
break;
}
// All ON
if (LOWORD(wp) == SusieBtn[0].GetID())
{
SusieListView.SetCheckAll(true);
PropSheet_Changed(::GetParent(hWnd), hWnd);
//.........这里部分代码省略.........
示例3: StdProc
//.........这里部分代码省略.........
// Search Settings
SearchGroup.Create(hWnd, _T("Files to be searched"), ID++, x, y += 40, 510, 100);
//y += 20;
for (size_t i = 0, xxx = 0; i < SearchCheckNum; i++, xxx += 55)
{
if ((i % 8) == 0)
{
xxx = 0, y += 20;
}
SearchCheck[i].Create(hWnd, search_files_labels[i], ID++, x + xx + static_cast<int>(xxx), y, 50, 20);
SearchCheck[i].SetCheck(pOption->bSearch[i]);
}
SearchBtn[0].Create(hWnd, _T("Select all"), ID++, 350, y += 30, 80, 20);
SearchBtn[1].Create(hWnd, _T("Deselect all"), ID++, 430, y, 80, 20);
// Search Accuracy Settings
HighSearchGroup.Create(hWnd, _T("Search Accuracy"), ID++, x, y += 40, 510, 50);
HighSearchCheckOgg.Create(hWnd, _T("Increase the accuracy of OGG searches"), ID++, x + xx, y += 20, 220, 20);
HighSearchCheckOgg.SetCheck(pOption->bHighSearchOgg);
break;
}
case WM_COMMAND:
// Check the file search box
if (LOWORD(wp) >= SearchCheck[0].GetID() && LOWORD(wp) <= SearchCheck[SearchCheckNum-1].GetID())
{
const int number = LOWORD(wp) - SearchCheck[0].GetID();
pOption->bSearch[number] ^= 1;
SearchCheck[number].SetCheck(pOption->bSearch[number]);
PropSheet_Changed(::GetParent(hWnd), hWnd);
break;
}
// Select all
if (LOWORD(wp) == SearchBtn[0].GetID())
{
for (size_t i = 0; i < SearchCheckNum; i++)
{
pOption->bSearch[i] = TRUE;
SearchCheck[i].SetCheck(pOption->bSearch[i]);
}
PropSheet_Changed(::GetParent(hWnd), hWnd);
break;
}
// Deselect
if (LOWORD(wp) == SearchBtn[1].GetID())
{
for (size_t i = 0; i < SearchCheckNum; i++)
{
pOption->bSearch[i] = FALSE;
SearchCheck[i].SetCheck(pOption->bSearch[i]);
}
PropSheet_Changed(::GetParent(hWnd), hWnd);
break;
}
if (LOWORD(wp) == HighSearchCheckOgg.GetID())
{
PropSheet_Changed(::GetParent(hWnd), hWnd);
break;
}
// The contents of the editbox have been changed
if (HIWORD(wp) == EN_CHANGE)
{
PropSheet_Changed(::GetParent(hWnd), hWnd);
break;
}
break;
case WM_NOTIFY:
{
const auto* const hdr = reinterpret_cast<LPNMHDR>(lp);
switch (hdr->code)
{
// Apply/OK, Tabbing
case PSN_APPLY:
case PSN_KILLACTIVE:
ListEditBk.GetText(&pOption->ListBkColor, TRUE);
_stprintf(pOption->szListBkColor, _T("%06x"), pOption->ListBkColor);
ListEditText.GetText(&pOption->ListTextColor, TRUE);
_stprintf(pOption->szListTextColor, _T("%06x"), pOption->ListTextColor);
pOption->bHighSearchOgg = HighSearchCheckOgg.GetCheck();
// OK/Apply
if (hdr->code == PSN_APPLY)
Apply();
return TRUE;
}
break;
}
}
return FALSE;
}