[cmake-commits] hoffman committed CMakeSetupDialog.cpp 1.117.2.1 1.117.2.2

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Feb 15 12:45:10 EST 2007


Update of /cvsroot/CMake/CMake/Source/MFCDialog
In directory public:/mounts/ram/cvs-serv8820/Source/MFCDialog

Modified Files:
      Tag: CMake-2-4
	CMakeSetupDialog.cpp 
Log Message:
ENH: merge in changes from main tree, including fix for exception stuff in vs 7


Index: CMakeSetupDialog.cpp
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/MFCDialog/CMakeSetupDialog.cpp,v
retrieving revision 1.117.2.1
retrieving revision 1.117.2.2
diff -u -d -r1.117.2.1 -r1.117.2.2
--- CMakeSetupDialog.cpp	30 Jun 2006 17:48:46 -0000	1.117.2.1
+++ CMakeSetupDialog.cpp	15 Feb 2007 17:45:07 -0000	1.117.2.2
@@ -424,6 +424,17 @@
     {
     // 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)
@@ -540,6 +551,17 @@
   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:\\");
@@ -1173,6 +1195,10 @@
   cmSystemTools::EnableMessages();
   m_CacheEntriesList.ClearDirty();
   this->RunCMake(true);
+
+  // save the size of the dialog
+  
+
   if (!(::GetKeyState(VK_SHIFT) & 0x1000))
     {
     CDialog::OnOK();



More information about the Cmake-commits mailing list