registry.... wndproc
This commit is contained in:
@@ -336,11 +336,8 @@ DWORD LoadConfig(_In_ BOOL bSettings, _In_ BOOL bPos, _In_ BOOL bGroups)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// retrieve the group
|
// retrieve the group
|
||||||
// TODO: add error_checking, ERROR_FILE_NOT_FOUND
|
|
||||||
// stuff like that, please
|
|
||||||
// error checking makes reliability....
|
|
||||||
error = RegGetValue(hKeyProgramGroups, NULL, szGroupValName, RRF_RT_REG_BINARY, NULL, pGroup, &cbGroup);
|
error = RegGetValue(hKeyProgramGroups, NULL, szGroupValName, RRF_RT_REG_BINARY, NULL, pGroup, &cbGroup);
|
||||||
/*error = RegQueryValueEx(hKeyProgramGroups, szGroupValName, NULL, NULL, pGroup, &cbGroup);*/
|
|
||||||
if (error == ERROR_FILE_NOT_FOUND)
|
if (error == ERROR_FILE_NOT_FOUND)
|
||||||
{
|
{
|
||||||
OutputDebugString(TEXT("REGISTRY.C: Group not found!\n"));
|
OutputDebugString(TEXT("REGISTRY.C: Group not found!\n"));
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
return DefFrameProc(hWnd, hWndMDIClient, message, wParam, lParam);
|
return DefFrameProc(hWnd, hWndMDIClient, message, wParam, lParam);
|
||||||
|
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
|
case WM_ENDSESSION:
|
||||||
if (bSaveSettings)
|
if (bSaveSettings)
|
||||||
SaveConfig(TRUE, TRUE, TRUE, TRUE);
|
SaveConfig(TRUE, TRUE, TRUE, TRUE);
|
||||||
|
|
||||||
@@ -77,10 +78,6 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_ENDSESSION:
|
|
||||||
PostQuitMessage(0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return DefFrameProc(hWnd, hWndMDIClient, message, wParam, lParam);
|
return DefFrameProc(hWnd, hWndMDIClient, message, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user