本文整理汇总了C++中EnableWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ EnableWindow函数的具体用法?C++ EnableWindow怎么用?C++ EnableWindow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了EnableWindow函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: OSEnterMutex
//.........这里部分代码省略.........
String strPlaybackDevice = AppConfig->GetString(TEXT("Audio"), TEXT("PlaybackDevice"), TEXT("Default"));
if(strPlaybackDevice.IsEmpty() || !playbackDevices.HasID(strPlaybackDevice))
{
AppConfig->SetString(TEXT("Audio"), TEXT("PlaybackDevice"), TEXT("Default"));
strPlaybackDevice = TEXT("Default");
}
Log(TEXT("Playback device %s"), strPlaybackDevice.Array());
playbackDevices.FreeData();
desktopAudio = CreateAudioSource(false, strPlaybackDevice);
if(!desktopAudio) {
CrashError(TEXT("Cannot initialize desktop audio sound, more info in the log file."));
}
AudioDeviceList audioDevices;
GetAudioDevices(audioDevices, ADT_RECORDING);
String strDevice = AppConfig->GetString(TEXT("Audio"), TEXT("Device"), NULL);
if(strDevice.IsEmpty() || !audioDevices.HasID(strDevice))
{
AppConfig->SetString(TEXT("Audio"), TEXT("Device"), TEXT("Disable"));
strDevice = TEXT("Disable");
}
audioDevices.FreeData();
String strDefaultMic;
bool bHasDefault = GetDefaultMicID(strDefaultMic);
if(strDevice.CompareI(TEXT("Disable")))
EnableWindow(GetDlgItem(hwndMain, ID_MICVOLUME), FALSE);
else
{
bool bUseDefault = strDevice.CompareI(TEXT("Default")) != 0;
if(!bUseDefault || bHasDefault)
{
if(bUseDefault)
strDevice = strDefaultMic;
micAudio = CreateAudioSource(true, strDevice);
if(!micAudio)
MessageBox(hwndMain, Str("MicrophoneFailure"), NULL, 0);
else
micAudio->SetTimeOffset(AppConfig->GetInt(TEXT("Audio"), TEXT("MicTimeOffset"), 0));
EnableWindow(GetDlgItem(hwndMain, ID_MICVOLUME), micAudio != NULL);
}
else
EnableWindow(GetDlgItem(hwndMain, ID_MICVOLUME), FALSE);
}
//-------------------------------------------------------------
bool bDisableEncoding = false;
if (bTestStream)
bDisableEncoding = GlobalConfig->GetInt(TEXT("General"), TEXT("DisablePreviewEncoding"), false) != 0;
//-------------------------------------------------------------
UINT bitRate = (UINT)AppConfig->GetInt(TEXT("Audio Encoding"), TEXT("Bitrate"), 96);
String strEncoder = AppConfig->GetString(TEXT("Audio Encoding"), TEXT("Codec"), TEXT("AAC"));
开发者ID:gameroast,项目名称:OBS,代码行数:67,代码来源:OBSCapture.cpp示例2: update_dialog_fields
//.........这里部分代码省略.........
resid = IDS_PISTATE_PLACEHOLD;
break;
case KMM_PLUGIN_STATE_REG:
case KMM_PLUGIN_STATE_PREINIT:
resid = IDS_PISTATE_REG;
break;
case KMM_PLUGIN_STATE_HOLD:
resid = IDS_PISTATE_HOLD;
break;
case KMM_PLUGIN_STATE_INIT:
resid = IDS_PISTATE_INIT;
break;
case KMM_PLUGIN_STATE_RUNNING:
resid = IDS_PISTATE_RUN;
break;
case KMM_PLUGIN_STATE_EXITED:
resid = IDS_PISTATE_EXIT;
break;
default:
#ifdef DEBUG
assert(FALSE);
#endif
resid = IDS_PISTATE_FAILUNK;
}
LoadString(khm_hInstance, resid,
buf, ARRAYLENGTH(buf));
SetDlgItemText(hwnd, IDC_CFG_STATE, buf);
SendDlgItemMessage(hwnd, IDC_CFG_DEPS,
LB_RESETCONTENT, 0, 0);
for (t = info->plugin.reg.dependencies; t && *t;
t = multi_string_next(t)) {
SendDlgItemMessage(hwnd, IDC_CFG_DEPS,
LB_INSERTSTRING, (WPARAM) -1, (LPARAM) t);
}
if (info->plugin.reg.module)
SetDlgItemText(hwnd, IDC_CFG_MODULE,
info->plugin.reg.module);
else
SetDlgItemText(hwnd, IDC_CFG_MODULE,
L"");
if (info->module.reg.vendor)
SetDlgItemText(hwnd, IDC_CFG_VENDOR,
info->module.reg.vendor);
else
SetDlgItemText(hwnd, IDC_CFG_VENDOR,
L"");
StringCbPrintf(buf, sizeof(buf), L"%u.%u.%u.%u",
(unsigned int) info->module.product_version.major,
(unsigned int) info->module.product_version.minor,
(unsigned int) info->module.product_version.patch,
(unsigned int) info->module.product_version.aux);
SetDlgItemText(hwnd, IDC_CFG_VERSION, buf);
if (info->plugin.reg.icon) {
SendDlgItemMessage(hwnd, IDC_CFG_ICON,
STM_SETICON,
(WPARAM) info->plugin.reg.icon,
0);
} else {
SendDlgItemMessage(hwnd, IDC_CFG_ICON,
STM_SETICON,
(WPARAM) d->plugin_ico,
0);
}
if (KHM_SUCCEEDED(kmm_get_module_config(info->module.reg.name,
0, &csp_module)) &&
(khc_value_exists(csp_module, L"ImagePath") &
(KCONF_FLAG_MACHINE | KCONF_FLAG_USER))) {
EnableWindow(GetDlgItem(hwnd, IDC_CFG_UNREGISTER), TRUE);
} else {
EnableWindow(GetDlgItem(hwnd, IDC_CFG_UNREGISTER), FALSE);
}
if (csp_module)
khc_close_space(csp_module);
if (info->plugin.flags & KMM_PLUGIN_FLAG_DISABLED) {
EnableWindow(GetDlgItem(hwnd, IDC_CFG_ENABLE), TRUE);
EnableWindow(GetDlgItem(hwnd, IDC_CFG_DISABLE), FALSE);
} else {
EnableWindow(GetDlgItem(hwnd, IDC_CFG_ENABLE), FALSE);
EnableWindow(GetDlgItem(hwnd, IDC_CFG_DISABLE), TRUE);
}
}
开发者ID:FarazShaikh,项目名称:LikewiseSMB2,代码行数:101,代码来源:cfg_plugins_wnd.c示例3: COMDLG32_FindReplaceDlgProc
/***********************************************************************
* COMDLG32_FindReplaceDlgProc [internal]
* [Find/Replace]Text32[A/W] window procedure.
*/
static INT_PTR CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
COMDLG32_FR_Data *pdata = (COMDLG32_FR_Data *)GetPropA(hDlgWnd, (LPSTR)COMDLG32_Atom);
INT_PTR retval = TRUE;
if(iMsg == WM_INITDIALOG)
{
pdata = (COMDLG32_FR_Data *)lParam;
if(!SetPropA(hDlgWnd, (LPSTR)COMDLG32_Atom, (HANDLE)pdata))
{
ERR("Could not Set prop; invent a gracefull exit?...\n");
DestroyWindow(hDlgWnd);
return FALSE;
}
SendDlgItemMessageA(hDlgWnd, edt1, EM_SETLIMITTEXT, (WPARAM)pdata->fr.wFindWhatLen, 0);
SendDlgItemMessageA(hDlgWnd, edt1, WM_SETTEXT, 0, (LPARAM)pdata->fr.lpstrFindWhat);
if(pdata->fr.Flags & FR_WINE_REPLACE)
{
SendDlgItemMessageA(hDlgWnd, edt2, EM_SETLIMITTEXT, (WPARAM)pdata->fr.wReplaceWithLen, 0);
SendDlgItemMessageA(hDlgWnd, edt2, WM_SETTEXT, 0, (LPARAM)pdata->fr.lpstrReplaceWith);
}
if(!(pdata->fr.Flags & FR_SHOWHELP))
ShowWindow(GetDlgItem(hDlgWnd, pshHelp), SW_HIDE);
if(pdata->fr.Flags & FR_HIDEUPDOWN)
{
ShowWindow(GetDlgItem(hDlgWnd, rad1), SW_HIDE);
ShowWindow(GetDlgItem(hDlgWnd, rad2), SW_HIDE);
ShowWindow(GetDlgItem(hDlgWnd, grp1), SW_HIDE);
}
else if(pdata->fr.Flags & FR_NOUPDOWN)
{
EnableWindow(GetDlgItem(hDlgWnd, rad1), FALSE);
EnableWindow(GetDlgItem(hDlgWnd, rad2), FALSE);
EnableWindow(GetDlgItem(hDlgWnd, grp1), FALSE);
}
else
{
SendDlgItemMessageA(hDlgWnd, rad1, BM_SETCHECK, pdata->fr.Flags & FR_DOWN ? 0 : BST_CHECKED, 0);
SendDlgItemMessageA(hDlgWnd, rad2, BM_SETCHECK, pdata->fr.Flags & FR_DOWN ? BST_CHECKED : 0, 0);
}
if(pdata->fr.Flags & FR_HIDEMATCHCASE)
ShowWindow(GetDlgItem(hDlgWnd, chx2), SW_HIDE);
else if(pdata->fr.Flags & FR_NOMATCHCASE)
EnableWindow(GetDlgItem(hDlgWnd, chx2), FALSE);
else
SendDlgItemMessageA(hDlgWnd, chx2, BM_SETCHECK, pdata->fr.Flags & FR_MATCHCASE ? BST_CHECKED : 0, 0);
if(pdata->fr.Flags & FR_HIDEWHOLEWORD)
ShowWindow(GetDlgItem(hDlgWnd, chx1), SW_HIDE);
else if(pdata->fr.Flags & FR_NOWHOLEWORD)
EnableWindow(GetDlgItem(hDlgWnd, chx1), FALSE);
else
SendDlgItemMessageA(hDlgWnd, chx1, BM_SETCHECK, pdata->fr.Flags & FR_WHOLEWORD ? BST_CHECKED : 0, 0);
/* We did the init here, now call the hook if requested */
/* We do not do ShowWindow if hook exists and is FALSE */
/* per MSDN Article Q96135 */
if((pdata->fr.Flags & FR_ENABLEHOOK)
&& ! pdata->fr.lpfnHook(hDlgWnd, iMsg, wParam, (LPARAM) &pdata->fr))
return TRUE;
ShowWindow(hDlgWnd, SW_SHOWNORMAL);
UpdateWindow(hDlgWnd);
return TRUE;
}
if(pdata && (pdata->fr.Flags & FR_ENABLEHOOK))
{
retval = pdata->fr.lpfnHook(hDlgWnd, iMsg, wParam, lParam);
}
else
retval = FALSE;
if(pdata && !retval)
{
retval = TRUE;
switch(iMsg)
{
case WM_COMMAND:
COMDLG32_FR_HandleWMCommand(hDlgWnd, pdata, LOWORD(wParam), HIWORD(wParam));
break;
case WM_CLOSE:
COMDLG32_FR_HandleWMCommand(hDlgWnd, pdata, IDCANCEL, BN_CLICKED);
break;
case WM_HELP:
/* Heeeeelp! */
FIXME("Got WM_HELP. Who is gonna supply it?\n");
break;
case WM_CONTEXTMENU:
/* Heeeeelp! */
FIXME("Got WM_CONTEXTMENU. Who is gonna supply it?\n");
//.........这里部分代码省略.........
开发者ID:howard5888,项目名称:wineT,代码行数:101,代码来源:finddlg32.c示例4: EspServiceRecoveryDlgProc
INT_PTR CALLBACK EspServiceRecoveryDlgProc(
_In_ HWND hwndDlg,
_In_ UINT uMsg,
_In_ WPARAM wParam,
_In_ LPARAM lParam
)
{
PSERVICE_RECOVERY_CONTEXT context;
if (uMsg == WM_INITDIALOG)
{
context = PhAllocate(sizeof(SERVICE_RECOVERY_CONTEXT));
memset(context, 0, sizeof(SERVICE_RECOVERY_CONTEXT));
SetProp(hwndDlg, L"Context", (HANDLE)context);
}
else
{
context = (PSERVICE_RECOVERY_CONTEXT)GetProp(hwndDlg, L"Context");
if (uMsg == WM_DESTROY)
RemoveProp(hwndDlg, L"Context");
}
if (!context)
return FALSE;
switch (uMsg)
{
case WM_INITDIALOG:
{
NTSTATUS status;
LPPROPSHEETPAGE propSheetPage = (LPPROPSHEETPAGE)lParam;
PPH_SERVICE_ITEM serviceItem = (PPH_SERVICE_ITEM)propSheetPage->lParam;
context->ServiceItem = serviceItem;
EspAddServiceActionStrings(GetDlgItem(hwndDlg, IDC_FIRSTFAILURE));
EspAddServiceActionStrings(GetDlgItem(hwndDlg, IDC_SECONDFAILURE));
EspAddServiceActionStrings(GetDlgItem(hwndDlg, IDC_SUBSEQUENTFAILURES));
status = EspLoadRecoveryInfo(hwndDlg, context);
if (status == STATUS_SOME_NOT_MAPPED)
{
if (context->NumberOfActions > 3)
{
PhShowWarning(
hwndDlg,
L"The service has %lu failure actions configured, but this program only supports editing 3. "
L"If you save the recovery information using this program, the additional failure actions will be lost.",
context->NumberOfActions
);
}
}
else if (!NT_SUCCESS(status))
{
SetDlgItemText(hwndDlg, IDC_RESETFAILCOUNT, L"0");
if (WindowsVersion >= WINDOWS_VISTA)
{
context->EnableFlagCheckBox = TRUE;
EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLEFORERRORSTOPS), TRUE);
}
PhShowWarning(hwndDlg, L"Unable to query service recovery information: %s",
((PPH_STRING)PH_AUTO(PhGetNtMessage(status)))->Buffer);
}
EspFixControls(hwndDlg, context);
context->Ready = TRUE;
}
break;
case WM_DESTROY:
{
PhClearReference(&context->RebootMessage);
PhFree(context);
}
break;
case WM_COMMAND:
{
switch (LOWORD(wParam))
{
case IDC_FIRSTFAILURE:
case IDC_SECONDFAILURE:
case IDC_SUBSEQUENTFAILURES:
{
if (HIWORD(wParam) == CBN_SELCHANGE)
{
EspFixControls(hwndDlg, context);
}
}
break;
case IDC_RESTARTCOMPUTEROPTIONS:
{
DialogBoxParam(
PluginInstance->DllBase,
MAKEINTRESOURCE(IDD_RESTARTCOMP),
hwndDlg,
//.........这里部分代码省略.........
开发者ID:Azarien,项目名称:processhacker2,代码行数:101,代码来源:recovery.c示例5: DlgProcRecvFile
//.........这里部分代码省略.........
switch ( LOWORD( wParam )) {
case IDC_FILEDIRBROWSE:
{
TCHAR szDirName[MAX_PATH],szExistingDirName[MAX_PATH];
GetDlgItemText(hwndDlg,IDC_FILEDIR,szDirName,SIZEOF(szDirName));
GetLowestExistingDirName(szDirName,szExistingDirName,SIZEOF(szExistingDirName));
if(BrowseForFolder(hwndDlg,szExistingDirName))
SetDlgItemText(hwndDlg,IDC_FILEDIR,szExistingDirName);
}
break;
case IDOK:
{ //most recently used directories
TCHAR szRecvDir[MAX_PATH],szDefaultRecvDir[MAX_PATH];
GetDlgItemText(hwndDlg,IDC_FILEDIR,szRecvDir,SIZEOF(szRecvDir));
RemoveInvalidPathChars(szRecvDir);
GetContactReceivedFilesDir(NULL,szDefaultRecvDir,SIZEOF(szDefaultRecvDir),TRUE);
if(_tcsnicmp(szRecvDir,szDefaultRecvDir,lstrlen(szDefaultRecvDir))) {
char idstr[32];
int i;
DBVARIANT dbv;
for(i=MAX_MRU_DIRS-2;i>=0;i--) {
mir_snprintf(idstr, SIZEOF(idstr), "MruDir%d",i);
if(DBGetContactSettingTString(NULL,"SRFile",idstr,&dbv)) continue;
mir_snprintf(idstr, SIZEOF(idstr), "MruDir%d",i+1);
DBWriteContactSettingTString(NULL,"SRFile",idstr,dbv.ptszVal);
DBFreeVariant(&dbv);
}
DBWriteContactSettingTString(NULL,"SRFile",idstr,szRecvDir);
}
}
EnableWindow(GetDlgItem(hwndDlg,IDC_FILENAMES),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_MSG),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_FILEDIR),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_FILEDIRBROWSE),FALSE);
GetDlgItemText(hwndDlg,IDC_FILEDIR,dat->szSavePath,SIZEOF(dat->szSavePath));
GetDlgItemText(hwndDlg,IDC_FILE,dat->szFilenames,SIZEOF(dat->szFilenames));
GetDlgItemText(hwndDlg,IDC_MSG,dat->szMsg,SIZEOF(dat->szMsg));
dat->hwndTransfer = FtMgr_AddTransfer(dat);
SetWindowLongPtr( hwndDlg, GWLP_USERDATA, 0);
//check for auto-minimize here to fix BUG#647620
if(DBGetContactSettingByte(NULL,"SRFile","AutoAccept",0) && DBGetContactSettingByte(NULL,"SRFile","AutoMin",0)) {
ShowWindow(hwndDlg,SW_HIDE);
ShowWindow(hwndDlg,SW_SHOWMINNOACTIVE);
}
DestroyWindow(hwndDlg);
break;
case IDCANCEL:
if (dat->fs) CallContactService(dat->hContact,PSS_FILEDENYT,(WPARAM)dat->fs,(LPARAM)TranslateT("Cancelled"));
dat->fs=NULL; /* the protocol will free the handle */
DestroyWindow(hwndDlg);
break;
case IDC_ADD:
{ ADDCONTACTSTRUCT acs={0};
acs.handle=dat->hContact;
acs.handleType=HANDLE_CONTACT;
acs.szProto="";
CallService(MS_ADDCONTACT_SHOW,(WPARAM)hwndDlg,(LPARAM)&acs);
if(!DBGetContactSettingByte(dat->hContact,"CList","NotOnList",0))
ShowWindow(GetDlgItem(hwndDlg,IDC_ADD), SW_HIDE);
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:67,代码来源:filerecvdlg.cpp示例6: enableTimeInput
void enableTimeInput(HWND hDlg, BOOL enable)
{
EnableWindow(GetDlgItem(hDlg, IDC_MINUTES), enable);
EnableWindow(GetDlgItem(hDlg, IDC_SECONDS), enable);
}
开发者ID:epi,项目名称:asap,代码行数:5,代码来源:settings_dlg.c示例7: OptionsDlgProc
static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
{
OptionsPageData *opd;
OptionsDlgData *dat = (OptionsDlgData*)GetWindowLongPtr(hdlg, GWLP_USERDATA);
HWND hwndTree = GetDlgItem(hdlg, IDC_PAGETREE);
switch (message) {
case WM_CTLCOLORSTATIC:
switch (GetDlgCtrlID((HWND)lParam)) {
case IDC_WHITERECT:
case IDC_KEYWORD_FILTER:
SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
return (INT_PTR)GetSysColorBrush(COLOR_WINDOW);
}
break;
case WM_INITDIALOG:
TranslateDialogDefault(hdlg);
if (!ServiceExists(MS_MODERNOPT_SHOW))
ShowWindow(GetDlgItem(hdlg, IDC_MODERN), FALSE);
dat = new OptionsDlgData;
SetWindowLongPtr(hdlg, GWLP_USERDATA, (LONG_PTR)dat);
Utils_RestoreWindowPositionNoSize(hdlg, NULL, "Options", "");
Window_SetIcon_IcoLib(hdlg, SKINICON_OTHER_OPTIONS);
EnableWindow(GetDlgItem(hdlg, IDC_APPLY), FALSE);
{
COMBOBOXINFO cbi;
cbi.cbSize = sizeof(COMBOBOXINFO);
GetComboBoxInfo(GetDlgItem(hdlg, IDC_KEYWORD_FILTER), &cbi);
mir_subclassWindow(cbi.hwndItem, OptionsFilterSubclassProc);
if (IsAeroMode()) {
mir_subclassWindow(cbi.hwndCombo, AeroPaintSubclassProc);
mir_subclassWindow(cbi.hwndItem, AeroPaintSubclassProc);
}
PROPSHEETHEADER *psh = (PROPSHEETHEADER*)lParam;
SetWindowText(hdlg, psh->pszCaption);
LOGFONT lf;
dat->hBoldFont = (HFONT)SendDlgItemMessage(hdlg, IDC_APPLY, WM_GETFONT, 0, 0);
GetObject(dat->hBoldFont, sizeof(lf), &lf);
lf.lfWeight = FW_BOLD;
dat->hBoldFont = CreateFontIndirect(&lf);
dat->hPluginLoad = HookEventMessage(ME_SYSTEM_MODULELOAD, hdlg, HM_MODULELOAD);
dat->hPluginUnload = HookEventMessage(ME_SYSTEM_MODULEUNLOAD, hdlg, HM_MODULEUNLOAD);
dat->currentPage = -1;
ptrT lastPage, lastGroup, lastTab;
OPENOPTIONSDIALOG *ood = (OPENOPTIONSDIALOG*)psh->pStartPage;
if (ood->pszPage == NULL) {
lastPage = db_get_tsa(NULL, "Options", "LastPage");
if (ood->pszGroup == NULL)
lastGroup = db_get_tsa(NULL, "Options", "LastGroup");
else
lastGroup = mir_a2t(ood->pszGroup);
}
else {
lastPage = mir_a2t(ood->pszPage);
lastGroup = mir_a2t(ood->pszGroup);
}
if (ood->pszTab == NULL)
lastTab = db_get_tsa(NULL, "Options", "LastTab");
else
lastTab = mir_a2t(ood->pszTab);
OPTIONSDIALOGPAGE *odp = (OPTIONSDIALOGPAGE*)psh->ppsp;
for (UINT i = 0; i < psh->nPages; i++, odp++) {
opd = new OptionsPageData(odp);
if (opd->pDialog == NULL) // smth went wrong
delete opd;
else
dat->arOpd.insert(opd);
if (!mir_tstrcmp(lastPage, odp->ptszTitle) && !mir_tstrcmp(lastGroup, odp->ptszGroup))
if ((ood->pszTab == NULL && dat->currentPage == -1) || !mir_tstrcmp(lastTab, odp->ptszTab))
dat->currentPage = (int)i;
}
GetWindowRect(GetDlgItem(hdlg, IDC_STNOPAGE), &dat->rcDisplay);
MapWindowPoints(NULL, hdlg, (LPPOINT)&dat->rcDisplay, 2);
// Add an item to count in height
TCITEM tie;
tie.mask = TCIF_TEXT | TCIF_IMAGE;
tie.iImage = -1;
tie.pszText = _T("X");
TabCtrl_InsertItem(GetDlgItem(hdlg, IDC_TAB), 0, &tie);
GetWindowRect(GetDlgItem(hdlg, IDC_TAB), &dat->rcTab);
MapWindowPoints(NULL, hdlg, (LPPOINT)&dat->rcTab, 2);
TabCtrl_AdjustRect(GetDlgItem(hdlg, IDC_TAB), FALSE, &dat->rcTab);
FillFilterCombo(hdlg, dat);
//.........这里部分代码省略.........
开发者ID:Seldom,项目名称:miranda-ng,代码行数:101,代码来源:options.cpp示例8: DlgProcPopupGeneral
INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
static bool bDlgInit = false; // some controls send WM_COMMAND before or during WM_INITDIALOG
static OPTTREE_OPTION *statusOptions = NULL;
static int statusOptionsCount = 0;
if (statusOptions) {
int index;
if (OptTree_ProcessMessage(hwnd, msg, wParam, lParam, &index, IDC_STATUSES, statusOptions, statusOptionsCount))
return TRUE;
}
switch (msg) {
case WM_INITDIALOG:
// Seconds of delay
CheckDlgButton(hwnd, IDC_INFINITEDELAY, PopupOptions.InfiniteDelay ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwnd, IDC_LEAVEHOVERED, PopupOptions.LeaveHovered ? BST_CHECKED : BST_UNCHECKED);
EnableWindow(GetDlgItem(hwnd, IDC_SECONDS), !PopupOptions.InfiniteDelay);
EnableWindow(GetDlgItem(hwnd, IDC_SECONDS_STATIC1), !PopupOptions.InfiniteDelay);
EnableWindow(GetDlgItem(hwnd, IDC_SECONDS_STATIC2), !PopupOptions.InfiniteDelay);
EnableWindow(GetDlgItem(hwnd, IDC_LEAVEHOVERED), !PopupOptions.InfiniteDelay);
SetDlgItemInt(hwnd, IDC_SECONDS, PopupOptions.Seconds, FALSE);
SendDlgItemMessage(hwnd, IDC_SECONDS_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(SETTING_LIFETIME_MAX, SETTING_LIFETIME_MIN));
// Dynamic Resize
CheckDlgButton(hwnd, IDC_DYNAMICRESIZE, PopupOptions.DynamicResize ? BST_CHECKED : BST_UNCHECKED);
SetDlgItemText(hwnd, IDC_USEMAXIMUMWIDTH, PopupOptions.DynamicResize ? LPGENT("Maximum width") : LPGENT("Width"));
// Minimum Width
CheckDlgButton(hwnd, IDC_USEMINIMUMWIDTH, PopupOptions.UseMinimumWidth ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(hwnd, IDC_MINIMUMWIDTH_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(SETTING_MAXIMUMWIDTH_MAX, SETTING_MINIMUMWIDTH_MIN));
SetDlgItemInt(hwnd, IDC_MINIMUMWIDTH, PopupOptions.MinimumWidth, FALSE);
// Maximum Width
PopupOptions.UseMaximumWidth = PopupOptions.DynamicResize ? PopupOptions.UseMaximumWidth : TRUE;
CheckDlgButton(hwnd, IDC_USEMAXIMUMWIDTH, PopupOptions.UseMaximumWidth ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(hwnd, IDC_MAXIMUMWIDTH_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(SETTING_MAXIMUMWIDTH_MAX, SETTING_MINIMUMWIDTH_MIN));
SetDlgItemInt(hwnd, IDC_MAXIMUMWIDTH, PopupOptions.MaximumWidth, FALSE);
// And finally let's enable/disable them.
EnableWindow(GetDlgItem(hwnd, IDC_USEMINIMUMWIDTH), PopupOptions.DynamicResize);
EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH), PopupOptions.DynamicResize && PopupOptions.UseMinimumWidth);
EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH_SPIN), PopupOptions.DynamicResize && PopupOptions.UseMinimumWidth);
EnableWindow(GetDlgItem(hwnd, IDC_MAXIMUMWIDTH), PopupOptions.UseMaximumWidth);
EnableWindow(GetDlgItem(hwnd, IDC_MAXIMUMWIDTH_SPIN), PopupOptions.UseMaximumWidth);
// Position combobox.
{
HWND hCtrl = GetDlgItem(hwnd, IDC_WHERE);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upper left corner")), POS_UPPERLEFT);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Lower left corner")), POS_LOWERLEFT);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Lower right corner")), POS_LOWERRIGHT);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upper right corner")), POS_UPPERRIGHT);
SendDlgItemMessage(hwnd, IDC_WHERE, CB_SETCURSEL, PopupOptions.Position, 0);
}
// Configure popup area
{
HWND hCtrl = GetDlgItem(hwnd, IDC_CUSTOMPOS);
SendMessage(hCtrl, BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)_T("Popup area"), BATF_TCHAR);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx(IDI_RESIZE));
}
// Spreading combobox
{
HWND hCtrl = GetDlgItem(hwnd, IDC_LAYOUT);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Horizontal")), SPREADING_HORIZONTAL);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Vertical")), SPREADING_VERTICAL);
SendDlgItemMessage(hwnd, IDC_LAYOUT, CB_SETCURSEL, PopupOptions.Spreading, 0);
}
// miscellaneous
CheckDlgButton(hwnd, IDC_REORDERPOPUPS, PopupOptions.ReorderPopups ? BST_CHECKED : BST_UNCHECKED);
// Popup enabled
CheckDlgButton(hwnd, IDC_POPUPENABLED, PopupOptions.ModuleIsEnabled ? BST_UNCHECKED : BST_CHECKED);
CheckDlgButton(hwnd, IDC_DISABLEINFS, PopupOptions.DisableWhenFullscreen ? BST_CHECKED : BST_UNCHECKED);
EnableWindow(GetDlgItem(hwnd, IDC_DISABLEINFS), PopupOptions.ModuleIsEnabled);
EnableWindow(GetDlgItem(hwnd, IDC_STATUSES), PopupOptions.ModuleIsEnabled);
// new status options
{
int protocolCount = 0;
PROTOACCOUNT **protocols;
Proto_EnumAccounts(&protocolCount, &protocols);
DWORD globalFlags = 0;
for (int i = 0; i < protocolCount; ++i) {
if (!protocols[i]->bIsVirtual) {
DWORD protoFlags = CallProtoService(protocols[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
globalFlags |= protoFlags;
statusOptionsCount += CountStatusModes(protoFlags);
}
}
statusOptionsCount += CountStatusModes(globalFlags);
statusOptions = new OPTTREE_OPTION[statusOptionsCount];
int pos = AddStatusModes(statusOptions, 0, LPGENT("Global Status"), globalFlags);
for (int i = 0; i < protocolCount; ++i) {
if (!protocols[i]->bIsVirtual) {
DWORD protoFlags = CallProtoService(protocols[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
if (!CountStatusModes(protoFlags))
continue;
TCHAR prefix[128];
//.........这里部分代码省略.........
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:101,代码来源:opt_gen.cpp示例9: PhpAdvancedPageLoad
VOID PhpAdvancedPageLoad(
_In_ HWND hwndDlg
)
{
HWND changeButton;
SetDlgItemCheckForSetting(hwndDlg, IDC_ENABLEWARNINGS, L"EnableWarnings");
SetDlgItemCheckForSetting(hwndDlg, IDC_ENABLEKERNELMODEDRIVER, L"EnableKph");
SetDlgItemCheckForSetting(hwndDlg, IDC_HIDEUNNAMEDHANDLES, L"HideUnnamedHandles");
SetDlgItemCheckForSetting(hwndDlg, IDC_ENABLESTAGE2, L"EnableStage2");
SetDlgItemCheckForSetting(hwndDlg, IDC_ENABLENETWORKRESOLVE, L"EnableNetworkResolve");
SetDlgItemCheckForSetting(hwndDlg, IDC_PROPAGATECPUUSAGE, L"PropagateCpuUsage");
SetDlgItemCheckForSetting(hwndDlg, IDC_ENABLEINSTANTTOOLTIPS, L"EnableInstantTooltips");
if (WindowsVersion >= WINDOWS_7)
SetDlgItemCheckForSetting(hwndDlg, IDC_ENABLECYCLECPUUSAGE, L"EnableCycleCpuUsage");
SetDlgItemInt(hwndDlg, IDC_SAMPLECOUNT, PhGetIntegerSetting(L"SampleCount"), FALSE);
SetDlgItemCheckForSetting(hwndDlg, IDC_SAMPLECOUNTAUTOMATIC, L"SampleCountAutomatic");
if (PhGetIntegerSetting(L"SampleCountAutomatic"))
EnableWindow(GetDlgItem(hwndDlg, IDC_SAMPLECOUNT), FALSE);
// Replace Task Manager
changeButton = GetDlgItem(hwndDlg, IDC_CHANGE);
if (PhElevated)
{
ShowWindow(changeButton, SW_HIDE);
}
else
{
SendMessage(changeButton, BCM_SETSHIELD, 0, TRUE);
}
{
HANDLE taskmgrKeyHandle = NULL;
ULONG disposition;
BOOLEAN success = FALSE;
BOOLEAN alreadyReplaced = FALSE;
// See if we can write to the key.
if (NT_SUCCESS(PhCreateKey(
&taskmgrKeyHandle,
KEY_READ | KEY_WRITE,
PH_KEY_LOCAL_MACHINE,
&TaskMgrImageOptionsKeyName,
0,
0,
&disposition
)))
{
success = TRUE;
}
if (taskmgrKeyHandle || NT_SUCCESS(PhOpenKey(
&taskmgrKeyHandle,
KEY_READ,
PH_KEY_LOCAL_MACHINE,
&TaskMgrImageOptionsKeyName,
0
)))
{
if (OldTaskMgrDebugger)
PhDereferenceObject(OldTaskMgrDebugger);
if (OldTaskMgrDebugger = PhQueryRegistryString(taskmgrKeyHandle, L"Debugger"))
{
alreadyReplaced = PathMatchesPh(OldTaskMgrDebugger);
}
NtClose(taskmgrKeyHandle);
}
if (!success)
EnableWindow(GetDlgItem(hwndDlg, IDC_REPLACETASKMANAGER), FALSE);
OldReplaceTaskMgr = alreadyReplaced;
Button_SetCheck(GetDlgItem(hwndDlg, IDC_REPLACETASKMANAGER), alreadyReplaced ? BST_CHECKED : BST_UNCHECKED);
}
}
开发者ID:lei720,项目名称:processhacker2,代码行数:82,代码来源:options.c示例10: Core_WaitInactive
void CDisasm::SetDebugMode(bool _bDebug)
{
HWND hDlg = m_hDlg;
// Update Dialog Windows
if (_bDebug)
{
Core_WaitInactive(TEMP_BREAKPOINT_WAIT_MS);
CBreakPoints::ClearTemporaryBreakPoints();
updateBreakpointList();
threadList->reloadThreads();
updateThreadLabel(false);
EnableWindow( GetDlgItem(hDlg, IDC_GO), TRUE);
EnableWindow( GetDlgItem(hDlg, IDC_STEP), TRUE);
EnableWindow( GetDlgItem(hDlg, IDC_STEPOVER), TRUE);
EnableWindow( GetDlgItem(hDlg, IDC_STEPHLE), TRUE);
EnableWindow( GetDlgItem(hDlg, IDC_STOP), FALSE);
EnableWindow( GetDlgItem(hDlg, IDC_SKIP), TRUE);
CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW));
ptr->setDontRedraw(false);
ptr->gotoPC();
CtrlMemView *mem = CtrlMemView::getFrom(GetDlgItem(m_hDlg,IDC_DEBUGMEMVIEW));
mem->redraw();
// update the callstack
//CDisam::blah blah
UpdateDialog();
}
else
{
updateThreadLabel(true);
EnableWindow( GetDlgItem(hDlg, IDC_GO), FALSE);
EnableWindow( GetDlgItem(hDlg, IDC_STEP), FALSE);
EnableWindow( GetDlgItem(hDlg, IDC_STEPOVER), FALSE);
EnableWindow( GetDlgItem(hDlg, IDC_STEPHLE), FALSE);
EnableWindow( GetDlgItem(hDlg, IDC_STOP), TRUE);
EnableWindow( GetDlgItem(hDlg, IDC_SKIP), FALSE);
CtrlRegisterList *reglist = CtrlRegisterList::getFrom(GetDlgItem(m_hDlg,IDC_REGLIST));
reglist->redraw();
}
}
开发者ID:173210,项目名称:ppsspp,代码行数:44,代码来源:Debugger_Disasm.cpp示例11: EnableWindow
void ButtonX::enable(bool enable) {
EnableWindow(this->_hwnd, enable);
}
开发者ID:Konnekt,项目名称:staminalib,代码行数:3,代码来源:ButtonX.cpp示例12: GetData
//.........这里部分代码省略.........
if ( !db_get_s(hContact, MODULENAME, URL_KEY, &dbv)) {
strncpy_s(url, SIZEOF(url), dbv.pszVal, _TRUNCATE);
db_free(&dbv);
}
if (strlen(url) < 3)
WErrorPopup(hContact, TranslateT("URL not supplied"));
NETLIBHTTPREQUEST nlhr = { sizeof(nlhr) };
nlhr.requestType = REQUEST_GET;
nlhr.flags = NLHRF_DUMPASTEXT;
nlhr.szUrl = url;
nlhr.headersCount = 2;
NETLIBHTTPHEADER headers[2];
headers[0].szName = "User-Agent";
headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Win32)";
headers[1].szName = "Content-Length";
headers[1].szValue = NULL;
nlhr.headers = headers;
if ( db_get_b(NULL, MODULENAME, NO_PROTECT_KEY, 0)) // disable
AlreadyDownloading = 0;
// //try site////
if (!AlreadyDownloading) { // not already downloading
if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_UPDATE_BUTTON)))
PosButnClick = 0;
else
PosButnClick = 1;
EnableWindow(GetDlgItem(hwndDlg, IDC_UPDATE_BUTTON), 1);
SetDlgItemText(hwndDlg, IDC_STATUSBAR, TranslateT("Download in progress, please wait..."));
db_set_ts(hContact, "CList", "StatusMsg", TranslateT("Updating..."));
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_DND); // download
NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST *) CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM) hNetlibUser, (LPARAM) & nlhr);
if (nlhrReply) {
if (nlhrReply->resultCode < 200 || nlhrReply->resultCode >= 300) {
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_AWAY);
TCHAR *statusText = TranslateT("The server replied with a failure code");
HWND hwndDlg = WindowList_Find(hWindowList, hContact);
SetDlgItemText(hwndDlg, IDC_STATUSBAR, statusText);
WErrorPopup(hContact, statusText);
db_set_ts(hContact, "CList", "StatusMsg", statusText);
}
if (nlhrReply->dataLength) {
int cbLen = lstrlenA(nlhrReply->pData);
szInfo = (char*)malloc(cbLen + 2);
lstrcpynA(szInfo, nlhrReply->pData, cbLen);
downloadsize = lstrlenA(nlhrReply->pData);
trunccount = 0;
lstrcpynA(truncated2, szInfo, MAXSIZE2);
free(szInfo);
////////////////////////////////////////////
sprintf(truncated2, "%s", nlhrReply->pData);
AlreadyDownloading = 1;
} // END DATELENGTH
} // END REPLY
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:66,代码来源:webview_getdata.cpp示例13: PhpHiddenProcessesDlgProc
static INT_PTR CALLBACK PhpHiddenProcessesDlgProc(
_In_ HWND hwndDlg,
_In_ UINT uMsg,
_In_ WPARAM wParam,
_In_ LPARAM lParam
)
{
switch (uMsg)
{
case WM_INITDIALOG:
{
HWND lvHandle;
PhCenterWindow(hwndDlg, GetParent(hwndDlg));
PhHiddenProcessesListViewHandle = lvHandle = GetDlgItem(hwndDlg, IDC_PROCESSES);
PhInitializeLayoutManager(&WindowLayoutManager, hwndDlg);
PhAddLayoutItem(&WindowLayoutManager, GetDlgItem(hwndDlg, IDC_INTRO),
NULL, PH_ANCHOR_LEFT | PH_ANCHOR_TOP | PH_ANCHOR_RIGHT | PH_LAYOUT_FORCE_INVALIDATE);
PhAddLayoutItem(&WindowLayoutManager, lvHandle,
NULL, PH_ANCHOR_ALL);
PhAddLayoutItem(&WindowLayoutManager, GetDlgItem(hwndDlg, IDC_DESCRIPTION),
NULL, PH_ANCHOR_LEFT | PH_ANCHOR_RIGHT | PH_ANCHOR_BOTTOM | PH_LAYOUT_FORCE_INVALIDATE);
PhAddLayoutItem(&WindowLayoutManager, GetDlgItem(hwndDlg, IDC_METHOD),
NULL, PH_ANCHOR_LEFT | PH_ANCHOR_BOTTOM);
PhAddLayoutItem(&WindowLayoutManager, GetDlgItem(hwndDlg, IDC_TERMINATE),
NULL, PH_ANCHOR_RIGHT | PH_ANCHOR_BOTTOM);
PhAddLayoutItem(&WindowLayoutManager, GetDlgItem(hwndDlg, IDC_SAVE),
NULL, PH_ANCHOR_RIGHT | PH_ANCHOR_BOTTOM);
PhAddLayoutItem(&WindowLayoutManager, GetDlgItem(hwndDlg, IDC_SCAN),
NULL, PH_ANCHOR_RIGHT | PH_ANCHOR_BOTTOM);
PhAddLayoutItem(&WindowLayoutManager, GetDlgItem(hwndDlg, IDOK),
NULL, PH_ANCHOR_RIGHT | PH_ANCHOR_BOTTOM);
MinimumSize.left = 0;
MinimumSize.top = 0;
MinimumSize.right = 330;
MinimumSize.bottom = 140;
MapDialogRect(hwndDlg, &MinimumSize);
PhRegisterDialog(hwndDlg);
PhLoadWindowPlacementFromSetting(L"HiddenProcessesWindowPosition", L"HiddenProcessesWindowSize", hwndDlg);
PhSetListViewStyle(lvHandle, TRUE, TRUE);
PhSetControlTheme(lvHandle, L"explorer");
PhAddListViewColumn(lvHandle, 0, 0, 0, LVCFMT_LEFT, 320, L"Process");
PhAddListViewColumn(lvHandle, 1, 1, 1, LVCFMT_LEFT, 60, L"PID");
PhSetExtendedListView(lvHandle);
PhLoadListViewColumnsFromSetting(L"HiddenProcessesListViewColumns", lvHandle);
ExtendedListView_AddFallbackColumn(lvHandle, 0);
ExtendedListView_AddFallbackColumn(lvHandle, 1);
ExtendedListView_SetItemColorFunction(lvHandle, PhpHiddenProcessesColorFunction);
ComboBox_AddString(GetDlgItem(hwndDlg, IDC_METHOD), L"Brute Force");
ComboBox_AddString(GetDlgItem(hwndDlg, IDC_METHOD), L"CSR Handles");
PhSelectComboBoxString(GetDlgItem(hwndDlg, IDC_METHOD), L"CSR Handles", FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_TERMINATE), FALSE);
}
break;
case WM_DESTROY:
{
PhSaveWindowPlacementToSetting(L"HiddenProcessesWindowPosition", L"HiddenProcessesWindowSize", hwndDlg);
PhSaveListViewColumnsToSetting(L"HiddenProcessesListViewColumns", PhHiddenProcessesListViewHandle);
}
break;
case WM_CLOSE:
{
// Hide, don't close.
ShowWindow(hwndDlg, SW_HIDE);
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, 0);
}
return TRUE;
case WM_COMMAND:
{
switch (LOWORD(wParam))
{
case IDCANCEL:
case IDOK:
{
SendMessage(hwndDlg, WM_CLOSE, 0, 0);
}
break;
case IDC_SCAN:
{
NTSTATUS status;
PPH_STRING method;
method = PhGetWindowText(GetDlgItem(hwndDlg, IDC_METHOD));
PhAutoDereferenceObject(method);
if (ProcessesList)
{
ULONG i;
for (i = 0; i < ProcessesList->Count; i++)
{
PPH_HIDDEN_PROCESS_ENTRY entry = ProcessesList->Items[i];
//.........这里部分代码省略.........
开发者ID:lei720,项目名称:processhacker2,代码行数:101,代码来源:hidnproc.c示例14: FixCDis
static void FixCDis(HWND hParent, int how) {
int x;
for (x = 200; x <= 206; x++)
EnableWindow(GetDlgItem(hParent, x), how);
}
开发者ID:AKuHAK,项目名称:Fceumm-PS2,代码行数:6,代码来源:netplay.c示例15: PhpOptionsAdvancedDlgProc
INT_PTR CALLBACK PhpOptionsAdvancedDlgProc(
_In_ HWND hwndDlg,
_In_ UINT uMsg,
_In_ WPARAM wParam,
_In_ LPARAM lParam
)
{
switch (uMsg)
{
case WM_INITDIALOG:
{
PhpPageInit(hwndDlg);
PhpAdvancedPageLoad(hwndDlg);
if (PhStartupParameters.ShowOptions)
{
// Disable all controls except for Replace Task Manager.
EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLEWARNINGS), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLEKERNELMODEDRIVER), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_HIDEUNNAMEDHANDLES), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLESTAGE2), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLENETWORKRESOLVE), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_PROPAGATECPUUSAGE), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLEINSTANTTOOLTIPS), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLECYCLECPUUSAGE), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_SAMPLECOUNTLABEL), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_SAMPLECOUNT), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_SAMPLECOUNTAUTOMATIC), FALSE);
}
else
{
if (WindowsVersion < WINDOWS_7)
EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLECYCLECPUUSAGE), FALSE); // cycle-based CPU usage not available before Windows 7
}
}
break;
case WM_DESTROY:
{
if (OldTaskMgrDebugger)
PhDereferenceObject(OldTaskMgrDebugger);
}
break;
case WM_COMMAND:
{
switch (LOWORD(wParam))
{
case IDC_CHANGE:
{
HANDLE threadHandle;
RECT windowRect;
// Save the options so they don't get "overwritten" when
// WM_PH_CHILD_EXIT gets sent.
PhpAdvancedPageSave(hwndDlg);
GetWindowRect(GetParent(hwndDlg), &windowRect);
WindowHandleForElevate = hwndDlg;
threadHandle = PhCreateThread(0, PhpElevateAdvancedThreadStart, PhFormatString(
L"-showoptions -hwnd %Ix -point %u,%u",
(ULONG_PTR)GetParent(hwndDlg),
windowRect.left + 20,
windowRect.top + 20
));
if (threadHandle)
NtClose(threadHandle);
}
break;
case IDC_SAMPLECOUNTAUTOMATIC:
{
EnableWindow(GetDlgItem(hwndDlg, IDC_SAMPLECOUNT), Button_GetCheck(GetDlgItem(hwndDlg, IDC_SAMPLECOUNTAUTOMATIC)) != BST_CHECKED);
}
break;
}
}
break;
case WM_NOTIFY:
{
LPNMHDR header = (LPNMHDR)lParam;
switch (header->code)
{
case PSN_APPLY:
{
PhpAdvancedPageSave(hwndDlg);
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
}
return TRUE;
}
}
break;
case WM_PH_CHILD_EXIT:
{
PhpAdvancedPageLoad(hwndDlg);
}
break;
}
return FALSE;
}
开发者ID:lei720,项目名称:processhacker2,代码行数:100,代码来源:options.c本文标签属性:
示例:示例的拼音
代码:代码零九
EnableWindow:EnableWindow