diff options
author | Ken Martin <ken.martin@kitware.com> | 2007-02-05 16:13:18 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2007-02-05 16:13:18 (GMT) |
commit | 551397b89866f0e71237a54abc2bf6986dc4a3af (patch) | |
tree | 65367b14e2d54ad4ee585723a54911b54c6df035 /Source/MFCDialog | |
parent | 6bba86c8c8ba6f58c0fd650d0b65d4ed4cf1d727 (diff) | |
download | CMake-551397b89866f0e71237a54abc2bf6986dc4a3af.zip CMake-551397b89866f0e71237a54abc2bf6986dc4a3af.tar.gz CMake-551397b89866f0e71237a54abc2bf6986dc4a3af.tar.bz2 |
ENH: add more time to bootstrap test
Diffstat (limited to 'Source/MFCDialog')
-rw-r--r-- | Source/MFCDialog/CMakeSetupDialog.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp index 84ed6d1..f7f9e49 100644 --- a/Source/MFCDialog/CMakeSetupDialog.cpp +++ b/Source/MFCDialog/CMakeSetupDialog.cpp @@ -426,6 +426,17 @@ void CMakeSetupDialog::SaveToRegistry() { // save some values CString regvalue; + + // write the size of the dialog + CRect size; + this->GetClientRect(&size); + unsigned long width = size.Width(); + unsigned long height = size.Height(); + RegSetValueEx(hKey, _T("Width"), 0, REG_DWORD, + (CONST BYTE *)(&width),4); + RegSetValueEx(hKey, _T("Height"), 0, REG_DWORD, + (CONST BYTE *)(&height),4); + this->ReadRegistryValue(hKey, &(regvalue),"WhereSource1","C:\\"); int shiftEnd = 9; if(m_WhereSource != regvalue) @@ -542,6 +553,17 @@ void CMakeSetupDialog::LoadFromRegistry() else { // load some values + DWORD dwSize = 4; + DWORD width, height; + + if (RegQueryValueEx(hKey,_T("Width"), NULL, NULL, + (BYTE *)&width, &dwSize) == ERROR_SUCCESS && + RegQueryValueEx(hKey,_T("Height"), NULL, NULL, + (BYTE *)&height, &dwSize) == ERROR_SUCCESS) + { + this->SetWindowPos(0,0,0,width,height,SWP_NOZORDER | SWP_NOMOVE); + } + if (m_WhereSource.IsEmpty()) { this->ReadRegistryValue(hKey, &(m_WhereSource),"WhereSource1","C:\\"); @@ -1175,6 +1197,10 @@ void CMakeSetupDialog::OnOk() cmSystemTools::EnableMessages(); m_CacheEntriesList.ClearDirty(); this->RunCMake(true); + + // save the size of the dialog + + if (!(::GetKeyState(VK_SHIFT) & 0x1000)) { CDialog::OnOK(); |