Home | Info | Community | Development | myReactOS | Contact Us
[static]
Definition at line 281 of file screensaver.c.
Referenced by OnInitDialog().
{ HKEY hKey; TCHAR szBuffer[2]; DWORD bufferSize = sizeof(szBuffer); DWORD varType = REG_SZ; LONG result; if (RegOpenKeyEx(HKEY_CURRENT_USER, _T("Control Panel\\Desktop"), 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) { result = RegQueryValueEx(hKey, _T("ScreenSaverIsSecure"), 0, &varType, (LPBYTE)szBuffer, &bufferSize); RegCloseKey(hKey); if (result == ERROR_SUCCESS) { if (_ttoi(szBuffer) == 1) { SendDlgItemMessage(hwndDlg, IDC_SCREENS_USEPASSCHK, BM_SETCHECK, (WPARAM)BST_CHECKED, 0); return; } } SendDlgItemMessage(hwndDlg, IDC_SCREENS_USEPASSCHK, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0); } }