本文整理汇总了C++中CButton::Enable方法的典型用法代码示例。如果您正苦于以下问题:C++ CButton::Enable方法的具体用法?C++ CButton::Enable怎么用?C++ CButton::Enable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CButton
的用法示例。
在下文中一共展示了CButton::Enable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
LRESULT OnCompleted( WPARAM wParam, LPARAM lParam ){
TString str;
str.Format(_T("___Task #%u was the last task of the batch____"), lParam);
AddMessage( (LPCTSTR)str );
m_btnStart.Enable( TRUE );
return 0;
}
示例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: ExtractProc
LRESULT COption::ExtractProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
{
static CFolderDialog FolderDlg;
static SOption* pOption = &m_option_tmp;
// Extraction Settings
static constexpr std::array<LPCTSTR, 3> ExtractCheckText{{
_T("Extract each folder"),
_T("Fix the CRC of OGG files upon extraction"),
_T("Enable simple decoding")
}};
static const std::array<BOOL*, 4> ExtractCheckFlag{{
&pOption->bCreateFolder, &pOption->bFixOgg, &pOption->bEasyDecrypt, &pOption->bRenameScriptExt
}};
static std::array<CCheckBox, ExtractCheckText.size()> ExtractCheck;
static CCheckBox ExtractCheckAlpha;
static CLabel ExtractLabelPng, ExtractLabelAlpha, ExtractLabelBuf, ExtractLabelTmp;
static CRadioBtn ExtractRadioImage, ExtractRadioSave;
static CUpDown ExtractUpDownPng;
static CEditBox ExtractEditPng, ExtractEditAlpha, ExtractEditSave, ExtractEditBuf, ExtractEditTmp;
static CButton ExtractBtnSave, ExtractBtnTmp;
static CGroupBox ExtractGroupImage, ExtractGroupSave;
switch (msg)
{
case WM_INITDIALOG:
{
UINT ID = 10000;
const int x = 10;
const int xx = 15;
int y = 0;
// Extraction Settings
for (size_t i = 0; i < ExtractCheckText.size(); i++)
{
ExtractCheck[i].Create(hWnd, ExtractCheckText[i], ID++, x, y += 20, 230, 20);
ExtractCheck[i].SetCheck(*ExtractCheckFlag[i]);
}
//
int y_image = y;
ExtractGroupImage.Create(hWnd, _T("Output image format"), ID++, x, y_image += 34, 240, 110);
ExtractRadioImage.Close();
ExtractRadioImage.Create(hWnd, _T("BMP"), ID++, x + xx, y_image += 18, 50, 20);
ExtractRadioImage.Create(hWnd, _T("PNG"), ID++, x + xx, y_image += 20, 50, 20);
ExtractRadioImage.SetCheck(0, pOption->bDstBMP);
ExtractRadioImage.SetCheck(1, pOption->bDstPNG);
ExtractLabelPng.Create(hWnd, _T("Compression Level"), ID++, x + xx + 50, y_image + 3, 100, 20);
ExtractEditPng.Create(hWnd, _T(""), ID++, x + xx + 150, y_image, 40, 22);
ExtractEditPng.SetLimit(1);
ExtractUpDownPng.Create(hWnd, ExtractEditPng.GetCtrlHandle(), pOption->CmplvPng, ID++, 9, 0);
//
ExtractCheckAlpha.Create(hWnd, _T("Enable alpha blending"), ID++, x + xx, y_image += 22, 140, 20);
ExtractCheckAlpha.SetCheck(pOption->bAlphaBlend);
ExtractLabelAlpha.Create(hWnd, _T("Background color"), ID++, x + xx * 2 + 4, y_image += 24, 100, 20);
ExtractEditAlpha.Create(hWnd, pOption->szBgRGB, ID++, x + xx * 2 + 100, y_image - 4, 100, 22);
ExtractEditAlpha.SetLimit(6);
ExtractEditAlpha.Enable(pOption->bAlphaBlend);
//
const int x_save = x + 200;
int y_save = y;
ExtractGroupSave.Create(hWnd, _T("Destination"), ID++, x_save + 50, y_save += 34, 290, 110);
ExtractRadioSave.Close();
ExtractRadioSave.Create(hWnd, _T("Specify each time"), ID++, x_save + xx + 50, y_save += 18, 220, 20);
ExtractRadioSave.Create(hWnd, _T("Same folder as input source"), ID++, x_save + xx + 50, y_save += 20, 200, 20);
ExtractRadioSave.Create(hWnd, _T("The following folder"), ID++, x_save + xx + 50, y_save += 20, 200, 20);
ExtractRadioSave.SetCheck(0, pOption->bSaveSel);
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:
//.........这里部分代码省略.........