mirror of
https://github.com/reactos/reactos.git
synced 2025-01-06 06:20:13 +00:00
Simplify a lot of code (e.g.: SendMessage(GetDlgItem(...)...) --> SendDlgItemMessage(...))
svn path=/trunk/; revision=29733
This commit is contained in:
parent
89e36432c3
commit
9e7e871493
4 changed files with 89 additions and 104 deletions
|
@ -190,7 +190,7 @@ void ShowCurrentPowerActionPolicy(HWND hDlgCtrl,
|
|||
}
|
||||
|
||||
BOOLEAN SaveCurrentPowerActionPolicy(IN HWND hDlgCtrl,
|
||||
OUT POWER_ACTION_POLICY * Policy)
|
||||
OUT POWER_ACTION_POLICY * Policy)
|
||||
{
|
||||
LRESULT Index;
|
||||
LRESULT ItemData;
|
||||
|
@ -251,7 +251,7 @@ void ShowCurrentPowerActionPolicies(HWND hwndDlg)
|
|||
#else
|
||||
if (LoadString(hApplet, IDS_PowerActionNone1+gGPP.user.LidCloseAc.Action, szAction, MAX_PATH))
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_LIDCLOSE),
|
||||
SendDlgItemMessage(hwndDlg, IDC_LIDCLOSE,
|
||||
CB_SELECTSTRING,
|
||||
TRUE,
|
||||
(LPARAM)szAction);
|
||||
|
@ -271,7 +271,7 @@ void ShowCurrentPowerActionPolicies(HWND hwndDlg)
|
|||
#else
|
||||
if (LoadString(hApplet, IDS_PowerActionNone1+gGPP.user.SleepButtonAc.Action, szAction, MAX_PATH))
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_SLEEPBUTTON),
|
||||
SendDlgItemMessage(hwndDlg, IDC_SLEEPBUTTON,
|
||||
CB_SELECTSTRING,
|
||||
TRUE,
|
||||
(LPARAM)szAction);
|
||||
|
@ -299,21 +299,21 @@ void ShowCurrentPowerActionPolicies(HWND hwndDlg)
|
|||
#else
|
||||
if (LoadString(hApplet, IDS_PowerActionNone1+gGPP.user.LidCloseDc.Action, szAction, MAX_PATH))
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_LIDCLOSE),
|
||||
SendDlgItemMessage(hwndDlg, IDC_LIDCLOSE,
|
||||
CB_SELECTSTRING,
|
||||
TRUE,
|
||||
(LPARAM)szAction);
|
||||
}
|
||||
if (LoadString(hApplet, IDS_PowerActionNone1+gGPP.user.PowerButtonDc.Action, szAction, MAX_PATH))
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_POWERBUTTON),
|
||||
CB_SELECTSTRING,
|
||||
SendDlgItemMessage(hwndDlg, IDC_POWERBUTTON,
|
||||
CB_SELECTSTRING,
|
||||
TRUE,
|
||||
(LPARAM)szAction);
|
||||
}
|
||||
if (LoadString(hApplet, IDS_PowerActionNone1+gGPP.user.SleepButtonDc.Action, szAction, MAX_PATH))
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_SLEEPBUTTON),
|
||||
SendDlgItemMessage(hwndDlg, IDC_SLEEPBUTTON,
|
||||
CB_SELECTSTRING,
|
||||
TRUE,
|
||||
(LPARAM)szAction);
|
||||
|
@ -334,18 +334,15 @@ void Adv_InitDialog()
|
|||
|
||||
SYSTEM_POWER_CAPABILITIES spc;
|
||||
|
||||
SendMessage(GetDlgItem(hAdv, IDC_SYSTRAYBATTERYMETER),
|
||||
BM_SETCHECK,
|
||||
(gGPP.user.GlobalFlags & EnableSysTrayBatteryMeter ? BST_CHECKED : BST_UNCHECKED),
|
||||
(LPARAM)0);
|
||||
SendMessage(GetDlgItem(hAdv, IDC_PASSWORDLOGON),
|
||||
BM_SETCHECK,
|
||||
(gGPP.user.GlobalFlags & EnablePasswordLogon ? BST_CHECKED : BST_UNCHECKED),
|
||||
(LPARAM)0);
|
||||
SendMessage(GetDlgItem(hAdv, IDC_VIDEODIMDISPLAY),
|
||||
BM_SETCHECK,
|
||||
(gGPP.user.GlobalFlags & EnableVideoDimDisplay ? BST_CHECKED : BST_UNCHECKED),
|
||||
(LPARAM)0);
|
||||
CheckDlgButton(hAdv,
|
||||
IDC_SYSTRAYBATTERYMETER,
|
||||
gGPP.user.GlobalFlags & EnableSysTrayBatteryMeter ? BST_CHECKED : BST_UNCHECKED);
|
||||
CheckDlgButton(hAdv,
|
||||
IDC_PASSWORDLOGON,
|
||||
gGPP.user.GlobalFlags & EnablePasswordLogon ? BST_CHECKED : BST_UNCHECKED);
|
||||
CheckDlgButton(hAdv,
|
||||
IDC_VIDEODIMDISPLAY,
|
||||
gGPP.user.GlobalFlags & EnableVideoDimDisplay ? BST_CHECKED : BST_UNCHECKED);
|
||||
|
||||
GetPwrCapabilities(&spc);
|
||||
|
||||
|
@ -375,6 +372,7 @@ void Adv_InitDialog()
|
|||
}
|
||||
else
|
||||
{
|
||||
ShowWindow(GetDlgItem(hAdv, IDC_VIDEODIMDISPLAY), FALSE);
|
||||
ShowWindow(GetDlgItem(hAdv, IDC_SLIDCLOSE), FALSE);
|
||||
ShowWindow(hList1, FALSE);
|
||||
}
|
||||
|
@ -448,22 +446,18 @@ void Adv_InitDialog()
|
|||
|
||||
void Adv_SaveData(HWND hwndDlg)
|
||||
{
|
||||
BOOLEAN bSystrayBatteryMeter;
|
||||
BOOLEAN bPasswordLogon;
|
||||
BOOLEAN bVideoDimDisplay;
|
||||
BOOL bSystrayBatteryMeter;
|
||||
BOOL bPasswordLogon;
|
||||
BOOL bVideoDimDisplay;
|
||||
|
||||
bSystrayBatteryMeter = (BOOLEAN)SendMessage(GetDlgItem(hwndDlg, IDC_SYSTRAYBATTERYMETER),
|
||||
BM_GETCHECK,
|
||||
(WPARAM)0,
|
||||
(LPARAM)0);
|
||||
bPasswordLogon = (BOOLEAN)SendMessage(GetDlgItem(hwndDlg, IDC_PASSWORDLOGON),
|
||||
BM_GETCHECK,
|
||||
(WPARAM)0,
|
||||
(LPARAM)0);
|
||||
bVideoDimDisplay = (BOOLEAN)SendMessage(GetDlgItem(hwndDlg, IDC_VIDEODIMDISPLAY),
|
||||
BM_GETCHECK,
|
||||
(WPARAM)0,
|
||||
(LPARAM)0);
|
||||
bSystrayBatteryMeter =
|
||||
(IsDlgButtonChecked(hwndDlg, IDC_SYSTRAYBATTERYMETER) == BST_CHECKED);
|
||||
|
||||
bPasswordLogon =
|
||||
(IsDlgButtonChecked(hwndDlg, IDC_PASSWORDLOGON) == BST_CHECKED);
|
||||
|
||||
bVideoDimDisplay =
|
||||
(IsDlgButtonChecked(hwndDlg, IDC_VIDEODIMDISPLAY) == BST_CHECKED);
|
||||
|
||||
if (bSystrayBatteryMeter)
|
||||
{
|
||||
|
@ -479,6 +473,7 @@ void Adv_SaveData(HWND hwndDlg)
|
|||
gGPP.user.GlobalFlags = gGPP.user.GlobalFlags - EnableSysTrayBatteryMeter;
|
||||
}
|
||||
}
|
||||
|
||||
if (bPasswordLogon)
|
||||
{
|
||||
if (!(gGPP.user.GlobalFlags & EnablePasswordLogon))
|
||||
|
@ -493,6 +488,7 @@ void Adv_SaveData(HWND hwndDlg)
|
|||
gGPP.user.GlobalFlags = gGPP.user.GlobalFlags - EnablePasswordLogon;
|
||||
}
|
||||
}
|
||||
|
||||
if (bVideoDimDisplay)
|
||||
{
|
||||
if (!(gGPP.user.GlobalFlags & EnableVideoDimDisplay))
|
||||
|
@ -507,6 +503,7 @@ void Adv_SaveData(HWND hwndDlg)
|
|||
gGPP.user.GlobalFlags = gGPP.user.GlobalFlags - EnableVideoDimDisplay;
|
||||
}
|
||||
}
|
||||
|
||||
if (!IsBatteryUsed())
|
||||
{
|
||||
SaveCurrentPowerActionPolicy(GetDlgItem(hwndDlg, IDC_POWERBUTTON), &gGPP.user.PowerButtonAc);
|
||||
|
|
|
@ -64,33 +64,31 @@ BOOLEAN Ala_InitData(HWND hwndDlg)
|
|||
|
||||
if (gGPP.user.DischargePolicy[DISCHARGE_POLICY_LOW].Enable)
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_ALARM1),
|
||||
BM_SETCHECK,
|
||||
(gGPP.user.DischargePolicy[DISCHARGE_POLICY_LOW].Enable ? BST_CHECKED : BST_UNCHECKED),
|
||||
(LPARAM)0);
|
||||
CheckDlgButton(hwndDlg, IDC_ALARM1,
|
||||
gGPP.user.DischargePolicy[DISCHARGE_POLICY_LOW].Enable ? BST_CHECKED : BST_UNCHECKED);
|
||||
|
||||
if (LoadString(hApplet, IDS_PROCENT, szTemp, MAX_PATH))
|
||||
{
|
||||
_stprintf(szBatteryLevel,szTemp,gGPP.user.DischargePolicy[DISCHARGE_POLICY_LOW].BatteryLevel);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_ALARMVALUE1),szBatteryLevel);
|
||||
_stprintf(szBatteryLevel, szTemp, gGPP.user.DischargePolicy[DISCHARGE_POLICY_LOW].BatteryLevel);
|
||||
SetDlgItemText(hwndDlg, IDC_ALARMVALUE1, szBatteryLevel);
|
||||
}
|
||||
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_ALARMBAR1),
|
||||
SendDlgItemMessage(hwndDlg, IDC_ALARMBAR1,
|
||||
TBM_SETRANGE,
|
||||
(WPARAM)TRUE,
|
||||
(LPARAM)MAKELONG(0, 100));
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_ALARMBAR1),
|
||||
SendDlgItemMessage(hwndDlg, IDC_ALARMBAR1,
|
||||
TBM_SETTICFREQ,
|
||||
(WPARAM)TRUE,
|
||||
(LPARAM)20);
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_ALARMBAR1),
|
||||
SendDlgItemMessage(hwndDlg, IDC_ALARMBAR1,
|
||||
TBM_SETPOS,
|
||||
(WPARAM)TRUE,
|
||||
(LPARAM)gGPP.user.DischargePolicy[DISCHARGE_POLICY_LOW].BatteryLevel);
|
||||
|
||||
if (LoadString(hApplet, gGPP.user.DischargePolicy[DISCHARGE_POLICY_LOW].PowerPolicy.Action+IDS_PowerActionNone1, szAction, MAX_PATH))
|
||||
{
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_ALARMAKTION1),szAction);
|
||||
SetDlgItemText(hwndDlg, IDC_ALARMAKTION1, szAction);
|
||||
}
|
||||
|
||||
memset(szMessage, 0x0, sizeof(szMessage));
|
||||
|
@ -124,40 +122,37 @@ BOOLEAN Ala_InitData(HWND hwndDlg)
|
|||
}
|
||||
}
|
||||
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_ALARMMSG1),szMessage);
|
||||
SetDlgItemText(hwndDlg, IDC_ALARMMSG1, szMessage);
|
||||
|
||||
if (LoadString(hApplet, IDS_PowerActionNone2, szProgram, MAX_PATH))
|
||||
{
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_ALARMPROG1),szProgram);
|
||||
SetDlgItemText(hwndDlg, IDC_ALARMPROG1, szProgram);
|
||||
}
|
||||
}
|
||||
|
||||
if (gGPP.user.DischargePolicy[DISCHARGE_POLICY_CRITICAL].Enable)
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_ALARM2),
|
||||
BM_SETCHECK,
|
||||
(gGPP.user.DischargePolicy[DISCHARGE_POLICY_CRITICAL].Enable ? BST_CHECKED : BST_UNCHECKED),
|
||||
(LPARAM)0);
|
||||
CheckDlgButton(hwndDlg, IDC_ALARM2,
|
||||
gGPP.user.DischargePolicy[DISCHARGE_POLICY_CRITICAL].Enable ? BST_CHECKED : BST_UNCHECKED);
|
||||
|
||||
if (LoadString(hApplet, IDS_PROCENT, szTemp, MAX_PATH))
|
||||
{
|
||||
_stprintf(szBatteryLevel,szTemp,gGPP.user.DischargePolicy[DISCHARGE_POLICY_CRITICAL].BatteryLevel);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_ALARMVALUE2),szBatteryLevel);
|
||||
_stprintf(szBatteryLevel, szTemp, gGPP.user.DischargePolicy[DISCHARGE_POLICY_CRITICAL].BatteryLevel);
|
||||
SetDlgItemText(hwndDlg, IDC_ALARMVALUE2, szBatteryLevel);
|
||||
}
|
||||
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_ALARMBAR2),
|
||||
SendDlgItemMessage(hwndDlg, IDC_ALARMBAR2,
|
||||
TBM_SETRANGE,
|
||||
(WPARAM)TRUE,
|
||||
(LPARAM)MAKELONG(0, 100));
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_ALARMBAR2),
|
||||
SendDlgItemMessage(hwndDlg, IDC_ALARMBAR2,
|
||||
TBM_SETPOS,
|
||||
(WPARAM)TRUE,
|
||||
(LPARAM)gGPP.user.DischargePolicy[DISCHARGE_POLICY_CRITICAL].BatteryLevel);
|
||||
|
||||
if (LoadString(hApplet, gGPP.user.DischargePolicy[DISCHARGE_POLICY_CRITICAL].PowerPolicy.Action+IDS_PowerActionNone1, szAction, MAX_PATH))
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_ALARMAKTION2),
|
||||
WM_SETTEXT,
|
||||
(WPARAM)0,
|
||||
(LPARAM)szAction);
|
||||
SetDlgItemText(hwndDlg, IDC_ALARMAKTION2, szAction);
|
||||
}
|
||||
|
||||
memset(szMessage, 0x0, sizeof(szMessage));
|
||||
|
@ -191,12 +186,13 @@ BOOLEAN Ala_InitData(HWND hwndDlg)
|
|||
}
|
||||
}
|
||||
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_ALARMMSG2),szMessage);
|
||||
SetDlgItemText(hwndDlg, IDC_ALARMMSG2, szMessage);
|
||||
|
||||
if (LoadString(hApplet, IDS_PowerActionNone2, szProgram, MAX_PATH))
|
||||
{
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_ALARMPROG2),szProgram);
|
||||
SetDlgItemText(hwndDlg, IDC_ALARMPROG2, szProgram);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -76,20 +76,9 @@ void Hib_InitDialog(HWND hwndDlg)
|
|||
|
||||
if (GetPwrCapabilities(&PowerCaps))
|
||||
{
|
||||
if (PowerCaps.HiberFilePresent)
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_HIBERNATEFILE),
|
||||
BM_SETCHECK,
|
||||
(WPARAM)BST_CHECKED,
|
||||
(LPARAM)0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_HIBERNATEFILE),
|
||||
BM_SETCHECK,
|
||||
(WPARAM)BST_UNCHECKED,
|
||||
(LPARAM)0);
|
||||
}
|
||||
CheckDlgButton(hwndDlg,
|
||||
IDC_HIBERNATEFILE,
|
||||
PowerCaps.HiberFilePresent ? BST_CHECKED : BST_UNCHECKED);
|
||||
|
||||
msex.dwLength = sizeof(msex);
|
||||
if (!GlobalMemoryStatusEx(&msex))
|
||||
|
@ -107,12 +96,13 @@ void Hib_InitDialog(HWND hwndDlg)
|
|||
if (!GetDiskFreeSpaceEx(NULL,&FreeBytesAvailable, &TotalNumberOfBytes, &TotalNumberOfFreeBytes))
|
||||
TotalNumberOfFreeBytes.QuadPart = 0;
|
||||
}
|
||||
|
||||
if (TotalNumberOfFreeBytes.QuadPart > 0x100000)
|
||||
{
|
||||
if (LoadString(hApplet, IDS_SIZEMB, szTemp, MAX_PATH))
|
||||
{
|
||||
_stprintf(szSize,szTemp,TotalNumberOfFreeBytes.QuadPart / 0x100000);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_FREESPACE),szSize);
|
||||
SetDlgItemText(hwndDlg, IDC_FREESPACE, szSize);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -120,7 +110,7 @@ void Hib_InitDialog(HWND hwndDlg)
|
|||
if (LoadString(hApplet, IDS_SIZEBYTS, szTemp, MAX_PATH))
|
||||
{
|
||||
_stprintf(szSize,szTemp,TotalNumberOfFreeBytes.QuadPart);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_FREESPACE),szSize);
|
||||
SetDlgItemText(hwndDlg, IDC_FREESPACE, szSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -129,7 +119,7 @@ void Hib_InitDialog(HWND hwndDlg)
|
|||
if (LoadString(hApplet, IDS_SIZEMB, szTemp, MAX_PATH))
|
||||
{
|
||||
_stprintf(szSize,szTemp,msex.ullTotalPhys/0x100000);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_SPACEFORHIBERNATEFILE),szSize);
|
||||
SetDlgItemText(hwndDlg, IDC_SPACEFORHIBERNATEFILE,szSize);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -137,9 +127,10 @@ void Hib_InitDialog(HWND hwndDlg)
|
|||
if (LoadString(hApplet, IDS_SIZEBYTS, szTemp, MAX_PATH))
|
||||
{
|
||||
_stprintf(szSize,szTemp,msex.ullTotalPhys);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_SPACEFORHIBERNATEFILE),szSize);
|
||||
SetDlgItemText(hwndDlg, IDC_SPACEFORHIBERNATEFILE, szSize);
|
||||
}
|
||||
}
|
||||
|
||||
if (TotalNumberOfFreeBytes.QuadPart < msex.ullTotalPhys && !PowerCaps.HiberFilePresent)
|
||||
{
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_HIBERNATEFILE), FALSE);
|
||||
|
@ -157,10 +148,8 @@ INT_PTR Hib_SaveData(HWND hwndDlg)
|
|||
{
|
||||
BOOLEAN bHibernate;
|
||||
|
||||
bHibernate = (BOOLEAN)SendMessage(GetDlgItem(hwndDlg, IDC_HIBERNATEFILE),
|
||||
BM_GETCHECK,
|
||||
(WPARAM)0,
|
||||
(LPARAM)0);
|
||||
bHibernate = (BOOLEAN)(IsDlgButtonChecked(hwndDlg, IDC_HIBERNATEFILE) == BST_CHECKED);
|
||||
|
||||
if (CallNtPowerInformation(SystemReserveHiberFile,&bHibernate, sizeof(bHibernate), NULL, 0) == STATUS_SUCCESS)
|
||||
{
|
||||
Pos_InitData();
|
||||
|
@ -168,5 +157,6 @@ INT_PTR Hib_SaveData(HWND hwndDlg)
|
|||
Hib_InitDialog(hwndDlg);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -401,7 +401,7 @@ void LoadConfig(HWND hwndDlg)
|
|||
TCHAR szConfig[MAX_PATH];
|
||||
POWER_POLICY pp;
|
||||
|
||||
iCurSel = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST),
|
||||
iCurSel = (INT)SendDlgItemMessage(hwndDlg, IDC_ENERGYLIST,
|
||||
CB_GETCURSEL,
|
||||
0,
|
||||
0);
|
||||
|
@ -410,56 +410,58 @@ void LoadConfig(HWND hwndDlg)
|
|||
|
||||
memcpy(&pp, &gPP[iCurSel], sizeof(POWER_POLICY));
|
||||
|
||||
uiIndex = (UINT) SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST), CB_GETCURSEL, 0, 0);
|
||||
uiIndex = (UINT)SendDlgItemMessage(hwndDlg, IDC_ENERGYLIST, CB_GETCURSEL, 0, 0);
|
||||
if(uiIndex != CB_ERR)
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST), CB_GETLBTEXT, uiIndex, (LPARAM)szProfile);
|
||||
SendDlgItemMessage(hwndDlg, IDC_ENERGYLIST, CB_GETLBTEXT, uiIndex, (LPARAM)szProfile);
|
||||
if(LoadString(hApplet, IDS_CONFIG1, szTemp, MAX_PATH))
|
||||
{
|
||||
_stprintf(szConfig,szTemp,szProfile);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_GRPDETAIL),szConfig);
|
||||
}
|
||||
}
|
||||
|
||||
for(i=0;i<17;i++)
|
||||
{
|
||||
if (Sec[i]==pp.user.VideoTimeoutAc)
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_MONITORACLIST),
|
||||
CB_SETCURSEL,
|
||||
SendDlgItemMessage(hwndDlg, IDC_MONITORACLIST,
|
||||
CB_SETCURSEL,
|
||||
i,
|
||||
(LPARAM)0);
|
||||
}
|
||||
|
||||
if (Sec[i]==pp.user.VideoTimeoutDc)
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_MONITORDCLIST),
|
||||
CB_SETCURSEL,
|
||||
SendDlgItemMessage(hwndDlg, IDC_MONITORDCLIST,
|
||||
CB_SETCURSEL,
|
||||
i,
|
||||
(LPARAM)0);
|
||||
}
|
||||
if (Sec[i]==pp.user.SpindownTimeoutAc)
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_DISKACLIST),
|
||||
SendDlgItemMessage(hwndDlg, IDC_DISKACLIST,
|
||||
CB_SETCURSEL,
|
||||
i-2,
|
||||
(LPARAM)0);
|
||||
}
|
||||
if (Sec[i]==pp.user.SpindownTimeoutDc)//IdleTimeoutDc)
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_DISKDCLIST),
|
||||
SendDlgItemMessage(hwndDlg, IDC_DISKDCLIST,
|
||||
CB_SETCURSEL,
|
||||
i-2,
|
||||
(LPARAM)0);
|
||||
}
|
||||
if (Sec[i]==pp.user.IdleTimeoutAc)
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_STANDBYACLIST),
|
||||
SendDlgItemMessage(hwndDlg, IDC_STANDBYACLIST,
|
||||
CB_SETCURSEL,
|
||||
i,
|
||||
(LPARAM)0);
|
||||
}
|
||||
if (Sec[i]==pp.user.IdleTimeoutDc)
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_STANDBYDCLIST),
|
||||
SendDlgItemMessage(hwndDlg, IDC_STANDBYDCLIST,
|
||||
CB_SETCURSEL,
|
||||
i,
|
||||
(LPARAM)0);
|
||||
|
@ -467,14 +469,14 @@ void LoadConfig(HWND hwndDlg)
|
|||
|
||||
if (Sec[i]==pp.mach.DozeS4TimeoutAc)
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_HYBERNATEACLIST),
|
||||
SendDlgItemMessage(hwndDlg, IDC_HYBERNATEACLIST,
|
||||
CB_SETCURSEL,
|
||||
i,
|
||||
(LPARAM)0);
|
||||
}
|
||||
if (Sec[i]==pp.mach.DozeS4TimeoutDc)
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_HYBERNATEDCLIST),
|
||||
SendDlgItemMessage(hwndDlg, IDC_HYBERNATEDCLIST,
|
||||
CB_SETCURSEL,
|
||||
i,
|
||||
(LPARAM)0);
|
||||
|
@ -487,14 +489,14 @@ void Pos_SaveData(HWND hwndDlg)
|
|||
{
|
||||
INT iCurSel=0,tmp=0;
|
||||
|
||||
iCurSel = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST),
|
||||
iCurSel = (INT) SendDlgItemMessage(hwndDlg, IDC_ENERGYLIST,
|
||||
CB_GETCURSEL,
|
||||
0,
|
||||
0);
|
||||
if (iCurSel == CB_ERR)
|
||||
return;
|
||||
|
||||
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_MONITORDCLIST),
|
||||
tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_MONITORDCLIST,
|
||||
CB_GETCURSEL,
|
||||
0,
|
||||
(LPARAM)0);
|
||||
|
@ -502,7 +504,7 @@ void Pos_SaveData(HWND hwndDlg)
|
|||
{
|
||||
gPP[iCurSel].user.VideoTimeoutAc = Sec[tmp];
|
||||
}
|
||||
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_MONITORDCLIST),
|
||||
tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_MONITORDCLIST,
|
||||
CB_GETCURSEL,
|
||||
0,
|
||||
(LPARAM)0);
|
||||
|
@ -510,7 +512,7 @@ void Pos_SaveData(HWND hwndDlg)
|
|||
{
|
||||
gPP[iCurSel].user.VideoTimeoutDc = Sec[tmp];
|
||||
}
|
||||
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_DISKACLIST),
|
||||
tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_DISKACLIST,
|
||||
CB_GETCURSEL,
|
||||
0,
|
||||
(LPARAM)0);
|
||||
|
@ -518,7 +520,7 @@ void Pos_SaveData(HWND hwndDlg)
|
|||
{
|
||||
gPP[iCurSel].user.SpindownTimeoutAc = Sec[tmp+2];
|
||||
}
|
||||
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_DISKDCLIST),
|
||||
tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_DISKDCLIST,
|
||||
CB_GETCURSEL,
|
||||
0,
|
||||
(LPARAM)0);
|
||||
|
@ -526,7 +528,7 @@ void Pos_SaveData(HWND hwndDlg)
|
|||
{
|
||||
gPP[iCurSel].user.SpindownTimeoutDc = Sec[tmp+2];
|
||||
}
|
||||
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_STANDBYACLIST),
|
||||
tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_STANDBYACLIST,
|
||||
CB_GETCURSEL,
|
||||
0,
|
||||
(LPARAM)0);
|
||||
|
@ -534,7 +536,7 @@ void Pos_SaveData(HWND hwndDlg)
|
|||
{
|
||||
gPP[iCurSel].user.IdleTimeoutAc = Sec[tmp];
|
||||
}
|
||||
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_STANDBYDCLIST),
|
||||
tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_STANDBYDCLIST,
|
||||
CB_GETCURSEL,
|
||||
0,
|
||||
(LPARAM)0);
|
||||
|
@ -542,7 +544,7 @@ void Pos_SaveData(HWND hwndDlg)
|
|||
{
|
||||
gPP[iCurSel].user.IdleTimeoutDc = Sec[tmp];
|
||||
}
|
||||
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_HYBERNATEACLIST),
|
||||
tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_HYBERNATEACLIST,
|
||||
CB_GETCURSEL,
|
||||
0,
|
||||
(LPARAM)0);
|
||||
|
@ -550,7 +552,7 @@ void Pos_SaveData(HWND hwndDlg)
|
|||
{
|
||||
gPP[iCurSel].mach.DozeS4TimeoutAc = Sec[tmp];
|
||||
}
|
||||
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_HYBERNATEDCLIST),
|
||||
tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_HYBERNATEDCLIST,
|
||||
CB_GETCURSEL,
|
||||
0,
|
||||
(LPARAM)0);
|
||||
|
|
Loading…
Reference in a new issue