Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenpowershemes.c
Go to the documentation of this file.
00001 /* $Id: powershemes.c 54535 2011-11-29 14:55:58Z dgorbachev $ 00002 * 00003 * PROJECT: ReactOS Power Configuration Applet 00004 * LICENSE: GPL - See COPYING in the top level directory 00005 * FILE: dll/cpl/powercfg/powershemes.c 00006 * PURPOSE: powerschemes tab of applet 00007 * PROGRAMMERS: Alexander Wurzinger (Lohnegrim at gmx dot net) 00008 * Johannes Anderwald (johannes.anderwald@student.tugraz.at) 00009 * Martin Rottensteiner 00010 * Dmitry Chapyshev (lentind@yandex.ru) 00011 */ 00012 00013 #include "powercfg.h" 00014 00015 UINT Sec[]= 00016 { 00017 60, 00018 120, 00019 180, 00020 300, 00021 600, 00022 900, 00023 1200, 00024 1500, 00025 1800, 00026 2700, 00027 3600, 00028 7200, 00029 10800, 00030 14400, 00031 18000, 00032 0 00033 }; 00034 00035 HWND hList = 0; 00036 HWND hPos = 0; 00037 00038 unsigned aps = 0; 00039 00040 #define MAX_POWER_POLICY 20 00041 00042 POWER_POLICY gPP[MAX_POWER_POLICY]; 00043 UINT guiIndex = 0; 00044 HWND hwndDialog; 00045 00046 00047 BOOLEAN 00048 Pos_InitData(VOID) 00049 { 00050 SYSTEM_POWER_CAPABILITIES spc; 00051 /* 00052 RECT rectCtl, rectDlg, rectCtl2; 00053 LONG movetop = 0; 00054 LONG moveright = 0; 00055 00056 if (GetWindowRect(hPos,&rectDlg)) 00057 { 00058 if (GetWindowRect(GetDlgItem(hPos, IDC_SAT),&rectCtl2)) 00059 { 00060 if (GetWindowRect(GetDlgItem(hPos, IDC_MONITOR),&rectCtl)) 00061 { 00062 movetop=rectCtl.top - rectCtl2.top; 00063 MoveWindow(GetDlgItem(hPos, IDC_MONITOR),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE); 00064 if (GetWindowRect(GetDlgItem(hPos, IDC_DISK),&rectCtl)) 00065 { 00066 MoveWindow(GetDlgItem(hPos, IDC_DISK),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE); 00067 } 00068 if (GetWindowRect(GetDlgItem(hPos, IDC_STANDBY),&rectCtl)) 00069 { 00070 MoveWindow(GetDlgItem(hPos, IDC_STANDBY),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE); 00071 } 00072 if (GetWindowRect(GetDlgItem(hPos, IDC_HYBERNATE),&rectCtl)) 00073 { 00074 MoveWindow(GetDlgItem(hPos, IDC_HYBERNATE),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE); 00075 } 00076 if (GetWindowRect(GetDlgItem(hPos, IDC_MONITORDCLIST),&rectCtl2)) 00077 { 00078 movetop=movetop-8; 00079 if (GetWindowRect(GetDlgItem(hPos, IDC_MONITORACLIST),&rectCtl)) 00080 { 00081 moveright=rectCtl.right - rectCtl2.right; 00082 MoveWindow(GetDlgItem(hPos, IDC_MONITORACLIST),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left-moveright,rectCtl.bottom-rectCtl.top,FALSE); 00083 if (GetWindowRect(GetDlgItem(hPos, IDC_DISKACLIST),&rectCtl)) 00084 { 00085 MoveWindow(GetDlgItem(hPos, IDC_DISKACLIST),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left-moveright,rectCtl.bottom-rectCtl.top,FALSE); 00086 } 00087 if (GetWindowRect(GetDlgItem(hPos, IDC_STANDBYACLIST),&rectCtl)) 00088 { 00089 MoveWindow(GetDlgItem(hPos, IDC_STANDBYACLIST),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left-moveright,rectCtl.bottom-rectCtl.top,FALSE); 00090 } 00091 if (GetWindowRect(GetDlgItem(hPos, IDC_HYBERNATEACLIST),&rectCtl)) 00092 { 00093 MoveWindow(GetDlgItem(hPos, IDC_HYBERNATEACLIST),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left-moveright,rectCtl.bottom-rectCtl.top,FALSE); 00094 } 00095 } 00096 if (GetWindowRect(GetDlgItem(hPos, IDC_GRPDETAIL),&rectCtl)) 00097 { 00098 MoveWindow(GetDlgItem(hPos, IDC_GRPDETAIL),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE); 00099 } 00100 } 00101 } 00102 } 00103 } 00104 } 00105 */ 00106 00107 if (!GetPwrCapabilities(&spc)) 00108 { 00109 return FALSE; 00110 } 00111 00112 if (!spc.SystemBatteriesPresent) 00113 { 00114 ShowWindow(GetDlgItem(hPos, IDC_SAT),FALSE); 00115 ShowWindow(GetDlgItem(hPos, IDC_IAC),FALSE); 00116 ShowWindow(GetDlgItem(hPos, IDC_SAC),FALSE); 00117 ShowWindow(GetDlgItem(hPos, IDC_IDC),FALSE); 00118 ShowWindow(GetDlgItem(hPos, IDC_SDC),FALSE); 00119 ShowWindow(GetDlgItem(hPos, IDC_MONITORDCLIST),FALSE); 00120 ShowWindow(GetDlgItem(hPos, IDC_DISKDCLIST),FALSE); 00121 ShowWindow(GetDlgItem(hPos, IDC_STANDBYDCLIST),FALSE); 00122 ShowWindow(GetDlgItem(hPos, IDC_HYBERNATEDCLIST),FALSE); 00123 ShowWindow(GetDlgItem(hPos, IDC_HYBERNATEACLIST), spc.HiberFilePresent); 00124 00125 } 00126 else 00127 { 00128 ShowWindow(GetDlgItem(hPos, IDC_HYBERNATEDCLIST), spc.HiberFilePresent); 00129 ShowWindow(GetDlgItem(hPos, IDC_HYBERNATEACLIST), FALSE); 00130 } 00131 00132 00133 if (!(spc.SystemS1 ||spc.SystemS2 || spc.SystemS3)) 00134 { 00135 ShowWindow(GetDlgItem(hPos, IDC_STANDBYACLIST), TRUE); 00136 ShowWindow(GetDlgItem(hPos, IDC_STANDBYDCLIST), TRUE); 00137 ShowWindow(GetDlgItem(hPos, IDC_STANDBY), TRUE); 00138 } 00139 00140 ShowWindow(GetDlgItem(hPos, IDC_HYBERNATE), spc.HiberFilePresent); 00141 00142 return TRUE; 00143 } 00144 00145 00146 static VOID 00147 LoadConfig(HWND hwndDlg) 00148 { 00149 INT i=0, iCurSel=0; 00150 UINT uiIndex; 00151 TCHAR szProfile[MAX_PATH]; 00152 TCHAR szTemp[MAX_PATH]; 00153 TCHAR szConfig[MAX_PATH]; 00154 POWER_POLICY pp; 00155 00156 iCurSel = (INT)SendDlgItemMessage(hwndDlg, IDC_ENERGYLIST, 00157 CB_GETCURSEL, 00158 0, 00159 0); 00160 if (iCurSel == CB_ERR) 00161 return; 00162 00163 memcpy(&pp, &gPP[iCurSel], sizeof(POWER_POLICY)); 00164 00165 uiIndex = (UINT)SendDlgItemMessage(hwndDlg, IDC_ENERGYLIST, CB_GETCURSEL, 0, 0); 00166 if(uiIndex != (UINT)CB_ERR) 00167 { 00168 SendDlgItemMessage(hwndDlg, IDC_ENERGYLIST, CB_GETLBTEXT, uiIndex, (LPARAM)szProfile); 00169 if(LoadString(hApplet, IDS_CONFIG1, szTemp, MAX_PATH)) 00170 { 00171 _stprintf(szConfig,szTemp,szProfile); 00172 SetWindowText(GetDlgItem(hwndDlg, IDC_GRPDETAIL),szConfig); 00173 } 00174 } 00175 00176 for(i=0;i<16;i++) 00177 { 00178 if (Sec[i]==pp.user.VideoTimeoutAc) 00179 { 00180 SendDlgItemMessage(hwndDlg, IDC_MONITORACLIST, 00181 CB_SETCURSEL, 00182 i, 00183 (LPARAM)0); 00184 } 00185 00186 if (Sec[i]==pp.user.VideoTimeoutDc) 00187 { 00188 SendDlgItemMessage(hwndDlg, IDC_MONITORDCLIST, 00189 CB_SETCURSEL, 00190 i, 00191 (LPARAM)0); 00192 } 00193 if (Sec[i]==pp.user.SpindownTimeoutAc) 00194 { 00195 SendDlgItemMessage(hwndDlg, IDC_DISKACLIST, 00196 CB_SETCURSEL, 00197 i-2, 00198 (LPARAM)0); 00199 } 00200 if (Sec[i]==pp.user.SpindownTimeoutDc) // IdleTimeoutDc) 00201 { 00202 SendDlgItemMessage(hwndDlg, IDC_DISKDCLIST, 00203 CB_SETCURSEL, 00204 i-2, 00205 (LPARAM)0); 00206 } 00207 if (Sec[i]==pp.user.IdleTimeoutAc) 00208 { 00209 SendDlgItemMessage(hwndDlg, IDC_STANDBYACLIST, 00210 CB_SETCURSEL, 00211 i, 00212 (LPARAM)0); 00213 } 00214 if (Sec[i]==pp.user.IdleTimeoutDc) 00215 { 00216 SendDlgItemMessage(hwndDlg, IDC_STANDBYDCLIST, 00217 CB_SETCURSEL, 00218 i, 00219 (LPARAM)0); 00220 } 00221 00222 if (Sec[i]==pp.mach.DozeS4TimeoutAc) 00223 { 00224 SendDlgItemMessage(hwndDlg, IDC_HYBERNATEACLIST, 00225 CB_SETCURSEL, 00226 i, 00227 (LPARAM)0); 00228 } 00229 if (Sec[i]==pp.mach.DozeS4TimeoutDc) 00230 { 00231 SendDlgItemMessage(hwndDlg, IDC_HYBERNATEDCLIST, 00232 CB_SETCURSEL, 00233 i, 00234 (LPARAM)0); 00235 } 00236 } 00237 } 00238 00239 00240 BOOLEAN CALLBACK 00241 callback_EnumPwrScheme(UINT uiIndex, DWORD dwName, LPTSTR sName, DWORD dwDesc, 00242 LPWSTR sDesc, PPOWER_POLICY pp,LPARAM lParam) 00243 { 00244 int index; 00245 00246 UNREFERENCED_PARAMETER(lParam); 00247 UNREFERENCED_PARAMETER(sDesc); 00248 UNREFERENCED_PARAMETER(dwDesc); 00249 UNREFERENCED_PARAMETER(dwName); 00250 00251 if (ValidatePowerPolicies(0,pp)) 00252 { 00253 if (guiIndex >= MAX_POWER_POLICY) 00254 { 00255 // FIXME: 00256 // Implement store power policy dynamically 00257 return FALSE; 00258 } 00259 00260 00261 memcpy(&gPP[guiIndex], pp, sizeof(POWER_POLICY)); 00262 guiIndex++; 00263 00264 index = (int) SendMessage(hList, 00265 CB_ADDSTRING, 00266 0, 00267 (LPARAM)sName); 00268 if (index == CB_ERR) 00269 return FALSE; 00270 00271 SendMessage(hList, 00272 CB_SETITEMDATA, 00273 index, 00274 (LPARAM)uiIndex); 00275 00276 if (aps == uiIndex) 00277 { 00278 SendMessage(hList, 00279 CB_SELECTSTRING, 00280 TRUE, 00281 (LPARAM)sName); 00282 LoadConfig(GetParent(hList)); 00283 } 00284 } 00285 return TRUE; 00286 } 00287 00288 00289 static VOID 00290 Pos_InitPage(HWND hwndDlg) 00291 { 00292 int ifrom=0,i=0,imin=0; 00293 HWND hwnd = NULL; 00294 TCHAR szName[MAX_PATH]; 00295 LRESULT index; 00296 00297 for(i=1;i<9;i++) 00298 { 00299 switch(i) 00300 { 00301 case 1: 00302 hwnd=GetDlgItem(hwndDlg, IDC_MONITORACLIST); 00303 imin=IDS_TIMEOUT1; 00304 break; 00305 case 2: 00306 hwnd=GetDlgItem(hwndDlg, IDC_STANDBYACLIST); 00307 imin=IDS_TIMEOUT1; 00308 break; 00309 case 3: 00310 hwnd=GetDlgItem(hwndDlg, IDC_DISKACLIST); 00311 imin=IDS_TIMEOUT3; 00312 break; 00313 case 4: 00314 hwnd=GetDlgItem(hwndDlg, IDC_HYBERNATEACLIST); 00315 imin=IDS_TIMEOUT3; 00316 break; 00317 case 5: 00318 hwnd=GetDlgItem(hwndDlg, IDC_MONITORDCLIST); 00319 imin=IDS_TIMEOUT1; 00320 break; 00321 case 6: 00322 hwnd=GetDlgItem(hwndDlg, IDC_STANDBYDCLIST); 00323 imin=IDS_TIMEOUT1; 00324 break; 00325 case 7: 00326 hwnd=GetDlgItem(hwndDlg, IDC_DISKDCLIST); 00327 imin=IDS_TIMEOUT3; 00328 break; 00329 case 8: 00330 hwnd=GetDlgItem(hwndDlg, IDC_HYBERNATEDCLIST); 00331 imin=IDS_TIMEOUT3; 00332 break; 00333 default: 00334 return; 00335 } 00336 for (ifrom=imin;ifrom<(IDS_TIMEOUT15+1);ifrom++) 00337 { 00338 if (LoadString(hApplet, ifrom, szName, MAX_PATH)) 00339 { 00340 index = SendMessage(hwnd, 00341 CB_ADDSTRING, 00342 0, 00343 (LPARAM)szName); 00344 00345 if (index == CB_ERR) 00346 return; 00347 00348 SendMessage(hwnd, 00349 CB_SETITEMDATA, 00350 index, 00351 (LPARAM)Sec[ifrom-IDS_TIMEOUT16]); 00352 } 00353 } 00354 if (LoadString(hApplet, IDS_TIMEOUT16, szName, MAX_PATH)) 00355 { 00356 index = SendMessage(hwnd, 00357 CB_ADDSTRING, 00358 0, 00359 (LPARAM)szName); 00360 if (index == CB_ERR) 00361 return; 00362 00363 SendMessage(hwnd, 00364 CB_SETITEMDATA, 00365 index, 00366 (LPARAM)Sec[0]); 00367 } 00368 } 00369 } 00370 00371 00372 static VOID 00373 Pos_SaveData(HWND hwndDlg) 00374 { 00375 INT iCurSel=0,tmp=0; 00376 00377 iCurSel = (INT) SendDlgItemMessage(hwndDlg, IDC_ENERGYLIST, 00378 CB_GETCURSEL, 00379 0, 00380 0); 00381 if (iCurSel == CB_ERR) 00382 return; 00383 00384 tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_MONITORDCLIST, 00385 CB_GETCURSEL, 00386 0, 00387 (LPARAM)0); 00388 if (tmp > 0 && tmp < 16) 00389 { 00390 gPP[iCurSel].user.VideoTimeoutAc = Sec[tmp]; 00391 } 00392 tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_MONITORDCLIST, 00393 CB_GETCURSEL, 00394 0, 00395 (LPARAM)0); 00396 if (tmp > 0 && tmp < 16) 00397 { 00398 gPP[iCurSel].user.VideoTimeoutDc = Sec[tmp]; 00399 } 00400 tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_DISKACLIST, 00401 CB_GETCURSEL, 00402 0, 00403 (LPARAM)0); 00404 if (tmp > 0 && tmp < 16) 00405 { 00406 gPP[iCurSel].user.SpindownTimeoutAc = Sec[tmp+2]; 00407 } 00408 tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_DISKDCLIST, 00409 CB_GETCURSEL, 00410 0, 00411 (LPARAM)0); 00412 if (tmp > 0 && tmp < 16) 00413 { 00414 gPP[iCurSel].user.SpindownTimeoutDc = Sec[tmp+2]; 00415 } 00416 tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_STANDBYACLIST, 00417 CB_GETCURSEL, 00418 0, 00419 (LPARAM)0); 00420 if (tmp > 0 && tmp < 16) 00421 { 00422 gPP[iCurSel].user.IdleTimeoutAc = Sec[tmp]; 00423 } 00424 tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_STANDBYDCLIST, 00425 CB_GETCURSEL, 00426 0, 00427 (LPARAM)0); 00428 if (tmp > 0 && tmp < 16) 00429 { 00430 gPP[iCurSel].user.IdleTimeoutDc = Sec[tmp]; 00431 } 00432 tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_HYBERNATEACLIST, 00433 CB_GETCURSEL, 00434 0, 00435 (LPARAM)0); 00436 if (tmp > 0 && tmp < 16) 00437 { 00438 gPP[iCurSel].mach.DozeS4TimeoutAc = Sec[tmp]; 00439 } 00440 tmp = (INT) SendDlgItemMessage(hwndDlg, IDC_HYBERNATEDCLIST, 00441 CB_GETCURSEL, 00442 0, 00443 (LPARAM)0); 00444 if (tmp > 0 && tmp < 16) 00445 { 00446 gPP[iCurSel].mach.DozeS4TimeoutDc = Sec[tmp]; 00447 } 00448 00449 SetActivePwrScheme(iCurSel,NULL,&gPP[iCurSel]); 00450 LoadConfig(hwndDlg); 00451 } 00452 00453 00454 static BOOLEAN 00455 DelScheme(HWND hwnd) 00456 { 00457 INT iCurSel; 00458 HWND hList; 00459 TCHAR szBuf[1024], szBufT[1024]; 00460 UINT DelScheme; 00461 00462 hList = GetDlgItem(hwnd, IDC_ENERGYLIST); 00463 00464 iCurSel = SendMessage(hList, CB_GETCURSEL, 0, 0); 00465 if (iCurSel == CB_ERR) return FALSE; 00466 00467 SendMessage(hList, CB_SETCURSEL, iCurSel, 0); 00468 00469 DelScheme = SendMessage(hList, CB_GETITEMDATA, (WPARAM)iCurSel, 0); 00470 if (DelScheme == (UINT)CB_ERR) return FALSE; 00471 00472 LoadString(hApplet, IDS_DEL_SCHEME_TITLE, szBufT, sizeof(szBufT) / sizeof(TCHAR)); 00473 LoadString(hApplet, IDS_DEL_SCHEME, szBuf, sizeof(szBuf) / sizeof(TCHAR)); 00474 00475 if (MessageBox(hwnd, (LPCTSTR)szBuf, (LPCTSTR)szBufT, MB_OKCANCEL | MB_ICONQUESTION) == IDOK) 00476 { 00477 UINT Current; 00478 00479 if (GetActivePwrScheme(&Current)) 00480 { 00481 SendMessage(hList, CB_SETCURSEL, (WPARAM)0, 0); 00482 SendMessage(hList, CB_DELETESTRING, (WPARAM)iCurSel, 0); 00483 if (Current == DelScheme) Pos_SaveData(hwnd); 00484 } 00485 00486 if (DeletePwrScheme(DelScheme) != 0) return TRUE; 00487 } 00488 00489 return FALSE; 00490 } 00491 00492 00493 static BOOLEAN 00494 CreateEnergyList(HWND hwnd) 00495 { 00496 BOOLEAN retval; 00497 POWER_POLICY pp; 00498 SYSTEM_POWER_CAPABILITIES spc; 00499 00500 hList = hwnd; 00501 00502 if (!GetActivePwrScheme(&aps)) 00503 return FALSE; 00504 00505 if (!ReadGlobalPwrPolicy(&gGPP)) 00506 return FALSE; 00507 00508 if (!ReadPwrScheme(aps,&pp)) 00509 return FALSE; 00510 00511 if (!ValidatePowerPolicies(&gGPP,0)) 00512 return FALSE; 00513 00514 /* 00515 if (!SetActivePwrScheme(aps,&gGPP,&pp)) 00516 return FALSE; 00517 */ 00518 00519 if (!GetPwrCapabilities(&spc)) 00520 return FALSE; 00521 00522 if (CanUserWritePwrScheme()) 00523 { 00524 // TODO: 00525 // Enable write / delete powerscheme button 00526 } 00527 00528 Pos_InitPage(GetParent(hwnd)); 00529 00530 if (!GetActivePwrScheme(&aps)) 00531 return FALSE; 00532 00533 retval = EnumPwrSchemes(callback_EnumPwrScheme, aps); 00534 00535 if(SendMessage(hwnd, CB_GETCOUNT, 0, 0) > 0) 00536 { 00537 EnableWindow(GetDlgItem(hwndDialog, IDC_DELETE_BTN),TRUE); 00538 EnableWindow(GetDlgItem(hwndDialog, IDC_SAVEAS_BTN),TRUE); 00539 } 00540 00541 return retval; 00542 } 00543 00544 00545 /* Property page dialog callback */ 00546 INT_PTR CALLBACK 00547 PowerSchemesDlgProc( 00548 HWND hwndDlg, 00549 UINT uMsg, 00550 WPARAM wParam, 00551 LPARAM lParam 00552 ) 00553 { 00554 switch(uMsg) 00555 { 00556 case WM_INITDIALOG: 00557 hPos = hwndDlg; 00558 hwndDialog = hwndDlg; 00559 if (!Pos_InitData()) 00560 { 00561 // TODO: 00562 // Initialization failed 00563 // Handle error 00564 MessageBox(hwndDlg,_T("Pos_InitData failed\n"), NULL, MB_OK); 00565 00566 } 00567 if (!CreateEnergyList(GetDlgItem(hwndDlg, IDC_ENERGYLIST))) 00568 { 00569 // TODO: 00570 // Initialization failed 00571 // Handle error 00572 MessageBox(hwndDlg,_T("CreateEnergyList failed\n"), NULL, MB_OK); 00573 } 00574 return TRUE; 00575 case WM_COMMAND: 00576 switch(LOWORD(wParam)) 00577 { 00578 case IDC_ENERGYLIST: 00579 if (HIWORD(wParam) == CBN_SELCHANGE) 00580 { 00581 LoadConfig(hwndDlg); 00582 PropSheet_Changed(GetParent(hwndDlg), hwndDlg); 00583 } 00584 break; 00585 case IDC_DELETE_BTN: 00586 { 00587 DelScheme(hwndDlg); 00588 } 00589 break; 00590 case IDC_SAVEAS_BTN: 00591 { 00592 00593 } 00594 break; 00595 case IDC_MONITORACLIST: 00596 case IDC_MONITORDCLIST: 00597 case IDC_DISKACLIST: 00598 case IDC_DISKDCLIST: 00599 case IDC_STANDBYACLIST: 00600 case IDC_STANDBYDCLIST: 00601 case IDC_HYBERNATEACLIST: 00602 case IDC_HYBERNATEDCLIST: 00603 if (HIWORD(wParam) == CBN_SELCHANGE) 00604 { 00605 PropSheet_Changed(GetParent(hwndDlg), hwndDlg); 00606 } 00607 break; 00608 } 00609 break; 00610 case WM_NOTIFY: 00611 { 00612 LPNMHDR lpnm = (LPNMHDR)lParam; 00613 if (lpnm->code == (UINT)PSN_APPLY) 00614 { 00615 Pos_SaveData(hwndDlg); 00616 } 00617 return TRUE; 00618 } 00619 break; 00620 } 00621 return FALSE; 00622 } Generated on Sat May 26 2012 04:19:46 for ReactOS by
1.7.6.1
|