diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-11-02 04:00:44 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-11-02 04:00:44 (GMT) |
commit | 565afcbdb97c1a2bc05357644d85e09f957a2e0b (patch) | |
tree | c1b72717cae3729d225ae58ebcf75510fadd5d53 /Source/MFCDialog | |
parent | 2ccc30d22a63cf6c1858cdb955e3d7a53c8b423b (diff) | |
download | CMake-565afcbdb97c1a2bc05357644d85e09f957a2e0b.zip CMake-565afcbdb97c1a2bc05357644d85e09f957a2e0b.tar.gz CMake-565afcbdb97c1a2bc05357644d85e09f957a2e0b.tar.bz2 |
ENH: better resize
Diffstat (limited to 'Source/MFCDialog')
-rw-r--r-- | Source/MFCDialog/CMakeSetup.rc | 53 | ||||
-rw-r--r-- | Source/MFCDialog/CMakeSetupDialog.cpp | 49 | ||||
-rw-r--r-- | Source/MFCDialog/CMakeSetupDialog.h | 20 | ||||
-rw-r--r-- | Source/MFCDialog/resource.h | 7 |
4 files changed, 92 insertions, 37 deletions
diff --git a/Source/MFCDialog/CMakeSetup.rc b/Source/MFCDialog/CMakeSetup.rc index 5f0cff0..0dbbe5d 100644 --- a/Source/MFCDialog/CMakeSetup.rc +++ b/Source/MFCDialog/CMakeSetup.rc @@ -1,4 +1,4 @@ -// Microsoft Visual C++ generated resource script. +//Microsoft Developer Studio generated resource script. // #include "resource.h" @@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE MOVEABLE PURE BEGIN "resource.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE MOVEABLE PURE BEGIN "#include ""afxres.h""\r\n" "\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE MOVEABLE PURE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" @@ -66,15 +66,15 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDR_MAINFRAME ICON "res\\CMakeSetupDialog.ico" +IDR_MAINFRAME ICON DISCARDABLE "res\\CMakeSetupDialog.ico" ///////////////////////////////////////////////////////////////////////////// // // Dialog // -IDD_ABOUTBOX DIALOG 0, 0, 235, 55 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About CMakeSetup" FONT 8, "MS Sans Serif" BEGIN @@ -86,18 +86,18 @@ BEGIN END IDD_CMakeSetupDialog_DIALOG DIALOGEX 0, 0, 446, 241 -STYLE DS_SETFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | - WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_APPWINDOW CAPTION "CMakeSetupDialog" -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Sans Serif" BEGIN COMBOBOX IDC_WhereSource,96,6,169,66,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Browse...",IDC_BUTTON2,267,6,34,13 + PUSHBUTTON "Browse...",IDC_BROWSE_SOURCE,267,6,34,13 COMBOBOX IDC_WhereBuild,96,26,169,68,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Browse...",IDC_BUTTON3,267,25,34,13 + PUSHBUTTON "Browse...",IDC_BROWSE_BUILD,267,25,34,13 DEFPUSHBUTTON "Configure",IDC_BuildProjects,110,223,51,15 PUSHBUTTON "Cancel",IDCANCEL,222,223,51,15 LISTBOX IDC_LIST2,15,53,419,126,LBS_OWNERDRAWVARIABLE | @@ -110,17 +110,17 @@ BEGIN IDC_MouseHelpCaption,112,190,243,27 LTEXT "Static",IDC_CMAKE_VERSION,3,227,92,13,SS_CENTERIMAGE PUSHBUTTON "OK",IDC_OK,166,223,51,15 - COMBOBOX IDC_Generator,339,7,103,50,CBS_DROPDOWN | CBS_SORT | + COMBOBOX IDC_Generator,340,7,102,50,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT "Build For:",IDC_GeneratorLabel,305,9,31,9 PUSHBUTTON "Help",IDC_HELP_BUTTON,278,223,51,15 CONTROL "Show Advanced Values",IDC_AdvancedValues,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,305,28,98,9 RTEXT "Static",IDC_PROGRESS,341,226,100,12,SS_CENTERIMAGE + LTEXT "Build For:",IDC_BuildForLabel,305,8,28,11 END -IDD_CMAKE_HELP_DIALOG DIALOG 0, 0, 365, 183 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_CMAKE_HELP_DIALOG DIALOG DISCARDABLE 0, 0, 365, 183 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "CMake Help" FONT 8, "MS Sans Serif" BEGIN @@ -130,6 +130,7 @@ BEGIN END +#ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version @@ -152,13 +153,13 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "FileDescription", "CMakeSetup MFC Application" - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "CMakeSetup" - VALUE "LegalCopyright", "Copyright (C) 2000" - VALUE "OriginalFilename", "CMakeSetup.EXE" - VALUE "ProductName", "CMakeSetup Application" - VALUE "ProductVersion", "1, 0, 0, 1" + VALUE "FileDescription", "CMakeSetup MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "CMakeSetup\0" + VALUE "LegalCopyright", "Copyright (C) 2000\0" + VALUE "OriginalFilename", "CMakeSetup.EXE\0" + VALUE "ProductName", "CMakeSetup Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" END END BLOCK "VarFileInfo" @@ -167,6 +168,8 @@ BEGIN END END +#endif // !_MAC + ///////////////////////////////////////////////////////////////////////////// // @@ -174,7 +177,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO +GUIDELINES DESIGNINFO MOVEABLE PURE BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -206,7 +209,7 @@ END // String Table // -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_ABOUTBOX "&About CMakeSetup..." IDS_CREATESHORTCUT "&Create shortcut" diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp index 04f1d9a..e5140ba 100644 --- a/Source/MFCDialog/CMakeSetupDialog.cpp +++ b/Source/MFCDialog/CMakeSetupDialog.cpp @@ -127,6 +127,8 @@ CMakeSetupDialog::CMakeSetupDialog(const CMakeCommandLineInfo& cmdInfo, m_CacheEntriesList.m_CMakeSetupDialog = this; //{{AFX_DATA_INIT(CMakeSetupDialog) + //}}AFX_DATA_INIT + // Get the parameters from the command line info // If an unknown parameter is found, try to interpret it too, since it // is likely to be a file dropped on the shortcut :) @@ -145,7 +147,6 @@ CMakeSetupDialog::CMakeSetupDialog(const CMakeCommandLineInfo& cmdInfo, this->m_GeneratorChoiceString = _T(""); this->ChangeDirectoriesFromFile((LPCTSTR)cmdInfo.m_LastUnknownParameter); } - //}}AFX_DATA_INIT // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); @@ -169,6 +170,10 @@ void CMakeSetupDialog::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CMakeSetupDialog) + DDX_Control(pDX, IDC_AdvancedValues, m_AdvancedValuesControl); + DDX_Control(pDX, IDC_BuildForLabel, m_BuildForLabel); + DDX_Control(pDX, IDC_BROWSE_SOURCE, m_BrowseSource); + DDX_Control(pDX, IDC_BROWSE_BUILD, m_BrowseBuild); DDX_Control(pDX, IDC_HELP_BUTTON, m_HelpButton); DDX_Control(pDX, IDC_Generator, m_GeneratorChoice); DDX_Control(pDX, IDC_OK, m_OKButton); @@ -880,7 +885,6 @@ void CMakeSetupDialog::SaveCacheFromGUI() } - void CMakeSetupDialog::OnSize(UINT nType, int cx, int cy) { if (nType == SIZE_MINIMIZED) @@ -910,6 +914,47 @@ void CMakeSetupDialog::OnSize(UINT nType, int cx, int cy) { // get the original sizes/positions CRect cRect; + m_AdvancedValuesControl.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_AdvancedValuesControl.SetWindowPos(&wndTop, cRect.left + deltax, + cRect.top, + 0, 0, + SWP_NOSIZE | SWP_NOZORDER); + m_BuildForLabel.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_BuildForLabel.SetWindowPos(&wndTop, cRect.left + deltax, + cRect.top, + 0, 0, + SWP_NOSIZE | SWP_NOZORDER); + m_GeneratorChoice.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_GeneratorChoice.SetWindowPos(&wndTop, cRect.left + deltax, + cRect.top, + 0, 0, + SWP_NOSIZE | SWP_NOZORDER); + m_BrowseSource.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_BrowseSource.SetWindowPos(&wndTop, cRect.left + deltax, + cRect.top, + 0, 0, + SWP_NOSIZE | SWP_NOZORDER); + m_BrowseBuild.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_BrowseBuild.SetWindowPos(&wndTop, cRect.left + deltax, + cRect.top, + 0, 0, + SWP_NOSIZE | SWP_NOZORDER); + + m_WhereSourceControl.GetWindowRect(&cRect); + m_WhereSourceControl.SetWindowPos(&wndTop, cRect.left, cRect.top, + cRect.Width() + deltax, + cRect.Height() + deltay, + SWP_NOMOVE | SWP_NOZORDER); + m_WhereBuildControl.GetWindowRect(&cRect); + m_WhereBuildControl.SetWindowPos(&wndTop, cRect.left, cRect.top, + cRect.Width() + deltax, + cRect.Height() + deltay, + SWP_NOMOVE | SWP_NOZORDER); m_ListFrame.GetWindowRect(&cRect); m_ListFrame.SetWindowPos(&wndTop, cRect.left, cRect.top, cRect.Width() + deltax, diff --git a/Source/MFCDialog/CMakeSetupDialog.h b/Source/MFCDialog/CMakeSetupDialog.h index b35764f..af503b7 100644 --- a/Source/MFCDialog/CMakeSetupDialog.h +++ b/Source/MFCDialog/CMakeSetupDialog.h @@ -57,11 +57,15 @@ protected: void RemoveAdvancedValues(); // Dialog Data //{{AFX_DATA(CMakeSetupDialog) - enum { IDD = IDD_CMakeSetupDialog_DIALOG }; - CButton m_HelpButton; - CComboBox m_GeneratorChoice; - CButton m_OKButton; - CButton m_CancelButton; + enum { IDD = IDD_CMakeSetupDialog_DIALOG }; + CButton m_AdvancedValuesControl; + CStatic m_BuildForLabel; + CButton m_BrowseSource; + CButton m_BrowseBuild; + CButton m_HelpButton; + CComboBox m_GeneratorChoice; + CButton m_OKButton; + CButton m_CancelButton; CString m_WhereSource; CString m_WhereBuild; CButton m_ListFrame; @@ -72,9 +76,9 @@ protected: CStatic m_MouseHelp; CStatic m_VersionDisplay; CButton m_Configure; - CString m_GeneratorChoiceString; - BOOL m_AdvancedValues; - //}}AFX_DATA + CString m_GeneratorChoiceString; + BOOL m_AdvancedValues; + //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMakeSetupDialog) diff --git a/Source/MFCDialog/resource.h b/Source/MFCDialog/resource.h index efa4060..2d35e8a 100644 --- a/Source/MFCDialog/resource.h +++ b/Source/MFCDialog/resource.h @@ -1,5 +1,5 @@ //{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. +// Microsoft Developer Studio generated include file. // Used by CMakeSetup.rc // #define IDM_ABOUTBOX 0x0010 @@ -12,8 +12,10 @@ #define IDD_CMAKE_HELP_DIALOG 133 #define IDC_WhereSource 1001 #define IDC_BUTTON2 1002 +#define IDC_BROWSE_SOURCE 1002 #define IDC_WhereBuild 1003 #define IDC_BUTTON3 1004 +#define IDC_BROWSE_BUILD 1004 #define IDC_BuildProjects 1006 #define IDC_LIST2 1007 #define IDC_LIST3 1010 @@ -27,6 +29,7 @@ #define IDC_EDIT1 1025 #define IDC_AdvancedValues 1027 #define IDC_PROGRESS 1028 +#define IDC_BuildForLabel 1029 // Next default values for new objects // @@ -34,7 +37,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 134 #define _APS_NEXT_COMMAND_VALUE 32771 -#define _APS_NEXT_CONTROL_VALUE 1029 +#define _APS_NEXT_CONTROL_VALUE 1030 #define _APS_NEXT_SYMED_VALUE 102 #endif #endif |