├── .gitignore ├── LICENSE.md ├── README.md ├── ResizableComboBox ├── Demo.cpp ├── Demo.dsp ├── Demo.dsw ├── Demo.h ├── Demo.rc ├── Demo.sln ├── Demo.vcxproj ├── Demo.vcxproj.filters ├── DemoDlg.cpp ├── DemoDlg.h ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h └── res │ ├── Demo.ico │ └── Demo.rc2 ├── ResizableDialog ├── Demo.cpp ├── Demo.dsp ├── Demo.dsw ├── Demo.h ├── Demo.rc ├── Demo.sln ├── Demo.vcproj ├── Demo.vcxproj ├── Demo.vcxproj.filters ├── DemoDlg.cpp ├── DemoDlg.h ├── SecondDialog.cpp ├── SecondDialog.h ├── StdAfx.cpp ├── StdAfx.h ├── TestDialog.cpp ├── TestDialog.h ├── res │ ├── Demo.ico │ ├── Demo.rc2 │ ├── bitmap1.bmp │ └── toolbar1.bmp └── resource.h ├── ResizableDialogEx ├── Demo.cpp ├── Demo.h ├── Demo.rc ├── Demo.sln ├── Demo.vcxproj ├── Demo.vcxproj.filters ├── DemoDlg.cpp ├── DemoDlg.h ├── framework.h ├── pch.cpp ├── pch.h ├── res │ ├── Demo.ico │ ├── Demo.rc2 │ └── tile.bmp ├── resource.h └── targetver.h ├── ResizableFormViewMDI ├── ChildFrm.cpp ├── ChildFrm.h ├── ChildMixedFrame.cpp ├── ChildMixedFrame.h ├── ChildSplitFrame.cpp ├── ChildSplitFrame.h ├── Demo.cpp ├── Demo.dsp ├── Demo.dsw ├── Demo.h ├── Demo.rc ├── Demo.sln ├── Demo.vcproj ├── Demo.vcxproj ├── Demo.vcxproj.filters ├── DemoDoc.cpp ├── DemoDoc.h ├── DemoView.cpp ├── DemoView.h ├── MainFrm.cpp ├── MainFrm.h ├── MyPropertyPages.cpp ├── MyPropertyPages.h ├── MyPropertySheet.cpp ├── MyPropertySheet.h ├── PropertyFormView.cpp ├── PropertyFormView.h ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h └── res │ ├── Demo.ico │ ├── Demo.rc2 │ ├── DemoDoc.ico │ ├── DemoDoc0.ico │ ├── DemoDoc1.ico │ └── DemoDoc2.ico ├── ResizableFormViewSDI ├── Demo.cpp ├── Demo.dsp ├── Demo.dsw ├── Demo.h ├── Demo.rc ├── Demo.sln ├── Demo.vcproj ├── Demo.vcxproj ├── Demo.vcxproj.filters ├── DemoDoc.cpp ├── DemoDoc.h ├── DemoView.cpp ├── DemoView.h ├── MainFrm.cpp ├── MainFrm.h ├── StdAfx.cpp ├── StdAfx.h ├── res │ ├── Demo.ico │ ├── Demo.rc2 │ ├── DemoDoc.ico │ └── Toolbar.bmp └── resource.h ├── ResizableLib ├── Artistic-License.md ├── Docs │ ├── .gitignore │ ├── Doxyfile-include │ ├── class.txt │ ├── default.txt │ ├── footer.html │ ├── function.txt │ ├── header.html │ ├── refman.h │ ├── struct.txt │ ├── stylesheet.css │ └── typedef.txt ├── Doxyfile ├── ResizableComboBox.cpp ├── ResizableComboBox.h ├── ResizableComboLBox.cpp ├── ResizableComboLBox.h ├── ResizableDialog.cpp ├── ResizableDialog.h ├── ResizableDialogEx.cpp ├── ResizableDialogEx.h ├── ResizableFormView.cpp ├── ResizableFormView.h ├── ResizableFrame.cpp ├── ResizableFrame.h ├── ResizableGrip.cpp ├── ResizableGrip.h ├── ResizableLayout.cpp ├── ResizableLayout.h ├── ResizableLib.dox ├── ResizableLib.dsp ├── ResizableLib.dsw ├── ResizableLib.vcproj ├── ResizableLib.vcxproj ├── ResizableLib.vcxproj.filters ├── ResizableMDIChild.cpp ├── ResizableMDIChild.h ├── ResizableMDIFrame.cpp ├── ResizableMDIFrame.h ├── ResizableMinMax.cpp ├── ResizableMinMax.h ├── ResizableMsgSupport.cpp ├── ResizableMsgSupport.h ├── ResizablePage.cpp ├── ResizablePage.h ├── ResizablePageEx.cpp ├── ResizablePageEx.h ├── ResizableSheet.cpp ├── ResizableSheet.h ├── ResizableSheetEx.cpp ├── ResizableSheetEx.h ├── ResizableSheetState.cpp ├── ResizableSheetState.h ├── ResizableSplitterWnd.cpp ├── ResizableSplitterWnd.h ├── ResizableState.cpp ├── ResizableState.h ├── ResizableVersion.cpp ├── ResizableVersion.h ├── ResizableWndState.cpp ├── ResizableWndState.h ├── StdAfx.cpp └── StdAfx.h ├── ResizableProperties ├── Demo.cpp ├── Demo.dsp ├── Demo.dsw ├── Demo.h ├── Demo.rc ├── Demo.sln ├── Demo.vcproj ├── Demo.vcxproj ├── Demo.vcxproj.filters ├── DemoDlg.cpp ├── DemoDlg.h ├── MyPropertyPages.cpp ├── MyPropertyPages.h ├── MyPropertySheet.cpp ├── MyPropertySheet.h ├── StdAfx.cpp ├── StdAfx.h ├── res │ ├── Demo.ico │ └── Demo.rc2 └── resource.h └── ResizableWizard97 ├── Complete.cpp ├── Complete.h ├── CompleteNew.cpp ├── CompleteNew.h ├── Int1.cpp ├── Int1.h ├── Int2.cpp ├── Int2.h ├── IntroPg.cpp ├── IntroPg.h ├── IntroPgNew.cpp ├── IntroPgNew.h ├── StdAfx.cpp ├── StdAfx.h ├── WizSheet.cpp ├── WizSheet.h ├── Wizard97.cpp ├── Wizard97.dsp ├── Wizard97.dsw ├── Wizard97.h ├── Wizard97.rc ├── Wizard97.sln ├── Wizard97.vcxproj ├── Wizard97.vcxproj.filters ├── res ├── Baner16.bmp ├── Baner256.bmp ├── Water16.bmp ├── Water256.bmp ├── Wizard97.ico └── Wizard97.rc2 └── resource.h /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Visual Studio 3 | ################# 4 | 5 | ## Ignore Visual Studio temporary files, build results, and 6 | ## files generated by popular Visual Studio add-ons. 7 | 8 | # User-specific files 9 | *.suo 10 | *.user 11 | *.sln.docstates 12 | 13 | # Build results 14 | 15 | [Dd]ebug/ 16 | [Rr]elease/ 17 | [Dd]ebug[_ ][Uu]nicode/ 18 | [Rr]elease[_ ][Uu]nicode/ 19 | [Dd]ebug[_ ][Ss]tatic/ 20 | [Rr]elease[_ ][Ss]tatic/ 21 | [Dd]ebug[_ ][Uu]nicode/ 22 | [Rr]elease[_ ][Uu]nicode/ 23 | [Dd]ebug[_ ][Ss]tatic[_ ][Uu]nicode/ 24 | [Rr]elease[_ ][Ss]tatic[_ ][Uu]nicode/ 25 | Win32/ 26 | x64/ 27 | build/ 28 | [Bb]in/ 29 | [Oo]bj/ 30 | 31 | # MSTest test Results 32 | [Tt]est[Rr]esult*/ 33 | [Bb]uild[Ll]og.* 34 | 35 | *_i.c 36 | *_p.c 37 | *.ilk 38 | *.meta 39 | *.obj 40 | *.pch 41 | *.pdb 42 | *.pgc 43 | *.pgd 44 | *.rsp 45 | *.sbr 46 | *.tlb 47 | *.tli 48 | *.tlh 49 | *.tmp 50 | *.tmp_proj 51 | *.log 52 | *.vspscc 53 | *.vssscc 54 | .builds 55 | *.pidb 56 | *.log 57 | *.scc 58 | 59 | # Visual C++ cache files 60 | ipch/ 61 | *.aps 62 | *.ncb 63 | *.opensdf 64 | *.sdf 65 | *.cachefile 66 | 67 | # Visual Studio profiler 68 | *.psess 69 | *.vsp 70 | *.vspx 71 | 72 | # Guidance Automation Toolkit 73 | *.gpState 74 | 75 | # ReSharper is a .NET coding add-in 76 | _ReSharper*/ 77 | *.[Rr]e[Ss]harper 78 | 79 | # TeamCity is a build add-in 80 | _TeamCity* 81 | 82 | # DotCover is a Code Coverage Tool 83 | *.dotCover 84 | 85 | # NCrunch 86 | *.ncrunch* 87 | .*crunch*.local.xml 88 | 89 | # Installshield output folder 90 | [Ee]xpress/ 91 | 92 | # DocProject is a documentation generator add-in 93 | DocProject/buildhelp/ 94 | DocProject/Help/*.HxT 95 | DocProject/Help/*.HxC 96 | DocProject/Help/*.hhc 97 | DocProject/Help/*.hhk 98 | DocProject/Help/*.hhp 99 | DocProject/Help/Html2 100 | DocProject/Help/html 101 | 102 | # Click-Once directory 103 | publish/ 104 | 105 | # Publish Web Output 106 | *.Publish.xml 107 | *.pubxml 108 | *.publishproj 109 | 110 | # NuGet Packages Directory 111 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 112 | #packages/ 113 | 114 | # Windows Azure Build Output 115 | csx 116 | *.build.csdef 117 | 118 | # Windows Store app package directory 119 | AppPackages/ 120 | 121 | # Others 122 | sql/ 123 | *.Cache 124 | ClientBin/ 125 | [Ss]tyle[Cc]op.* 126 | ~$* 127 | *~ 128 | *.dbmdl 129 | *.[Pp]ublish.xml 130 | *.pfx 131 | *.publishsettings 132 | 133 | # RIA/Silverlight projects 134 | Generated_Code/ 135 | 136 | # Backup & report files from converting an old project file to a newer 137 | # Visual Studio version. Backup files are not needed, because we have git ;-) 138 | _UpgradeReport_Files/ 139 | Backup*/ 140 | UpgradeLog*.XML 141 | UpgradeLog*.htm 142 | 143 | # SQL Server files 144 | App_Data/*.mdf 145 | App_Data/*.ldf 146 | 147 | # Visual Studio 2017 148 | *.VC.db 149 | *.VC.opendb 150 | *.VC.db-shm 151 | *.VC.db-wal 152 | 153 | .vs/ 154 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## ResizableLib 2 | #### _A set of MFC classes to easily make resizable windows_ 3 | 4 | GitHub is the new home for this project. 5 | 6 | Legacy project home and CVS repository: 7 | http://sourceforge.net/projects/resizablelib/ 8 | 9 | Articles on CodeProject: 10 | + http://www.codeproject.com/Articles/1175/ResizableLib 11 | + http://www.codeproject.com/Articles/568/CResizableDialog 12 | + http://www.codeproject.com/Articles/1243/ResizableFormView 13 | + http://www.codeproject.com/Articles/653/CResizableSheet-and-CResizablePage 14 | -------------------------------------------------------------------------------- /ResizableComboBox/Demo.cpp: -------------------------------------------------------------------------------- 1 | // Demo.cpp : Defines the class behaviors for the application. 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "Demo.h" 6 | #include "DemoDlg.h" 7 | 8 | #ifdef _DEBUG 9 | #define new DEBUG_NEW 10 | #undef THIS_FILE 11 | static char THIS_FILE[] = __FILE__; 12 | #endif 13 | 14 | ///////////////////////////////////////////////////////////////////////////// 15 | // CDemoApp 16 | 17 | BEGIN_MESSAGE_MAP(CDemoApp, CWinApp) 18 | //{{AFX_MSG_MAP(CDemoApp) 19 | //}}AFX_MSG 20 | ON_COMMAND(ID_HELP, CWinApp::OnHelp) 21 | END_MESSAGE_MAP() 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // CDemoApp construction 25 | 26 | CDemoApp::CDemoApp() 27 | { 28 | } 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // The one and only CDemoApp object 32 | 33 | CDemoApp theApp; 34 | 35 | ///////////////////////////////////////////////////////////////////////////// 36 | // CDemoApp initialization 37 | 38 | BOOL CDemoApp::InitInstance() 39 | { 40 | // Standard initialization 41 | 42 | CDemoDlg dlg; 43 | m_pMainWnd = &dlg; 44 | 45 | dlg.DoModal(); 46 | 47 | // Since the dialog has been closed, return FALSE so that we exit the 48 | // application, rather than start the application's message pump. 49 | return FALSE; 50 | } 51 | -------------------------------------------------------------------------------- /ResizableComboBox/Demo.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "ResizableLib"="..\ResizableLib\ResizableLib.dsp" - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "Demo"=".\Demo.dsp" - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | Begin Project Dependency 27 | Project_Dep_Name ResizableLib 28 | End Project Dependency 29 | }}} 30 | 31 | ############################################################################### 32 | 33 | Global: 34 | 35 | Package=<5> 36 | {{{ 37 | }}} 38 | 39 | Package=<3> 40 | {{{ 41 | }}} 42 | 43 | ############################################################################### 44 | 45 | -------------------------------------------------------------------------------- /ResizableComboBox/Demo.h: -------------------------------------------------------------------------------- 1 | // Demo.h : main header file for the TESTCOMBOBOX application 2 | // 3 | 4 | #if !defined(AFX_TESTCOMBOBOX_H__AD8B91BB_D15A_4B88_B140_6D0F92474AED__INCLUDED_) 5 | #define AFX_TESTCOMBOBOX_H__AD8B91BB_D15A_4B88_B140_6D0F92474AED__INCLUDED_ 6 | 7 | #if _MSC_VER > 1000 8 | #pragma once 9 | #endif // _MSC_VER > 1000 10 | 11 | #ifndef __AFXWIN_H__ 12 | #error include 'stdafx.h' before including this file for PCH 13 | #endif 14 | 15 | #include "resource.h" // main symbols 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // CDemoApp: 19 | // See Demo.cpp for the implementation of this class 20 | // 21 | 22 | class CDemoApp : public CWinApp 23 | { 24 | public: 25 | CDemoApp(); 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CDemoApp) 30 | public: 31 | virtual BOOL InitInstance(); 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | 36 | //{{AFX_MSG(CDemoApp) 37 | //}}AFX_MSG 38 | DECLARE_MESSAGE_MAP() 39 | }; 40 | 41 | 42 | ///////////////////////////////////////////////////////////////////////////// 43 | 44 | //{{AFX_INSERT_LOCATION}} 45 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 46 | 47 | #endif // !defined(AFX_TESTCOMBOBOX_H__AD8B91BB_D15A_4B88_B140_6D0F92474AED__INCLUDED_) 48 | -------------------------------------------------------------------------------- /ResizableComboBox/Demo.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {bd2f9b21-f24a-41d3-bfcf-d9c024b5cbc6} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {1e896efe-2abd-4e6e-bea7-bb1505e79f91} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {a2810615-9e03-46fd-bd32-c7737be51553} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | 29 | 30 | Source Files 31 | 32 | 33 | 34 | 35 | Header Files 36 | 37 | 38 | Header Files 39 | 40 | 41 | Header Files 42 | 43 | 44 | Header Files 45 | 46 | 47 | 48 | 49 | Resource Files 50 | 51 | 52 | 53 | 54 | Resource Files 55 | 56 | 57 | -------------------------------------------------------------------------------- /ResizableComboBox/DemoDlg.cpp: -------------------------------------------------------------------------------- 1 | // DemoDlg.cpp : implementation file 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "Demo.h" 6 | #include "DemoDlg.h" 7 | 8 | #ifdef _DEBUG 9 | #define new DEBUG_NEW 10 | #undef THIS_FILE 11 | static char THIS_FILE[] = __FILE__; 12 | #endif 13 | 14 | ///////////////////////////////////////////////////////////////////////////// 15 | // CDemoDlg dialog 16 | 17 | CDemoDlg::CDemoDlg(CWnd* pParent /*=NULL*/) 18 | : CResizableDialog(CDemoDlg::IDD, pParent) 19 | { 20 | //{{AFX_DATA_INIT(CDemoDlg) 21 | // NOTE: the ClassWizard will add member initialization here 22 | //}}AFX_DATA_INIT 23 | m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); 24 | } 25 | 26 | void CDemoDlg::DoDataExchange(CDataExchange* pDX) 27 | { 28 | CResizableDialog::DoDataExchange(pDX); 29 | //{{AFX_DATA_MAP(CDemoDlg) 30 | DDX_Control(pDX, IDC_LIST1, m_ctrlList1); 31 | DDX_Control(pDX, IDC_COMBO1, m_ctrlCombo1); 32 | //}}AFX_DATA_MAP 33 | } 34 | 35 | BEGIN_MESSAGE_MAP(CDemoDlg, CResizableDialog) 36 | //{{AFX_MSG_MAP(CDemoDlg) 37 | ON_WM_NCCREATE() 38 | ON_BN_CLICKED(IDC_BUTTON1, OnButton1) 39 | ON_BN_CLICKED(IDC_BUTTON2, OnButton2) 40 | ON_BN_CLICKED(IDC_BUTTON3, OnButton3) 41 | //}}AFX_MSG_MAP 42 | END_MESSAGE_MAP() 43 | 44 | ///////////////////////////////////////////////////////////////////////////// 45 | // CDemoDlg message handlers 46 | 47 | BOOL CDemoDlg::OnInitDialog() 48 | { 49 | CResizableDialog::OnInitDialog(); 50 | 51 | SetIcon(m_hIcon, TRUE); // Set big icon 52 | SetIcon(m_hIcon, FALSE); // Set small icon 53 | 54 | // TODO: Add extra initialization here 55 | AddAnchor(IDOK, TOP_RIGHT); 56 | AddAnchor(IDC_COMBO1, TOP_LEFT, TOP_RIGHT); 57 | AddAnchor(IDC_EDIT1, TOP_LEFT, TOP_RIGHT); 58 | AddAnchor(IDC_LIST1, TOP_RIGHT, BOTTOM_RIGHT); 59 | 60 | AddAllOtherAnchors(TOP_LEFT, TOP_RIGHT); 61 | 62 | m_ctrlList1.AddString(_T("a very very very loooong item text")); 63 | m_ctrlList1.SetHorizontalExtent(400); 64 | 65 | return TRUE; // return TRUE unless you set the focus to a control 66 | } 67 | 68 | #ifndef WS_EX_LAYOUTRTL 69 | #pragma message("Please update your Windows header files, get the latest SDK") 70 | #define WS_EX_LAYOUTRTL 0x00400000 71 | #endif 72 | 73 | BOOL CDemoDlg::OnNcCreate(LPCREATESTRUCT lpCreateStruct) 74 | { 75 | // ModifyStyleEx(0, WS_EX_LAYOUTRTL); 76 | 77 | if (!CResizableDialog::OnNcCreate(lpCreateStruct)) 78 | return FALSE; 79 | 80 | return TRUE; 81 | } 82 | 83 | void CDemoDlg::OnButton1() 84 | { 85 | CString str; 86 | GetDlgItemText(IDC_EDIT1, str); 87 | m_ctrlCombo1.AddString(str); 88 | } 89 | 90 | void CDemoDlg::OnButton2() 91 | { 92 | m_ctrlCombo1.ResetContent(); 93 | } 94 | 95 | void CDemoDlg::OnButton3() 96 | { 97 | CString str; 98 | GetDlgItemText(IDC_EDIT1, str); 99 | m_ctrlCombo1.Dir(0, str); 100 | } 101 | -------------------------------------------------------------------------------- /ResizableComboBox/DemoDlg.h: -------------------------------------------------------------------------------- 1 | // DemoDlg.h : header file 2 | // 3 | 4 | #if !defined(AFX_TESTCOMBOBOXDLG_H__CA544F9E_0749_4281_8E00_EED3872CDCAC__INCLUDED_) 5 | #define AFX_TESTCOMBOBOXDLG_H__CA544F9E_0749_4281_8E00_EED3872CDCAC__INCLUDED_ 6 | 7 | #include "ResizableComboBox.h" 8 | #include "ResizableDialog.h" 9 | 10 | #if _MSC_VER > 1000 11 | #pragma once 12 | #endif // _MSC_VER > 1000 13 | 14 | ///////////////////////////////////////////////////////////////////////////// 15 | // CDemoDlg dialog 16 | 17 | class CDemoDlg : public CResizableDialog 18 | { 19 | // Construction 20 | public: 21 | CDemoDlg(CWnd* pParent = NULL); // standard constructor 22 | 23 | // Dialog Data 24 | //{{AFX_DATA(CDemoDlg) 25 | enum { IDD = IDD_TESTCOMBOBOX_DIALOG }; 26 | CListBox m_ctrlList1; 27 | CResizableComboBox m_ctrlCombo1; 28 | //}}AFX_DATA 29 | 30 | // ClassWizard generated virtual function overrides 31 | //{{AFX_VIRTUAL(CDemoDlg) 32 | protected: 33 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 34 | //}}AFX_VIRTUAL 35 | 36 | // Implementation 37 | protected: 38 | HICON m_hIcon; 39 | 40 | // Generated message map functions 41 | //{{AFX_MSG(CDemoDlg) 42 | virtual BOOL OnInitDialog(); 43 | afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct); 44 | afx_msg void OnButton1(); 45 | afx_msg void OnButton2(); 46 | afx_msg void OnButton3(); 47 | //}}AFX_MSG 48 | DECLARE_MESSAGE_MAP() 49 | }; 50 | 51 | //{{AFX_INSERT_LOCATION}} 52 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 53 | 54 | #endif // !defined(AFX_TESTCOMBOBOXDLG_H__CA544F9E_0749_4281_8E00_EED3872CDCAC__INCLUDED_) 55 | -------------------------------------------------------------------------------- /ResizableComboBox/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by Demo.rc 4 | // 5 | #define IDD_TESTCOMBOBOX_DIALOG 102 6 | #define IDR_MAINFRAME 128 7 | #define IDC_COMBO1 1000 8 | #define IDC_EDIT1 1001 9 | #define IDC_EDIT2 1002 10 | #define IDC_LIST1 1003 11 | #define IDC_BUTTON1 1004 12 | #define IDC_BUTTON2 1005 13 | #define IDC_BUTTON3 1006 14 | 15 | // Next default values for new objects 16 | // 17 | #ifdef APSTUDIO_INVOKED 18 | #ifndef APSTUDIO_READONLY_SYMBOLS 19 | #define _APS_NEXT_RESOURCE_VALUE 129 20 | #define _APS_NEXT_COMMAND_VALUE 32771 21 | #define _APS_NEXT_CONTROL_VALUE 1005 22 | #define _APS_NEXT_SYMED_VALUE 101 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /ResizableComboBox/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // Demo.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ResizableComboBox/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if !defined(AFX_STDAFX_H__F6DCB1E4_4878_43E3_8B61_F929F62F7A6F__INCLUDED_) 7 | #define AFX_STDAFX_H__F6DCB1E4_4878_43E3_8B61_F929F62F7A6F__INCLUDED_ 8 | 9 | #if _MSC_VER > 1000 10 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | #if defined _M_IX86 14 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 15 | #elif defined _M_IA64 16 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") 17 | #elif defined _M_X64 18 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 19 | #else 20 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 21 | #endif 22 | 23 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 24 | 25 | #include // MFC core and standard components 26 | #include // MFC extensions 27 | #include // MFC support for Internet Explorer 4 Common Controls 28 | #ifndef _AFX_NO_AFXCMN_SUPPORT 29 | #include // MFC support for Windows Common Controls 30 | #endif // _AFX_NO_AFXCMN_SUPPORT 31 | 32 | 33 | //{{AFX_INSERT_LOCATION}} 34 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 35 | 36 | #endif // !defined(AFX_STDAFX_H__F6DCB1E4_4878_43E3_8B61_F929F62F7A6F__INCLUDED_) 37 | -------------------------------------------------------------------------------- /ResizableComboBox/res/Demo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableComboBox/res/Demo.ico -------------------------------------------------------------------------------- /ResizableComboBox/res/Demo.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // TESTCOMBOBOX.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /ResizableDialog/Demo.cpp: -------------------------------------------------------------------------------- 1 | // Demo.cpp : Defines the class behaviors for the application. 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "Demo.h" 6 | #include "DemoDlg.h" 7 | #include "SecondDialog.h" 8 | #include "TestDialog.h" 9 | 10 | #ifdef _DEBUG 11 | #define new DEBUG_NEW 12 | #undef THIS_FILE 13 | static char THIS_FILE[] = __FILE__; 14 | #endif 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // CDemoApp 18 | 19 | BEGIN_MESSAGE_MAP(CDemoApp, CWinApp) 20 | //{{AFX_MSG_MAP(CDemoApp) 21 | //}}AFX_MSG_MAP 22 | END_MESSAGE_MAP() 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // CDemoApp construction 26 | 27 | CDemoApp::CDemoApp() 28 | { 29 | // TODO: add construction code here, 30 | // Place all significant initialization in InitInstance 31 | } 32 | 33 | ///////////////////////////////////////////////////////////////////////////// 34 | // The one and only CDemoApp object 35 | 36 | CDemoApp theApp; 37 | 38 | ///////////////////////////////////////////////////////////////////////////// 39 | // CDemoApp initialization 40 | 41 | BOOL CDemoApp::InitInstance() 42 | { 43 | SetRegistryKey(_T("Demo")); 44 | 45 | CDemoDlg* dlg = new CDemoDlg(); 46 | CSecondDialog dlg2; 47 | CTestDialog dlg3; 48 | 49 | // first dialog is created modeless and initially hidden 50 | dlg->Create(dlg->IDD); 51 | // after the second modal dialog is dismissed, show the first 52 | dlg2.DoModal(); 53 | dlg->ShowWindow(SW_SHOW); 54 | // show the last modal dialog 55 | dlg3.DoModal(); 56 | // keep running until the first modeless dialog is closed 57 | m_pMainWnd = dlg; 58 | // start the application's message pump 59 | return TRUE; 60 | } 61 | -------------------------------------------------------------------------------- /ResizableDialog/Demo.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "Demo"=.\Demo.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | Begin Project Dependency 15 | Project_Dep_Name ResizableLib 16 | End Project Dependency 17 | }}} 18 | 19 | ############################################################################### 20 | 21 | Project: "ResizableLib"=..\ResizableLib\ResizableLib.dsp - Package Owner=<4> 22 | 23 | Package=<5> 24 | {{{ 25 | }}} 26 | 27 | Package=<4> 28 | {{{ 29 | }}} 30 | 31 | ############################################################################### 32 | 33 | Global: 34 | 35 | Package=<5> 36 | {{{ 37 | }}} 38 | 39 | Package=<3> 40 | {{{ 41 | }}} 42 | 43 | ############################################################################### 44 | 45 | -------------------------------------------------------------------------------- /ResizableDialog/Demo.h: -------------------------------------------------------------------------------- 1 | // MControls.h : main header file for the MCONTROLS application 2 | // 3 | 4 | #if !defined(AFX_DEMO_H__21FE3CC7_979B_11D3_A80F_525400E146A5__INCLUDED_) 5 | #define AFX_DEMO_H__21FE3CC7_979B_11D3_A80F_525400E146A5__INCLUDED_ 6 | 7 | #if _MSC_VER > 1000 8 | #pragma once 9 | #endif // _MSC_VER > 1000 10 | 11 | #ifndef __AFXWIN_H__ 12 | #error include 'stdafx.h' before including this file for PCH 13 | #endif 14 | 15 | #include "resource.h" // main symbols 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // CDemoApp: 19 | // See MControls.cpp for the implementation of this class 20 | // 21 | 22 | class CDemoApp : public CWinApp 23 | { 24 | public: 25 | CDemoApp(); 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CDemoApp) 30 | public: 31 | virtual BOOL InitInstance(); 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | 36 | //{{AFX_MSG(CDemoApp) 37 | //}}AFX_MSG 38 | DECLARE_MESSAGE_MAP() 39 | }; 40 | 41 | 42 | ///////////////////////////////////////////////////////////////////////////// 43 | 44 | //{{AFX_INSERT_LOCATION}} 45 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 46 | 47 | #endif // !defined(AFX_DEMO_H__21FE3CC7_979B_11D3_A80F_525400E146A5__INCLUDED_) 48 | -------------------------------------------------------------------------------- /ResizableDialog/Demo.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {d0a9c0dc-bf15-4e5b-9a97-d199ddbc93ed} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {5202cbe4-0266-467b-bec1-4b0401f797ec} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {28779b85-36f3-4899-be80-51c34fbdedcd} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Source Files 37 | 38 | 39 | 40 | 41 | Header Files 42 | 43 | 44 | Header Files 45 | 46 | 47 | Header Files 48 | 49 | 50 | Header Files 51 | 52 | 53 | Header Files 54 | 55 | 56 | Header Files 57 | 58 | 59 | 60 | 61 | Resource Files 62 | 63 | 64 | Resource Files 65 | 66 | 67 | Resource Files 68 | 69 | 70 | 71 | 72 | Resource Files 73 | 74 | 75 | -------------------------------------------------------------------------------- /ResizableDialog/DemoDlg.h: -------------------------------------------------------------------------------- 1 | // DemoDlg.h : header file 2 | // 3 | 4 | #if !defined(AFX_DEMODLG_H__21FE3CC9_979B_11D3_A80F_525400E146A5__INCLUDED_) 5 | #define AFX_DEMODLG_H__21FE3CC9_979B_11D3_A80F_525400E146A5__INCLUDED_ 6 | 7 | #if _MSC_VER > 1000 8 | #pragma once 9 | #endif // _MSC_VER > 1000 10 | 11 | ///////////////////////////////////////////////////////////////////////////// 12 | // CDemoDlg dialog 13 | #include "ResizableDialog.h" 14 | 15 | class CDemoDlg : public CResizableDialog 16 | { 17 | // Construction 18 | public: 19 | CDemoDlg(CWnd* pParent = NULL); // standard constructor 20 | 21 | // Dialog Data 22 | //{{AFX_DATA(CDemoDlg) 23 | enum { IDD = IDD_DEMO_DIALOG }; 24 | // NOTE: the ClassWizard will add data members here 25 | //}}AFX_DATA 26 | 27 | // ClassWizard generated virtual function overrides 28 | //{{AFX_VIRTUAL(CDemoDlg) 29 | protected: 30 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 31 | //}}AFX_VIRTUAL 32 | 33 | // Implementation 34 | protected: 35 | // support for temporarily hiding the grip 36 | DWORD m_dwGripTempState; 37 | 38 | HICON m_hIcon; 39 | 40 | static BOOL CALLBACK SendThemeChangedProc(HWND hwnd, LPARAM lParam); 41 | static DWORD GetThemeProperties(); 42 | void SetThemeProperties(DWORD dwFlags); 43 | void UpdateMaxSize(); 44 | 45 | // Generated message map functions 46 | //{{AFX_MSG(CDemoDlg) 47 | virtual BOOL OnInitDialog(); 48 | afx_msg void OnRadio1(); 49 | afx_msg void OnRadio2(); 50 | afx_msg void OnRadio3(); 51 | afx_msg void OnRadio4(); 52 | afx_msg void OnRadio5(); 53 | afx_msg void OnClose(); 54 | afx_msg void OnCancel(); 55 | afx_msg void OnOk(); 56 | afx_msg void OnNcDestroy(); 57 | //}}AFX_MSG 58 | DECLARE_MESSAGE_MAP() 59 | }; 60 | 61 | //{{AFX_INSERT_LOCATION}} 62 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 63 | 64 | #endif // !defined(AFX_DEMODLG_H__21FE3CC9_979B_11D3_A80F_525400E146A5__INCLUDED_) 65 | -------------------------------------------------------------------------------- /ResizableDialog/SecondDialog.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_SECONDDIALOG_H__627E96C2_3D23_11D4_9C0C_A29A4CB0AA4A__INCLUDED_) 2 | #define AFX_SECONDDIALOG_H__627E96C2_3D23_11D4_9C0C_A29A4CB0AA4A__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // SecondDialog.h : header file 8 | // 9 | #include "ResizableDialog.h" 10 | 11 | ///////////////////////////////////////////////////////////////////////////// 12 | // CSecondDialog dialog 13 | 14 | class CSecondDialog : public CResizableDialog 15 | { 16 | // Construction 17 | public: 18 | CSecondDialog(CWnd* pParent = NULL); // standard constructor 19 | 20 | // Dialog Data 21 | //{{AFX_DATA(CSecondDialog) 22 | enum { IDD = IDD_SECOND_DIALOG }; 23 | // NOTE: the ClassWizard will add data members here 24 | //}}AFX_DATA 25 | 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CSecondDialog) 30 | protected: 31 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | protected: 36 | CToolBar m_wndToolBar; 37 | CBrush m_brushBack; 38 | 39 | // Generated message map functions 40 | //{{AFX_MSG(CSecondDialog) 41 | virtual BOOL OnInitDialog(); 42 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 43 | afx_msg void OnButton1(); 44 | afx_msg void OnButton2(); 45 | afx_msg void OnButton3(); 46 | afx_msg void OnButton4(); 47 | //}}AFX_MSG 48 | DECLARE_MESSAGE_MAP() 49 | public: 50 | afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); 51 | }; 52 | 53 | //{{AFX_INSERT_LOCATION}} 54 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 55 | 56 | #endif // !defined(AFX_SECONDDIALOG_H__627E96C2_3D23_11D4_9C0C_A29A4CB0AA4A__INCLUDED_) 57 | -------------------------------------------------------------------------------- /ResizableDialog/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // MControls.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ResizableDialog/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if !defined(AFX_STDAFX_H__21FE3CCB_979B_11D3_A80F_525400E146A5__INCLUDED_) 7 | #define AFX_STDAFX_H__21FE3CCB_979B_11D3_A80F_525400E146A5__INCLUDED_ 8 | 9 | #if _MSC_VER > 1000 10 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | #if defined _M_IX86 14 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 15 | #elif defined _M_IA64 16 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") 17 | #elif defined _M_X64 18 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 19 | #else 20 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 21 | #endif 22 | 23 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 24 | 25 | #include // MFC core and standard components 26 | #include // MFC extensions 27 | #ifndef _AFX_NO_AFXCMN_SUPPORT 28 | #include // MFC support for Windows Common Controls 29 | #endif // _AFX_NO_AFXCMN_SUPPORT 30 | 31 | //{{AFX_INSERT_LOCATION}} 32 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 33 | 34 | #endif // !defined(AFX_STDAFX_H__21FE3CCB_979B_11D3_A80F_525400E146A5__INCLUDED_) 35 | -------------------------------------------------------------------------------- /ResizableDialog/TestDialog.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_TESTDIALOG_H__094DC281_1962_4794_B482_15DEAA29829D__INCLUDED_) 2 | #define AFX_TESTDIALOG_H__094DC281_1962_4794_B482_15DEAA29829D__INCLUDED_ 3 | 4 | #include "ResizableDialog.h" 5 | 6 | #if _MSC_VER > 1000 7 | #pragma once 8 | #endif // _MSC_VER > 1000 9 | // TestDialog.h : header file 10 | // 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | // CTestDialog dialog 14 | 15 | class CTestDialog : public CResizableDialog 16 | { 17 | // Construction 18 | public: 19 | CTestDialog(CWnd* pParent = NULL); // standard constructor 20 | 21 | // Dialog Data 22 | //{{AFX_DATA(CTestDialog) 23 | enum { IDD = IDD_TEST_DIALOG }; 24 | CStatic m_ctrlTest; 25 | int m_nStaticType; 26 | BOOL m_bCenterImage; 27 | BOOL m_bEndEllipsis; 28 | BOOL m_bPathEllipsis; 29 | BOOL m_bRealSizeImage; 30 | BOOL m_bRightJust; 31 | CString m_sStaticText; 32 | //}}AFX_DATA 33 | 34 | // Overrides 35 | // ClassWizard generated virtual function overrides 36 | //{{AFX_VIRTUAL(CTestDialog) 37 | protected: 38 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 39 | //}}AFX_VIRTUAL 40 | 41 | // Implementation 42 | protected: 43 | 44 | // Generated message map functions 45 | //{{AFX_MSG(CTestDialog) 46 | afx_msg void OnButtonUpdate(); 47 | virtual BOOL OnInitDialog(); 48 | //}}AFX_MSG 49 | DECLARE_MESSAGE_MAP() 50 | }; 51 | 52 | //{{AFX_INSERT_LOCATION}} 53 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 54 | 55 | #endif // !defined(AFX_TESTDIALOG_H__094DC281_1962_4794_B482_15DEAA29829D__INCLUDED_) 56 | -------------------------------------------------------------------------------- /ResizableDialog/res/Demo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableDialog/res/Demo.ico -------------------------------------------------------------------------------- /ResizableDialog/res/Demo.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // DEMO.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /ResizableDialog/res/bitmap1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableDialog/res/bitmap1.bmp -------------------------------------------------------------------------------- /ResizableDialog/res/toolbar1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableDialog/res/toolbar1.bmp -------------------------------------------------------------------------------- /ResizableDialog/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Demo.rc 4 | // 5 | #define IDD_DEMO_DIALOG 102 6 | #define IDR_MAINFRAME 128 7 | #define IDD_SECOND_DIALOG 130 8 | #define IDB_BITMAP1 131 9 | #define IDR_TOOLBAR1 132 10 | #define IDD_TEST_DIALOG 134 11 | #define IDC_LABEL1 1000 12 | #define IDC_EDIT1 1001 13 | #define IDC_RADIO1 1002 14 | #define IDC_RADIO2 1003 15 | #define IDC_GROUP1 1004 16 | #define IDC_SPIN1 1005 17 | #define IDC_LINE1 1006 18 | #define IDC_GROUP2 1006 19 | #define IDC_PICTURE1 1007 20 | #define IDC_STATIC1 1010 21 | #define IDC_STATIC2 1011 22 | #define IDC_CHECK_CENTERIMAGE 1012 23 | #define IDC_CHECK_RIGHTJUST 1013 24 | #define IDC_CHECK_REALSIZEIMAGE 1014 25 | #define IDC_CHECK_ENDELLIPSIS 1015 26 | #define IDC_CHECK_PATHELLIPSIS 1016 27 | #define IDC_COMBO_TYPE 1017 28 | #define IDC_BUTTON_UPDATE 1018 29 | #define IDC_EDIT_TEXT 1019 30 | #define IDC_STATIC_TEST 1020 31 | #define IDC_GROUPBOX 1021 32 | #define IDC_RADIO3 1022 33 | #define IDC_RADIO4 1023 34 | #define IDC_RADIO5 1024 35 | #define ID_BUTTON1 32776 36 | #define ID_BUTTON3 32777 37 | #define ID_BUTTON2 32778 38 | #define ID_BUTTON4 32779 39 | 40 | // Next default values for new objects 41 | // 42 | #ifdef APSTUDIO_INVOKED 43 | #ifndef APSTUDIO_READONLY_SYMBOLS 44 | #define _APS_NEXT_RESOURCE_VALUE 136 45 | #define _APS_NEXT_COMMAND_VALUE 32780 46 | #define _APS_NEXT_CONTROL_VALUE 1025 47 | #define _APS_NEXT_SYMED_VALUE 101 48 | #endif 49 | #endif 50 | -------------------------------------------------------------------------------- /ResizableDialogEx/Demo.h: -------------------------------------------------------------------------------- 1 | 2 | // Demo.h : main header file for the PROJECT_NAME application 3 | // 4 | 5 | #pragma once 6 | 7 | #ifndef __AFXWIN_H__ 8 | #error "include 'pch.h' before including this file for PCH" 9 | #endif 10 | 11 | #include "resource.h" // main symbols 12 | 13 | 14 | // CDemoApp: 15 | // See Demo.cpp for the implementation of this class 16 | // 17 | 18 | class CDemoApp : public CWinApp 19 | { 20 | public: 21 | CDemoApp(); 22 | 23 | // Overrides 24 | public: 25 | virtual BOOL InitInstance(); 26 | 27 | // Implementation 28 | 29 | DECLARE_MESSAGE_MAP() 30 | }; 31 | 32 | extern CDemoApp theApp; 33 | -------------------------------------------------------------------------------- /ResizableDialogEx/Demo.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableDialogEx/Demo.rc -------------------------------------------------------------------------------- /ResizableDialogEx/Demo.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | Header Files 35 | 36 | 37 | 38 | 39 | Source Files 40 | 41 | 42 | Source Files 43 | 44 | 45 | Source Files 46 | 47 | 48 | 49 | 50 | Resource Files 51 | 52 | 53 | 54 | 55 | Resource Files 56 | 57 | 58 | 59 | 60 | Resource Files 61 | 62 | 63 | Resource Files 64 | 65 | 66 | -------------------------------------------------------------------------------- /ResizableDialogEx/DemoDlg.h: -------------------------------------------------------------------------------- 1 | 2 | // DemoDlg.h : header file 3 | // 4 | 5 | #pragma once 6 | 7 | #include "ResizableDialogEx.h" 8 | 9 | // CDemoDlg dialog 10 | class CDemoDlg : public CResizableDialogEx 11 | { 12 | // Construction 13 | public: 14 | CDemoDlg(CWnd* pParent = nullptr); // standard constructor 15 | 16 | // Dialog Data 17 | #ifdef AFX_DESIGN_TIME 18 | enum { IDD = IDD_DEMO_DIALOG }; 19 | #endif 20 | 21 | protected: 22 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 23 | 24 | 25 | // Implementation 26 | protected: 27 | HICON m_hIcon; 28 | 29 | // support for temporarily hiding the grip 30 | DWORD m_dwGripTempState; 31 | 32 | static BOOL CALLBACK SendThemeChangedProc(HWND hwnd, LPARAM lParam); 33 | static DWORD GetThemeProperties(); 34 | void SetThemeProperties(DWORD dwFlags); 35 | void UpdateMaxSize(); 36 | 37 | static LRESULT WINAPI EditSubclassProc( 38 | HWND hWnd, 39 | UINT uMsg, 40 | WPARAM wParam, 41 | LPARAM lParam, 42 | UINT_PTR uIdSubclass, 43 | DWORD_PTR dwRefData 44 | ); 45 | 46 | // Generated message map functions 47 | virtual BOOL OnInitDialog(); 48 | afx_msg void OnRadio1(); 49 | afx_msg void OnRadio2(); 50 | afx_msg void OnRadio3(); 51 | afx_msg void OnRadio4(); 52 | afx_msg void OnRadio5(); 53 | afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 54 | DECLARE_MESSAGE_MAP() 55 | }; 56 | -------------------------------------------------------------------------------- /ResizableDialogEx/framework.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef VC_EXTRALEAN 4 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 5 | #endif 6 | 7 | #include "targetver.h" 8 | 9 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit 10 | 11 | // turns off MFC's hiding of some common and often safely ignored warning messages 12 | #define _AFX_ALL_WARNINGS 13 | 14 | #include // MFC core and standard components 15 | #include // MFC extensions 16 | 17 | 18 | 19 | 20 | 21 | #ifndef _AFX_NO_OLE_SUPPORT 22 | #include // MFC support for Internet Explorer 4 Common Controls 23 | #endif 24 | #ifndef _AFX_NO_AFXCMN_SUPPORT 25 | #include // MFC support for Windows Common Controls 26 | #endif // _AFX_NO_AFXCMN_SUPPORT 27 | 28 | #include // MFC support for ribbons and control bars 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | //#ifdef _UNICODE 39 | #if defined _M_IX86 40 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 41 | #elif defined _M_X64 42 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 43 | #else 44 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 45 | #endif 46 | //#endif 47 | 48 | 49 | -------------------------------------------------------------------------------- /ResizableDialogEx/pch.cpp: -------------------------------------------------------------------------------- 1 | // pch.cpp: source file corresponding to the pre-compiled header 2 | 3 | #include "pch.h" 4 | 5 | // When you are using pre-compiled headers, this source file is necessary for compilation to succeed. 6 | -------------------------------------------------------------------------------- /ResizableDialogEx/pch.h: -------------------------------------------------------------------------------- 1 | // pch.h: This is a precompiled header file. 2 | // Files listed below are compiled only once, improving build performance for future builds. 3 | // This also affects IntelliSense performance, including code completion and many code browsing features. 4 | // However, files listed here are ALL re-compiled if any one of them is updated between builds. 5 | // Do not add files here that you will be updating frequently as this negates the performance advantage. 6 | 7 | #ifndef PCH_H 8 | #define PCH_H 9 | 10 | // add headers that you want to pre-compile here 11 | #include "framework.h" 12 | 13 | #endif //PCH_H 14 | -------------------------------------------------------------------------------- /ResizableDialogEx/res/Demo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableDialogEx/res/Demo.ico -------------------------------------------------------------------------------- /ResizableDialogEx/res/Demo.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableDialogEx/res/Demo.rc2 -------------------------------------------------------------------------------- /ResizableDialogEx/res/tile.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableDialogEx/res/tile.bmp -------------------------------------------------------------------------------- /ResizableDialogEx/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Demo.rc 4 | // 5 | #define IDM_ABOUTBOX 0x0010 6 | #define IDD_ABOUTBOX 100 7 | #define IDS_ABOUTBOX 101 8 | #define IDD_DEMO_DIALOG 102 9 | #define IDR_MAINFRAME 128 10 | #define IDB_BITMAP1 129 11 | #define IDC_LABEL1 1000 12 | #define IDC_EDIT1 1001 13 | #define IDC_RADIO1 1002 14 | #define IDC_RADIO2 1003 15 | #define IDC_GROUP1 1004 16 | #define IDC_SPIN1 1005 17 | #define IDC_GROUP2 1006 18 | #define IDC_RADIO3 1007 19 | #define IDC_RADIO4 1008 20 | #define IDC_RADIO5 1009 21 | 22 | // Next default values for new objects 23 | // 24 | #ifdef APSTUDIO_INVOKED 25 | #ifndef APSTUDIO_READONLY_SYMBOLS 26 | #define _APS_NEXT_RESOURCE_VALUE 130 27 | #define _APS_NEXT_COMMAND_VALUE 32771 28 | #define _APS_NEXT_CONTROL_VALUE 1025 29 | #define _APS_NEXT_SYMED_VALUE 101 30 | #endif 31 | #endif 32 | -------------------------------------------------------------------------------- /ResizableDialogEx/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/ChildFrm.cpp: -------------------------------------------------------------------------------- 1 | // ChildFrm.cpp : implementation of the CChildFrame class 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "Demo.h" 6 | 7 | #include "ChildFrm.h" 8 | 9 | #ifdef _DEBUG 10 | #define new DEBUG_NEW 11 | #undef THIS_FILE 12 | static char THIS_FILE[] = __FILE__; 13 | #endif 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // CChildFrame 17 | 18 | IMPLEMENT_DYNCREATE(CChildFrame, CResizableMDIChild) 19 | 20 | BEGIN_MESSAGE_MAP(CChildFrame, CResizableMDIChild) 21 | //{{AFX_MSG_MAP(CChildFrame) 22 | //}}AFX_MSG_MAP 23 | END_MESSAGE_MAP() 24 | 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // CChildFrame construction/destruction 27 | 28 | CChildFrame::CChildFrame() 29 | { 30 | } 31 | 32 | CChildFrame::~CChildFrame() 33 | { 34 | } 35 | 36 | BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs) 37 | { 38 | if( !CResizableMDIChild::PreCreateWindow(cs) ) 39 | return FALSE; 40 | 41 | return TRUE; 42 | } 43 | 44 | 45 | 46 | ///////////////////////////////////////////////////////////////////////////// 47 | // CChildFrame diagnostics 48 | 49 | #ifdef _DEBUG 50 | void CChildFrame::AssertValid() const 51 | { 52 | CResizableMDIChild::AssertValid(); 53 | } 54 | 55 | void CChildFrame::Dump(CDumpContext& dc) const 56 | { 57 | CResizableMDIChild::Dump(dc); 58 | } 59 | 60 | #endif //_DEBUG 61 | 62 | ///////////////////////////////////////////////////////////////////////////// 63 | // CChildFrame message handlers 64 | 65 | void CChildFrame::ActivateFrame(int nCmdShow) 66 | { 67 | if ( EnableSaveRestore(_T("Demo MDI Frame")) ) 68 | { 69 | // if correctly restored, activate window and return 70 | MDIActivate(); 71 | return; 72 | } 73 | 74 | CResizableMDIChild::ActivateFrame(nCmdShow); 75 | } 76 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/ChildFrm.h: -------------------------------------------------------------------------------- 1 | // ChildFrm.h : interface of the CChildFrame class 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_CHILDFRM_H__979888BD_FD55_4384_A5BE_44E267193FEE__INCLUDED_) 6 | #define AFX_CHILDFRM_H__979888BD_FD55_4384_A5BE_44E267193FEE__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | #include "ResizableMDIChild.h" 13 | 14 | class CChildFrame : public CResizableMDIChild 15 | { 16 | DECLARE_DYNCREATE(CChildFrame) 17 | public: 18 | CChildFrame(); 19 | 20 | // Attributes 21 | public: 22 | 23 | // Operations 24 | public: 25 | 26 | // Overrides 27 | // ClassWizard generated virtual function overrides 28 | //{{AFX_VIRTUAL(CChildFrame) 29 | public: 30 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 31 | virtual void ActivateFrame(int nCmdShow = -1); 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | public: 36 | virtual ~CChildFrame(); 37 | #ifdef _DEBUG 38 | virtual void AssertValid() const; 39 | virtual void Dump(CDumpContext& dc) const; 40 | #endif 41 | 42 | // Generated message map functions 43 | protected: 44 | //{{AFX_MSG(CChildFrame) 45 | //}}AFX_MSG 46 | DECLARE_MESSAGE_MAP() 47 | }; 48 | 49 | ///////////////////////////////////////////////////////////////////////////// 50 | 51 | //{{AFX_INSERT_LOCATION}} 52 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 53 | 54 | #endif // !defined(AFX_CHILDFRM_H__979888BD_FD55_4384_A5BE_44E267193FEE__INCLUDED_) 55 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/ChildMixedFrame.cpp: -------------------------------------------------------------------------------- 1 | // ChildMixedFrame.cpp : implementation file 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "demo.h" 6 | #include "ChildMixedFrame.h" 7 | #include "DemoDoc.h" 8 | #include "DemoView.h" 9 | #include "PropertyFormView.h" 10 | 11 | #ifdef _DEBUG 12 | #define new DEBUG_NEW 13 | #undef THIS_FILE 14 | static char THIS_FILE[] = __FILE__; 15 | #endif 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // CChildMixedFrame 19 | 20 | IMPLEMENT_DYNCREATE(CChildMixedFrame, CResizableMDIChild) 21 | 22 | CChildMixedFrame::CChildMixedFrame() 23 | { 24 | } 25 | 26 | CChildMixedFrame::~CChildMixedFrame() 27 | { 28 | } 29 | 30 | 31 | BEGIN_MESSAGE_MAP(CChildMixedFrame, CResizableMDIChild) 32 | //{{AFX_MSG_MAP(CChildMixedFrame) 33 | // NOTE - the ClassWizard will add and remove mapping macros here. 34 | //}}AFX_MSG_MAP 35 | END_MESSAGE_MAP() 36 | 37 | ///////////////////////////////////////////////////////////////////////////// 38 | // CChildMixedFrame message handlers 39 | 40 | BOOL CChildMixedFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext) 41 | { 42 | // CG: The following block was added by the Splitter Bar component. 43 | { 44 | if (!m_wndSplitter.CreateStatic(this, 1, 2)) 45 | { 46 | TRACE0("Failed to create splitter bar "); 47 | return FALSE; // failed to create 48 | } 49 | if (!m_wndSplitter.CreateView(0, 0, 50 | RUNTIME_CLASS(CEditView), CSize(0,100), pContext)) 51 | { 52 | TRACE0("Failed to create splitter's first pane "); 53 | return FALSE; // failed to create 54 | } 55 | if (!m_wndSplitter.CreateView(0, 1, 56 | RUNTIME_CLASS(CPropertyFormView), CSize(0,0), pContext)) 57 | { 58 | TRACE0("Failed to create splitter's second pane "); 59 | return FALSE; // failed to create 60 | } 61 | 62 | m_wndSplitter.SetColumnInfo(0, 100, 30); 63 | m_wndSplitter.SetColumnInfo(1, 100, 30); 64 | 65 | return TRUE; 66 | } 67 | } 68 | 69 | void CChildMixedFrame::ActivateFrame(int nCmdShow) 70 | { 71 | if ( EnableSaveRestore(_T("Demo MDI MixedFrame")) ) 72 | { 73 | // if correctly restored, activate window and return 74 | MDIActivate(); 75 | return; 76 | } 77 | 78 | CResizableMDIChild::ActivateFrame(nCmdShow); 79 | } 80 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/ChildMixedFrame.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_CHILDMIXEDFRAME_H__05BBB9E7_433A_412B_80FC_FF81188E5D8D__INCLUDED_) 2 | #define AFX_CHILDMIXEDFRAME_H__05BBB9E7_433A_412B_80FC_FF81188E5D8D__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // ChildMixedFrame.h : header file 8 | // 9 | 10 | #include "ResizableMDIChild.h" 11 | #include "ResizableSplitterWnd.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | // CChildMixedFrame frame 15 | 16 | class CChildMixedFrame : public CResizableMDIChild 17 | { 18 | DECLARE_DYNCREATE(CChildMixedFrame) 19 | protected: 20 | CChildMixedFrame(); // protected constructor used by dynamic creation 21 | 22 | // Attributes 23 | public: 24 | 25 | // Operations 26 | public: 27 | 28 | // Overrides 29 | // ClassWizard generated virtual function overrides 30 | //{{AFX_VIRTUAL(CChildMixedFrame) 31 | public: 32 | virtual void ActivateFrame(int nCmdShow = -1); 33 | //}}AFX_VIRTUAL 34 | 35 | // Implementation 36 | protected: 37 | CResizableSplitterWnd m_wndSplitter; 38 | virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); 39 | virtual ~CChildMixedFrame(); 40 | 41 | // Generated message map functions 42 | //{{AFX_MSG(CChildMixedFrame) 43 | // NOTE - the ClassWizard will add and remove member functions here. 44 | //}}AFX_MSG 45 | DECLARE_MESSAGE_MAP() 46 | }; 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | 50 | //{{AFX_INSERT_LOCATION}} 51 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 52 | 53 | #endif // !defined(AFX_CHILDMIXEDFRAME_H__05BBB9E7_433A_412B_80FC_FF81188E5D8D__INCLUDED_) 54 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/ChildSplitFrame.cpp: -------------------------------------------------------------------------------- 1 | // ChildSplitFrame.cpp : implementation file 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "demo.h" 6 | #include "ChildSplitFrame.h" 7 | 8 | #ifdef _DEBUG 9 | #define new DEBUG_NEW 10 | #undef THIS_FILE 11 | static char THIS_FILE[] = __FILE__; 12 | #endif 13 | 14 | ///////////////////////////////////////////////////////////////////////////// 15 | // CChildSplitFrame 16 | 17 | IMPLEMENT_DYNCREATE(CChildSplitFrame, CResizableMDIChild) 18 | 19 | CChildSplitFrame::CChildSplitFrame() 20 | { 21 | } 22 | 23 | CChildSplitFrame::~CChildSplitFrame() 24 | { 25 | } 26 | 27 | 28 | BEGIN_MESSAGE_MAP(CChildSplitFrame, CResizableMDIChild) 29 | //{{AFX_MSG_MAP(CChildSplitFrame) 30 | // NOTE - the ClassWizard will add and remove mapping macros here. 31 | //}}AFX_MSG_MAP 32 | END_MESSAGE_MAP() 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | // CChildSplitFrame message handlers 36 | 37 | BOOL CChildSplitFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext) 38 | { 39 | // CG: The following block was added by the Splitter Bar component. 40 | { 41 | if (!m_wndSplitter.Create(this, 42 | 2, 2, // TODO: adjust the number of rows, columns 43 | CSize(10, 10), // TODO: adjust the minimum pane size 44 | pContext)) 45 | { 46 | TRACE0("Failed to create splitter bar "); 47 | return FALSE; // failed to create 48 | } 49 | 50 | return TRUE; 51 | } 52 | } 53 | 54 | void CChildSplitFrame::ActivateFrame(int nCmdShow) 55 | { 56 | if ( EnableSaveRestore(_T("Demo MDI SplitFrame")) ) 57 | { 58 | // if correctly restored, activate window and return 59 | MDIActivate(); 60 | return; 61 | } 62 | 63 | CResizableMDIChild::ActivateFrame(nCmdShow); 64 | } 65 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/ChildSplitFrame.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_CHILDSPLITFRAME_H__81BE110F_51B4_4BA7_A681_A0683177BDA6__INCLUDED_) 2 | #define AFX_CHILDSPLITFRAME_H__81BE110F_51B4_4BA7_A681_A0683177BDA6__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // ChildSplitFrame.h : header file 8 | // 9 | 10 | #include "ResizableMDIChild.h" 11 | #include "ResizableSplitterWnd.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | // CChildSplitFrame frame 15 | 16 | class CChildSplitFrame : public CResizableMDIChild 17 | { 18 | DECLARE_DYNCREATE(CChildSplitFrame) 19 | protected: 20 | CChildSplitFrame(); // protected constructor used by dynamic creation 21 | 22 | // Attributes 23 | public: 24 | 25 | // Operations 26 | public: 27 | 28 | // Overrides 29 | // ClassWizard generated virtual function overrides 30 | //{{AFX_VIRTUAL(CChildSplitFrame) 31 | public: 32 | virtual void ActivateFrame(int nCmdShow = -1); 33 | //}}AFX_VIRTUAL 34 | 35 | // Implementation 36 | protected: 37 | CResizableSplitterWnd m_wndSplitter; 38 | virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); 39 | virtual ~CChildSplitFrame(); 40 | 41 | // Generated message map functions 42 | //{{AFX_MSG(CChildSplitFrame) 43 | // NOTE - the ClassWizard will add and remove member functions here. 44 | //}}AFX_MSG 45 | DECLARE_MESSAGE_MAP() 46 | }; 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | 50 | //{{AFX_INSERT_LOCATION}} 51 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 52 | 53 | #endif // !defined(AFX_CHILDSPLITFRAME_H__81BE110F_51B4_4BA7_A681_A0683177BDA6__INCLUDED_) 54 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/Demo.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "Demo"=.\Demo.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | Begin Project Dependency 15 | Project_Dep_Name ResizableLib 16 | End Project Dependency 17 | }}} 18 | 19 | ############################################################################### 20 | 21 | Project: "ResizableLib"=..\ResizableLib\ResizableLib.dsp - Package Owner=<4> 22 | 23 | Package=<5> 24 | {{{ 25 | }}} 26 | 27 | Package=<4> 28 | {{{ 29 | }}} 30 | 31 | ############################################################################### 32 | 33 | Global: 34 | 35 | Package=<5> 36 | {{{ 37 | }}} 38 | 39 | Package=<3> 40 | {{{ 41 | }}} 42 | 43 | ############################################################################### 44 | 45 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/Demo.h: -------------------------------------------------------------------------------- 1 | // Demo.h : main header file for the DEMO application 2 | // 3 | 4 | #if !defined(AFX_DEMO_H__1B23FB25_30B5_451F_B9C1_73B80005D2E7__INCLUDED_) 5 | #define AFX_DEMO_H__1B23FB25_30B5_451F_B9C1_73B80005D2E7__INCLUDED_ 6 | 7 | #if _MSC_VER > 1000 8 | #pragma once 9 | #endif // _MSC_VER > 1000 10 | 11 | #ifndef __AFXWIN_H__ 12 | #error include 'stdafx.h' before including this file for PCH 13 | #endif 14 | 15 | #include "resource.h" // main symbols 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // CDemoApp: 19 | // See Demo.cpp for the implementation of this class 20 | // 21 | 22 | class CDemoApp : public CWinApp 23 | { 24 | public: 25 | CDemoApp(); 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CDemoApp) 30 | public: 31 | virtual BOOL InitInstance(); 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | //{{AFX_MSG(CDemoApp) 36 | afx_msg void OnAppAbout(); 37 | //}}AFX_MSG 38 | DECLARE_MESSAGE_MAP() 39 | }; 40 | 41 | 42 | ///////////////////////////////////////////////////////////////////////////// 43 | 44 | //{{AFX_INSERT_LOCATION}} 45 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 46 | 47 | #endif // !defined(AFX_DEMO_H__1B23FB25_30B5_451F_B9C1_73B80005D2E7__INCLUDED_) 48 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/DemoDoc.cpp: -------------------------------------------------------------------------------- 1 | // DemoDoc.cpp : implementation of the CDemoDoc class 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "Demo.h" 6 | 7 | #include "DemoDoc.h" 8 | 9 | #ifdef _DEBUG 10 | #define new DEBUG_NEW 11 | #undef THIS_FILE 12 | static char THIS_FILE[] = __FILE__; 13 | #endif 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // CDemoDoc 17 | 18 | IMPLEMENT_DYNCREATE(CDemoDoc, CDocument) 19 | 20 | BEGIN_MESSAGE_MAP(CDemoDoc, CDocument) 21 | //{{AFX_MSG_MAP(CDemoDoc) 22 | //}}AFX_MSG_MAP 23 | END_MESSAGE_MAP() 24 | 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // CDemoDoc construction/destruction 27 | 28 | CDemoDoc::CDemoDoc() 29 | { 30 | } 31 | 32 | CDemoDoc::~CDemoDoc() 33 | { 34 | } 35 | 36 | BOOL CDemoDoc::OnNewDocument() 37 | { 38 | if (!CDocument::OnNewDocument()) 39 | return FALSE; 40 | 41 | return TRUE; 42 | } 43 | 44 | 45 | 46 | ///////////////////////////////////////////////////////////////////////////// 47 | // CDemoDoc serialization 48 | 49 | void CDemoDoc::Serialize(CArchive& ar) 50 | { 51 | if (ar.IsStoring()) 52 | { 53 | } 54 | else 55 | { 56 | } 57 | } 58 | 59 | ///////////////////////////////////////////////////////////////////////////// 60 | // CDemoDoc diagnostics 61 | 62 | #ifdef _DEBUG 63 | void CDemoDoc::AssertValid() const 64 | { 65 | CDocument::AssertValid(); 66 | } 67 | 68 | void CDemoDoc::Dump(CDumpContext& dc) const 69 | { 70 | CDocument::Dump(dc); 71 | } 72 | #endif //_DEBUG 73 | 74 | ///////////////////////////////////////////////////////////////////////////// 75 | // CDemoDoc commands 76 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/DemoDoc.h: -------------------------------------------------------------------------------- 1 | // DemoDoc.h : interface of the CDemoDoc class 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_DEMODOC_H__09F23B29_9993_4768_8346_C6F22F3D630B__INCLUDED_) 6 | #define AFX_DEMODOC_H__09F23B29_9993_4768_8346_C6F22F3D630B__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | 13 | class CDemoDoc : public CDocument 14 | { 15 | protected: // create from serialization only 16 | CDemoDoc(); 17 | DECLARE_DYNCREATE(CDemoDoc) 18 | 19 | // Attributes 20 | public: 21 | 22 | // Operations 23 | public: 24 | 25 | // Overrides 26 | // ClassWizard generated virtual function overrides 27 | //{{AFX_VIRTUAL(CDemoDoc) 28 | public: 29 | virtual BOOL OnNewDocument(); 30 | virtual void Serialize(CArchive& ar); 31 | //}}AFX_VIRTUAL 32 | 33 | // Implementation 34 | public: 35 | virtual ~CDemoDoc(); 36 | #ifdef _DEBUG 37 | virtual void AssertValid() const; 38 | virtual void Dump(CDumpContext& dc) const; 39 | #endif 40 | 41 | protected: 42 | 43 | // Generated message map functions 44 | protected: 45 | //{{AFX_MSG(CDemoDoc) 46 | //}}AFX_MSG 47 | DECLARE_MESSAGE_MAP() 48 | }; 49 | 50 | ///////////////////////////////////////////////////////////////////////////// 51 | 52 | //{{AFX_INSERT_LOCATION}} 53 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 54 | 55 | #endif // !defined(AFX_DEMODOC_H__09F23B29_9993_4768_8346_C6F22F3D630B__INCLUDED_) 56 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/DemoView.h: -------------------------------------------------------------------------------- 1 | // DemoView.h : interface of the CDemoView class 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_DEMOVIEW_H__3D2A41E4_C897_4064_AD75_DC3F1B237D00__INCLUDED_) 6 | #define AFX_DEMOVIEW_H__3D2A41E4_C897_4064_AD75_DC3F1B237D00__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | #include "ResizableFormView.h" 13 | 14 | class CDemoView : public CResizableFormView 15 | { 16 | protected: // create from serialization only 17 | CDemoView(); 18 | DECLARE_DYNCREATE(CDemoView) 19 | 20 | public: 21 | //{{AFX_DATA(CDemoView) 22 | enum { IDD = IDD_DEMO_FORM }; 23 | CStatic m_icon1; 24 | //}}AFX_DATA 25 | 26 | // Attributes 27 | public: 28 | CDemoDoc* GetDocument(); 29 | 30 | // Operations 31 | public: 32 | 33 | // Overrides 34 | // ClassWizard generated virtual function overrides 35 | //{{AFX_VIRTUAL(CDemoView) 36 | public: 37 | protected: 38 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 39 | virtual void OnInitialUpdate(); // called first time after construct 40 | //}}AFX_VIRTUAL 41 | 42 | // Implementation 43 | public: 44 | void DialogToFormView(); 45 | void FormViewToDialog(); 46 | 47 | virtual ~CDemoView(); 48 | #ifdef _DEBUG 49 | virtual void AssertValid() const; 50 | virtual void Dump(CDumpContext& dc) const; 51 | #endif 52 | 53 | // Generated message map functions 54 | protected: 55 | //{{AFX_MSG(CDemoView) 56 | afx_msg void OnButton2(); 57 | afx_msg void OnButton1(); 58 | afx_msg void OnRadio2(); 59 | afx_msg void OnRadio1(); 60 | virtual BOOL OnInitDialog(); 61 | afx_msg void OnRadio3(); 62 | //}}AFX_MSG 63 | DECLARE_MESSAGE_MAP() 64 | }; 65 | 66 | #ifndef _DEBUG // debug version in DemoView.cpp 67 | inline CDemoDoc* CDemoView::GetDocument() 68 | { return (CDemoDoc*)m_pDocument; } 69 | #endif 70 | 71 | ///////////////////////////////////////////////////////////////////////////// 72 | 73 | //{{AFX_INSERT_LOCATION}} 74 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 75 | 76 | #endif // !defined(AFX_DEMOVIEW_H__3D2A41E4_C897_4064_AD75_DC3F1B237D00__INCLUDED_) 77 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/MainFrm.cpp: -------------------------------------------------------------------------------- 1 | // MainFrm.cpp : implementation of the CMainFrame class 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "Demo.h" 6 | 7 | #include "MainFrm.h" 8 | 9 | #ifdef _DEBUG 10 | #define new DEBUG_NEW 11 | #undef THIS_FILE 12 | static char THIS_FILE[] = __FILE__; 13 | #endif 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // CMainFrame 17 | 18 | IMPLEMENT_DYNAMIC(CMainFrame, CResizableMDIFrame) 19 | 20 | BEGIN_MESSAGE_MAP(CMainFrame, CResizableMDIFrame) 21 | //{{AFX_MSG_MAP(CMainFrame) 22 | ON_WM_CREATE() 23 | //}}AFX_MSG_MAP 24 | END_MESSAGE_MAP() 25 | 26 | static UINT indicators[] = 27 | { 28 | ID_SEPARATOR, // status line indicator 29 | ID_INDICATOR_CAPS, 30 | ID_INDICATOR_NUM, 31 | ID_INDICATOR_SCRL, 32 | }; 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | // CMainFrame construction/destruction 36 | 37 | CMainFrame::CMainFrame() 38 | { 39 | } 40 | 41 | CMainFrame::~CMainFrame() 42 | { 43 | } 44 | 45 | int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) 46 | { 47 | if (CResizableMDIFrame::OnCreate(lpCreateStruct) == -1) 48 | return -1; 49 | 50 | if (!m_wndStatusBar.Create(this) || 51 | !m_wndStatusBar.SetIndicators(indicators, 52 | sizeof(indicators)/sizeof(UINT))) 53 | { 54 | TRACE0("Failed to create status bar\n"); 55 | return -1; // fail to create 56 | } 57 | 58 | return 0; 59 | } 60 | 61 | BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) 62 | { 63 | if( !CResizableMDIFrame::PreCreateWindow(cs) ) 64 | return FALSE; 65 | return TRUE; 66 | } 67 | 68 | ///////////////////////////////////////////////////////////////////////////// 69 | // CMainFrame diagnostics 70 | 71 | #ifdef _DEBUG 72 | void CMainFrame::AssertValid() const 73 | { 74 | CResizableMDIFrame::AssertValid(); 75 | } 76 | 77 | void CMainFrame::Dump(CDumpContext& dc) const 78 | { 79 | CResizableMDIFrame::Dump(dc); 80 | } 81 | 82 | #endif //_DEBUG 83 | 84 | ///////////////////////////////////////////////////////////////////////////// 85 | // CMainFrame message handlers 86 | 87 | 88 | void CMainFrame::ActivateFrame(int nCmdShow) 89 | { 90 | if ( EnableSaveRestore(_T("Demo MDI MainFrame")) ) 91 | { 92 | // if correctly restored, activate window and return 93 | SetActiveWindow(); 94 | return; 95 | } 96 | 97 | CResizableMDIFrame::ActivateFrame(nCmdShow); 98 | } 99 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/MainFrm.h: -------------------------------------------------------------------------------- 1 | // MainFrm.h : interface of the CMainFrame class 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_MAINFRM_H__BFFBC8E2_FDE4_4F98_B05C_9EE97F7A4594__INCLUDED_) 6 | #define AFX_MAINFRM_H__BFFBC8E2_FDE4_4F98_B05C_9EE97F7A4594__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | #include "ResizableMDIFrame.h" 13 | 14 | class CMainFrame : public CResizableMDIFrame 15 | { 16 | DECLARE_DYNAMIC(CMainFrame) 17 | public: 18 | CMainFrame(); 19 | 20 | // Attributes 21 | public: 22 | 23 | // Operations 24 | public: 25 | 26 | // Overrides 27 | // ClassWizard generated virtual function overrides 28 | //{{AFX_VIRTUAL(CMainFrame) 29 | public: 30 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 31 | virtual void ActivateFrame(int nCmdShow = -1); 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | public: 36 | virtual ~CMainFrame(); 37 | #ifdef _DEBUG 38 | virtual void AssertValid() const; 39 | virtual void Dump(CDumpContext& dc) const; 40 | #endif 41 | 42 | protected: // control bar embedded members 43 | CStatusBar m_wndStatusBar; 44 | 45 | // Generated message map functions 46 | protected: 47 | //{{AFX_MSG(CMainFrame) 48 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 49 | //}}AFX_MSG 50 | DECLARE_MESSAGE_MAP() 51 | }; 52 | 53 | ///////////////////////////////////////////////////////////////////////////// 54 | 55 | //{{AFX_INSERT_LOCATION}} 56 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 57 | 58 | #endif // !defined(AFX_MAINFRM_H__BFFBC8E2_FDE4_4F98_B05C_9EE97F7A4594__INCLUDED_) 59 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/MyPropertySheet.cpp: -------------------------------------------------------------------------------- 1 | // MyPropertySheet.cpp : implementation file 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "resource.h" 6 | #include "MyPropertySheet.h" 7 | 8 | #ifdef _DEBUG 9 | #undef THIS_FILE 10 | static char BASED_CODE THIS_FILE[] = __FILE__; 11 | #endif 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | // CMyPropertySheet 15 | 16 | IMPLEMENT_DYNAMIC(CMyPropertySheet, CResizableSheetEx) 17 | 18 | CMyPropertySheet::CMyPropertySheet(CWnd* pWndParent) 19 | : CResizableSheetEx(_T("CResizableSheetEx"), pWndParent) 20 | { 21 | AddPage(&m_Page1); 22 | AddPage(&m_Page2); 23 | AddPage(&m_Page3); 24 | } 25 | 26 | CMyPropertySheet::~CMyPropertySheet() 27 | { 28 | } 29 | 30 | 31 | BEGIN_MESSAGE_MAP(CMyPropertySheet, CResizableSheetEx) 32 | //{{AFX_MSG_MAP(CMyPropertySheet) 33 | //}}AFX_MSG_MAP 34 | END_MESSAGE_MAP() 35 | 36 | 37 | ///////////////////////////////////////////////////////////////////////////// 38 | // CMyPropertySheet message handlers 39 | 40 | BOOL CMyPropertySheet::OnInitDialog() 41 | { 42 | // prevent removal of buttons (hack) 43 | BOOL bOldState = m_bModeless; 44 | m_bModeless = FALSE; 45 | // recover first active page (lost with hack) 46 | m_nFlags |= WF_CONTINUEMODAL; 47 | 48 | CResizableSheetEx::OnInitDialog(); 49 | 50 | m_nFlags &= ~WF_CONTINUEMODAL; 51 | m_bModeless = bOldState; 52 | 53 | return TRUE; 54 | } 55 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/MyPropertySheet.h: -------------------------------------------------------------------------------- 1 | // MyPropertySheet.h : header file 2 | // 3 | // This class defines custom modal property sheet 4 | // CMyPropertySheet. 5 | 6 | #ifndef __MYPROPERTYSHEET_H__ 7 | #define __MYPROPERTYSHEET_H__ 8 | 9 | #include "MyPropertyPages.h" 10 | 11 | ///////////////////////////////////////////////////////////////////////////// 12 | // CMyPropertySheet 13 | 14 | #include "ResizableSheetEx.h" 15 | 16 | class CMyPropertySheet : public CResizableSheetEx 17 | { 18 | DECLARE_DYNAMIC(CMyPropertySheet) 19 | 20 | // Construction 21 | public: 22 | CMyPropertySheet(CWnd* pWndParent = NULL); 23 | 24 | // Attributes 25 | public: 26 | CMyPropertyPage1 m_Page1; 27 | CMyPropertyPage2 m_Page2; 28 | CMyPropertyPage3 m_Page3; 29 | 30 | // Operations 31 | public: 32 | 33 | // Overrides 34 | // ClassWizard generated virtual function overrides 35 | //{{AFX_VIRTUAL(CMyPropertySheet) 36 | //}}AFX_VIRTUAL 37 | 38 | // Implementation 39 | public: 40 | virtual ~CMyPropertySheet(); 41 | 42 | // Generated message map functions 43 | protected: 44 | //{{AFX_MSG(CMyPropertySheet) 45 | virtual BOOL OnInitDialog(); 46 | //}}AFX_MSG 47 | DECLARE_MESSAGE_MAP() 48 | }; 49 | 50 | ///////////////////////////////////////////////////////////////////////////// 51 | 52 | #endif // __MYPROPERTYSHEET_H__ 53 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/PropertyFormView.cpp: -------------------------------------------------------------------------------- 1 | // PropertyFormView.cpp : implementation file 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "demo.h" 6 | #include "PropertyFormView.h" 7 | 8 | #ifdef _DEBUG 9 | #define new DEBUG_NEW 10 | #undef THIS_FILE 11 | static char THIS_FILE[] = __FILE__; 12 | #endif 13 | 14 | ///////////////////////////////////////////////////////////////////////////// 15 | // CPropertyFormView 16 | 17 | IMPLEMENT_DYNCREATE(CPropertyFormView, CResizableFormView) 18 | 19 | CPropertyFormView::CPropertyFormView() 20 | : CResizableFormView(CPropertyFormView::IDD) 21 | { 22 | //{{AFX_DATA_INIT(CPropertyFormView) 23 | // NOTE: the ClassWizard will add member initialization here 24 | //}}AFX_DATA_INIT 25 | } 26 | 27 | CPropertyFormView::~CPropertyFormView() 28 | { 29 | } 30 | 31 | void CPropertyFormView::DoDataExchange(CDataExchange* pDX) 32 | { 33 | CResizableFormView::DoDataExchange(pDX); 34 | //{{AFX_DATA_MAP(CPropertyFormView) 35 | // NOTE: the ClassWizard will add DDX and DDV calls here 36 | //}}AFX_DATA_MAP 37 | } 38 | 39 | 40 | BEGIN_MESSAGE_MAP(CPropertyFormView, CResizableFormView) 41 | //{{AFX_MSG_MAP(CPropertyFormView) 42 | //}}AFX_MSG_MAP 43 | END_MESSAGE_MAP() 44 | 45 | ///////////////////////////////////////////////////////////////////////////// 46 | // CPropertyFormView diagnostics 47 | 48 | #ifdef _DEBUG 49 | void CPropertyFormView::AssertValid() const 50 | { 51 | CResizableFormView::AssertValid(); 52 | } 53 | 54 | void CPropertyFormView::Dump(CDumpContext& dc) const 55 | { 56 | CResizableFormView::Dump(dc); 57 | } 58 | #endif //_DEBUG 59 | 60 | ///////////////////////////////////////////////////////////////////////////// 61 | // CPropertyFormView message handlers 62 | 63 | BOOL CPropertyFormView::OnInitDialog() 64 | { 65 | CResizableFormView::OnInitDialog(); 66 | 67 | CWnd* pWnd = GetDlgItem(IDC_SHEETHOLDER); 68 | 69 | CRect rc; 70 | pWnd->GetWindowRect(&rc); 71 | pWnd->DestroyWindow(); 72 | 73 | ::MapWindowPoints(NULL, m_hWnd, (LPPOINT)&rc, 2); 74 | 75 | //m_Sheet.SetWizardMode(); 76 | //m_Sheet.m_psh.dwFlags |= PSH_HASHELP; 77 | 78 | m_Sheet.Create(this, WS_CHILD, 0); 79 | m_Sheet.SetWindowPos(NULL, rc.left, rc.top, rc.Width(), rc.Height(), 80 | SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW); 81 | m_Sheet.SetDlgCtrlID(IDC_SHEETHOLDER); 82 | 83 | AddAnchor(IDC_TEXT, TOP_LEFT, TOP_LEFT); 84 | AddAnchor(IDC_SHEETHOLDER, TOP_LEFT, BOTTOM_RIGHT); 85 | 86 | return TRUE; // return TRUE unless you set the focus to a control 87 | // EXCEPTION: OCX Property Pages should return FALSE 88 | } 89 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/PropertyFormView.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_PROPERTYFORMVIEW_H__38E47C7A_8F05_4E08_8765_01C48BD9DEA9__INCLUDED_) 2 | #define AFX_PROPERTYFORMVIEW_H__38E47C7A_8F05_4E08_8765_01C48BD9DEA9__INCLUDED_ 3 | 4 | #include "MyPropertySheet.h" // Added by ClassView 5 | 6 | #if _MSC_VER > 1000 7 | #pragma once 8 | #endif // _MSC_VER > 1000 9 | // PropertyFormView.h : header file 10 | // 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | // CPropertyFormView form view 14 | 15 | #ifndef __AFXEXT_H__ 16 | #include 17 | #endif 18 | 19 | #include "ResizableFormView.h" 20 | 21 | class CPropertyFormView : public CResizableFormView 22 | { 23 | protected: 24 | CPropertyFormView(); // protected constructor used by dynamic creation 25 | DECLARE_DYNCREATE(CPropertyFormView) 26 | 27 | // Form Data 28 | public: 29 | //{{AFX_DATA(CPropertyFormView) 30 | enum { IDD = IDD_NEWFORM }; 31 | // NOTE: the ClassWizard will add data members here 32 | //}}AFX_DATA 33 | 34 | // Attributes 35 | public: 36 | 37 | // Operations 38 | public: 39 | CMyPropertySheet m_Sheet; 40 | 41 | // Overrides 42 | // ClassWizard generated virtual function overrides 43 | //{{AFX_VIRTUAL(CPropertyFormView) 44 | protected: 45 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 46 | //}}AFX_VIRTUAL 47 | 48 | // Implementation 49 | protected: 50 | virtual ~CPropertyFormView(); 51 | #ifdef _DEBUG 52 | virtual void AssertValid() const; 53 | virtual void Dump(CDumpContext& dc) const; 54 | #endif 55 | 56 | // Generated message map functions 57 | //{{AFX_MSG(CPropertyFormView) 58 | virtual BOOL OnInitDialog(); 59 | //}}AFX_MSG 60 | DECLARE_MESSAGE_MAP() 61 | }; 62 | 63 | ///////////////////////////////////////////////////////////////////////////// 64 | 65 | //{{AFX_INSERT_LOCATION}} 66 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 67 | 68 | #endif // !defined(AFX_PROPERTYFORMVIEW_H__38E47C7A_8F05_4E08_8765_01C48BD9DEA9__INCLUDED_) 69 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by Demo.rc 4 | // 5 | #define IDD_ABOUTBOX 100 6 | #define IDD_DEMO_FORM 101 7 | #define IDD_PROPPAGE1 104 8 | #define IDD_PROPPAGE2 105 9 | #define IDD_PROPPAGE3 106 10 | #define IDR_MAINFRAME 128 11 | #define IDR_DEMOTYPE 129 12 | #define IDR_DEMOTYPE1 130 13 | #define IDR_DEMOTYPE2 131 14 | #define IDD_NEWFORM 131 15 | #define IDC_EDIT1 1000 16 | #define IDC_BUTTON1 1002 17 | #define IDC_BUTTON2 1003 18 | #define IDC_CHECK1 1003 19 | #define IDC_RADIO4 1004 20 | #define IDC_COMBO1 1005 21 | #define IDC_LIST1 1006 22 | #define IDC_RADIO1 1008 23 | #define IDC_PICTURE1 1008 24 | #define IDC_RADIO2 1009 25 | #define IDC_STATIC1 1010 26 | #define IDC_SLIDER1 1010 27 | #define IDC_GROUP1 1011 28 | #define IDC_LABEL1 1011 29 | #define IDC_ICON1 1012 30 | #define IDC_RADIO3 1013 31 | #define IDC_STATIC2 1014 32 | #define IDC_TEXT 1015 33 | #define IDC_SHEETHOLDER 1016 34 | 35 | // Next default values for new objects 36 | // 37 | #ifdef APSTUDIO_INVOKED 38 | #ifndef APSTUDIO_READONLY_SYMBOLS 39 | #define _APS_NEXT_RESOURCE_VALUE 132 40 | #define _APS_NEXT_COMMAND_VALUE 32771 41 | #define _APS_NEXT_CONTROL_VALUE 1017 42 | #define _APS_NEXT_SYMED_VALUE 101 43 | #endif 44 | #endif 45 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // Demo.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if !defined(AFX_STDAFX_H__D323ADE2_50A1_4C34_8B7F_2892323C4972__INCLUDED_) 7 | #define AFX_STDAFX_H__D323ADE2_50A1_4C34_8B7F_2892323C4972__INCLUDED_ 8 | 9 | #if _MSC_VER > 1000 10 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | #if defined _M_IX86 14 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 15 | #elif defined _M_IA64 16 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") 17 | #elif defined _M_X64 18 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 19 | #else 20 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 21 | #endif 22 | 23 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 24 | 25 | #include // MFC core and standard components 26 | #include // MFC extensions 27 | #include // MFC support for Internet Explorer 4 Common Controls 28 | #ifndef _AFX_NO_AFXCMN_SUPPORT 29 | #include // MFC support for Windows Common Controls 30 | #endif // _AFX_NO_AFXCMN_SUPPORT 31 | 32 | 33 | //{{AFX_INSERT_LOCATION}} 34 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 35 | 36 | #endif // !defined(AFX_STDAFX_H__D323ADE2_50A1_4C34_8B7F_2892323C4972__INCLUDED_) 37 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/res/Demo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableFormViewMDI/res/Demo.ico -------------------------------------------------------------------------------- /ResizableFormViewMDI/res/Demo.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // DEMO.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /ResizableFormViewMDI/res/DemoDoc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableFormViewMDI/res/DemoDoc.ico -------------------------------------------------------------------------------- /ResizableFormViewMDI/res/DemoDoc0.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableFormViewMDI/res/DemoDoc0.ico -------------------------------------------------------------------------------- /ResizableFormViewMDI/res/DemoDoc1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableFormViewMDI/res/DemoDoc1.ico -------------------------------------------------------------------------------- /ResizableFormViewMDI/res/DemoDoc2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableFormViewMDI/res/DemoDoc2.ico -------------------------------------------------------------------------------- /ResizableFormViewSDI/Demo.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "Demo"=".\Demo.dsp" - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | Begin Project Dependency 15 | Project_Dep_Name ResizableLib 16 | End Project Dependency 17 | }}} 18 | 19 | ############################################################################### 20 | 21 | Project: "ResizableLib"="..\ResizableLib\ResizableLib.dsp" - Package Owner=<4> 22 | 23 | Package=<5> 24 | {{{ 25 | }}} 26 | 27 | Package=<4> 28 | {{{ 29 | }}} 30 | 31 | ############################################################################### 32 | 33 | Global: 34 | 35 | Package=<5> 36 | {{{ 37 | }}} 38 | 39 | Package=<3> 40 | {{{ 41 | }}} 42 | 43 | ############################################################################### 44 | 45 | -------------------------------------------------------------------------------- /ResizableFormViewSDI/Demo.h: -------------------------------------------------------------------------------- 1 | // Demo.h : main header file for the DEMO application 2 | // 3 | 4 | #if !defined(AFX_DEMO_H__4807337A_856E_4C64_AA1C_4435C6858F39__INCLUDED_) 5 | #define AFX_DEMO_H__4807337A_856E_4C64_AA1C_4435C6858F39__INCLUDED_ 6 | 7 | #if _MSC_VER > 1000 8 | #pragma once 9 | #endif // _MSC_VER > 1000 10 | 11 | #ifndef __AFXWIN_H__ 12 | #error include 'stdafx.h' before including this file for PCH 13 | #endif 14 | 15 | #include "resource.h" // main symbols 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // CDemoApp: 19 | // See Demo.cpp for the implementation of this class 20 | // 21 | 22 | class CDemoApp : public CWinApp 23 | { 24 | public: 25 | CDemoApp(); 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CDemoApp) 30 | public: 31 | virtual BOOL InitInstance(); 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | //{{AFX_MSG(CDemoApp) 36 | afx_msg void OnAppAbout(); 37 | //}}AFX_MSG 38 | DECLARE_MESSAGE_MAP() 39 | }; 40 | 41 | 42 | ///////////////////////////////////////////////////////////////////////////// 43 | 44 | //{{AFX_INSERT_LOCATION}} 45 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 46 | 47 | #endif // !defined(AFX_DEMO_H__4807337A_856E_4C64_AA1C_4435C6858F39__INCLUDED_) 48 | -------------------------------------------------------------------------------- /ResizableFormViewSDI/Demo.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {998ad824-be84-4b2b-b00f-5f9394e738db} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {ffb4b416-3b54-4b39-814b-19ff615f51b8} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {fcb4a656-20ca-41c6-bbd8-1bb236075f3a} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Source Files 37 | 38 | 39 | 40 | 41 | Header Files 42 | 43 | 44 | Header Files 45 | 46 | 47 | Header Files 48 | 49 | 50 | Header Files 51 | 52 | 53 | Header Files 54 | 55 | 56 | Header Files 57 | 58 | 59 | 60 | 61 | Resource Files 62 | 63 | 64 | Resource Files 65 | 66 | 67 | Resource Files 68 | 69 | 70 | 71 | 72 | Resource Files 73 | 74 | 75 | -------------------------------------------------------------------------------- /ResizableFormViewSDI/DemoDoc.cpp: -------------------------------------------------------------------------------- 1 | // DemoDoc.cpp : implementation of the CDemoDoc class 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "Demo.h" 6 | 7 | #include "DemoDoc.h" 8 | 9 | #ifdef _DEBUG 10 | #define new DEBUG_NEW 11 | #undef THIS_FILE 12 | static char THIS_FILE[] = __FILE__; 13 | #endif 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // CDemoDoc 17 | 18 | IMPLEMENT_DYNCREATE(CDemoDoc, CDocument) 19 | 20 | BEGIN_MESSAGE_MAP(CDemoDoc, CDocument) 21 | //{{AFX_MSG_MAP(CDemoDoc) 22 | //}}AFX_MSG_MAP 23 | END_MESSAGE_MAP() 24 | 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // CDemoDoc construction/destruction 27 | 28 | CDemoDoc::CDemoDoc() 29 | { 30 | } 31 | 32 | CDemoDoc::~CDemoDoc() 33 | { 34 | } 35 | 36 | BOOL CDemoDoc::OnNewDocument() 37 | { 38 | if (!CDocument::OnNewDocument()) 39 | return FALSE; 40 | 41 | return TRUE; 42 | } 43 | 44 | 45 | 46 | ///////////////////////////////////////////////////////////////////////////// 47 | // CDemoDoc serialization 48 | 49 | void CDemoDoc::Serialize(CArchive& ar) 50 | { 51 | if (ar.IsStoring()) 52 | { 53 | } 54 | else 55 | { 56 | } 57 | } 58 | 59 | ///////////////////////////////////////////////////////////////////////////// 60 | // CDemoDoc diagnostics 61 | 62 | #ifdef _DEBUG 63 | void CDemoDoc::AssertValid() const 64 | { 65 | CDocument::AssertValid(); 66 | } 67 | 68 | void CDemoDoc::Dump(CDumpContext& dc) const 69 | { 70 | CDocument::Dump(dc); 71 | } 72 | #endif //_DEBUG 73 | 74 | ///////////////////////////////////////////////////////////////////////////// 75 | // CDemoDoc commands 76 | -------------------------------------------------------------------------------- /ResizableFormViewSDI/DemoDoc.h: -------------------------------------------------------------------------------- 1 | // DemoDoc.h : interface of the CDemoDoc class 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_DEMODOC_H__66A953A4_FE51_490B_86C6_03EDE281AD64__INCLUDED_) 6 | #define AFX_DEMODOC_H__66A953A4_FE51_490B_86C6_03EDE281AD64__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | 13 | class CDemoDoc : public CDocument 14 | { 15 | protected: // create from serialization only 16 | CDemoDoc(); 17 | DECLARE_DYNCREATE(CDemoDoc) 18 | 19 | // Attributes 20 | public: 21 | 22 | // Operations 23 | public: 24 | 25 | // Overrides 26 | // ClassWizard generated virtual function overrides 27 | //{{AFX_VIRTUAL(CDemoDoc) 28 | public: 29 | virtual BOOL OnNewDocument(); 30 | virtual void Serialize(CArchive& ar); 31 | //}}AFX_VIRTUAL 32 | 33 | // Implementation 34 | public: 35 | virtual ~CDemoDoc(); 36 | #ifdef _DEBUG 37 | virtual void AssertValid() const; 38 | virtual void Dump(CDumpContext& dc) const; 39 | #endif 40 | 41 | protected: 42 | 43 | // Generated message map functions 44 | protected: 45 | //{{AFX_MSG(CDemoDoc) 46 | //}}AFX_MSG 47 | DECLARE_MESSAGE_MAP() 48 | }; 49 | 50 | ///////////////////////////////////////////////////////////////////////////// 51 | 52 | //{{AFX_INSERT_LOCATION}} 53 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 54 | 55 | #endif // !defined(AFX_DEMODOC_H__66A953A4_FE51_490B_86C6_03EDE281AD64__INCLUDED_) 56 | -------------------------------------------------------------------------------- /ResizableFormViewSDI/DemoView.cpp: -------------------------------------------------------------------------------- 1 | // DemoView.cpp : implementation of the CDemoView class 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "Demo.h" 6 | 7 | #include "DemoDoc.h" 8 | #include "DemoView.h" 9 | 10 | #ifdef _DEBUG 11 | #define new DEBUG_NEW 12 | #undef THIS_FILE 13 | static char THIS_FILE[] = __FILE__; 14 | #endif 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // CDemoView 18 | 19 | IMPLEMENT_DYNCREATE(CDemoView, CResizableFormView) 20 | 21 | BEGIN_MESSAGE_MAP(CDemoView, CResizableFormView) 22 | //{{AFX_MSG_MAP(CDemoView) 23 | //}}AFX_MSG_MAP 24 | END_MESSAGE_MAP() 25 | 26 | ///////////////////////////////////////////////////////////////////////////// 27 | // CDemoView construction/destruction 28 | 29 | CDemoView::CDemoView() 30 | : CResizableFormView(CDemoView::IDD) 31 | { 32 | //{{AFX_DATA_INIT(CDemoView) 33 | // NOTE: the ClassWizard will add member initialization here 34 | //}}AFX_DATA_INIT 35 | } 36 | 37 | CDemoView::~CDemoView() 38 | { 39 | } 40 | 41 | void CDemoView::DoDataExchange(CDataExchange* pDX) 42 | { 43 | CResizableFormView::DoDataExchange(pDX); 44 | //{{AFX_DATA_MAP(CDemoView) 45 | // NOTE: the ClassWizard will add DDX and DDV calls here 46 | //}}AFX_DATA_MAP 47 | } 48 | 49 | BOOL CDemoView::PreCreateWindow(CREATESTRUCT& cs) 50 | { 51 | return CResizableFormView::PreCreateWindow(cs); 52 | } 53 | 54 | void CDemoView::OnInitialUpdate() 55 | { 56 | // complete initialization 57 | CResizableFormView::OnInitialUpdate(); 58 | 59 | // use template size as min track size 60 | CRect rect(CPoint(0, 0), GetTotalSize()); 61 | CalcWindowRect(rect, CWnd::adjustOutside); 62 | SetMinTrackSize(rect.Size()); 63 | 64 | // SetScaleToFitSize(GetTotalSize()); // scrollbars won't appear 65 | } 66 | 67 | ///////////////////////////////////////////////////////////////////////////// 68 | // CDemoView diagnostics 69 | 70 | #ifdef _DEBUG 71 | void CDemoView::AssertValid() const 72 | { 73 | CResizableFormView::AssertValid(); 74 | } 75 | 76 | void CDemoView::Dump(CDumpContext& dc) const 77 | { 78 | CResizableFormView::Dump(dc); 79 | } 80 | 81 | CDemoDoc* CDemoView::GetDocument() // non-debug version is inline 82 | { 83 | ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDemoDoc))); 84 | return (CDemoDoc*)m_pDocument; 85 | } 86 | #endif //_DEBUG 87 | 88 | ///////////////////////////////////////////////////////////////////////////// 89 | // CDemoView message handlers 90 | 91 | BOOL CDemoView::OnInitDialog() 92 | { 93 | CResizableFormView::OnInitDialog(); 94 | 95 | // add controls to the layout here 96 | AddAnchor(IDC_EDIT1, TOP_LEFT); 97 | AddAnchor(IDC_LIST1, TOP_LEFT, BOTTOM_RIGHT); 98 | AddAnchor(IDC_GROUP1, TOP_LEFT, BOTTOM_LEFT); 99 | AddAnchor(IDC_RADIO1, TOP_LEFT); 100 | AddAnchor(IDC_RADIO2, MIDDLE_LEFT); 101 | AddAnchor(IDC_RADIO3, BOTTOM_LEFT); 102 | 103 | return TRUE; // return TRUE unless you set the focus to a control 104 | // EXCEPTION: OCX Property Pages should return FALSE 105 | } 106 | -------------------------------------------------------------------------------- /ResizableFormViewSDI/DemoView.h: -------------------------------------------------------------------------------- 1 | // DemoView.h : interface of the CDemoView class 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_DEMOVIEW_H__20781705_5C0F_4E72_ACAE_50F448A9B9DC__INCLUDED_) 6 | #define AFX_DEMOVIEW_H__20781705_5C0F_4E72_ACAE_50F448A9B9DC__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | #include "ResizableFormView.h" 13 | 14 | class CDemoView : public CResizableFormView 15 | { 16 | protected: // create from serialization only 17 | CDemoView(); 18 | DECLARE_DYNCREATE(CDemoView) 19 | 20 | public: 21 | //{{AFX_DATA(CDemoView) 22 | enum{ IDD = IDD_DEMO_FORM }; 23 | // NOTE: the ClassWizard will add data members here 24 | //}}AFX_DATA 25 | 26 | // Attributes 27 | public: 28 | CDemoDoc* GetDocument(); 29 | 30 | // Operations 31 | public: 32 | 33 | // Overrides 34 | // ClassWizard generated virtual function overrides 35 | //{{AFX_VIRTUAL(CDemoView) 36 | public: 37 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 38 | protected: 39 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 40 | virtual void OnInitialUpdate(); // called first time after construct 41 | //}}AFX_VIRTUAL 42 | 43 | // Implementation 44 | public: 45 | virtual ~CDemoView(); 46 | #ifdef _DEBUG 47 | virtual void AssertValid() const; 48 | virtual void Dump(CDumpContext& dc) const; 49 | #endif 50 | 51 | protected: 52 | 53 | // Generated message map functions 54 | protected: 55 | //{{AFX_MSG(CDemoView) 56 | virtual BOOL OnInitDialog(); 57 | //}}AFX_MSG 58 | DECLARE_MESSAGE_MAP() 59 | }; 60 | 61 | #ifndef _DEBUG // debug version in DemoView.cpp 62 | inline CDemoDoc* CDemoView::GetDocument() 63 | { return (CDemoDoc*)m_pDocument; } 64 | #endif 65 | 66 | ///////////////////////////////////////////////////////////////////////////// 67 | 68 | //{{AFX_INSERT_LOCATION}} 69 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 70 | 71 | #endif // !defined(AFX_DEMOVIEW_H__20781705_5C0F_4E72_ACAE_50F448A9B9DC__INCLUDED_) 72 | -------------------------------------------------------------------------------- /ResizableFormViewSDI/MainFrm.cpp: -------------------------------------------------------------------------------- 1 | // MainFrm.cpp : implementation of the CMainFrame class 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "Demo.h" 6 | 7 | #include "MainFrm.h" 8 | 9 | #ifdef _DEBUG 10 | #define new DEBUG_NEW 11 | #undef THIS_FILE 12 | static char THIS_FILE[] = __FILE__; 13 | #endif 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // CMainFrame 17 | 18 | IMPLEMENT_DYNCREATE(CMainFrame, CResizableFrame) 19 | 20 | BEGIN_MESSAGE_MAP(CMainFrame, CResizableFrame) 21 | //{{AFX_MSG_MAP(CMainFrame) 22 | ON_WM_CREATE() 23 | //}}AFX_MSG_MAP 24 | END_MESSAGE_MAP() 25 | 26 | static UINT indicators[] = 27 | { 28 | ID_SEPARATOR, // status line indicator 29 | ID_INDICATOR_CAPS, 30 | ID_INDICATOR_NUM, 31 | ID_INDICATOR_SCRL, 32 | }; 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | // CMainFrame construction/destruction 36 | 37 | CMainFrame::CMainFrame() 38 | { 39 | } 40 | 41 | CMainFrame::~CMainFrame() 42 | { 43 | } 44 | 45 | int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) 46 | { 47 | if (CResizableFrame::OnCreate(lpCreateStruct) == -1) 48 | return -1; 49 | 50 | if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP 51 | | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || 52 | !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) 53 | { 54 | TRACE0("Failed to create toolbar\n"); 55 | return -1; // fail to create 56 | } 57 | 58 | if (!m_wndStatusBar.Create(this) || 59 | !m_wndStatusBar.SetIndicators(indicators, 60 | sizeof(indicators)/sizeof(UINT))) 61 | { 62 | TRACE0("Failed to create status bar\n"); 63 | return -1; // fail to create 64 | } 65 | 66 | m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); 67 | EnableDocking(CBRS_ALIGN_ANY); 68 | DockControlBar(&m_wndToolBar); 69 | 70 | // save/restore window position and size 71 | EnableSaveRestore(_T("DemoSDI")); 72 | 73 | return 0; 74 | } 75 | 76 | ///////////////////////////////////////////////////////////////////////////// 77 | // CMainFrame diagnostics 78 | 79 | #ifdef _DEBUG 80 | void CMainFrame::AssertValid() const 81 | { 82 | CResizableFrame::AssertValid(); 83 | } 84 | 85 | void CMainFrame::Dump(CDumpContext& dc) const 86 | { 87 | CResizableFrame::Dump(dc); 88 | } 89 | 90 | #endif //_DEBUG 91 | 92 | ///////////////////////////////////////////////////////////////////////////// 93 | // CMainFrame message handlers 94 | 95 | -------------------------------------------------------------------------------- /ResizableFormViewSDI/MainFrm.h: -------------------------------------------------------------------------------- 1 | // MainFrm.h : interface of the CMainFrame class 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_MAINFRM_H__F892AEA3_73B5_4945_8331_82FB6C30FC2D__INCLUDED_) 6 | #define AFX_MAINFRM_H__F892AEA3_73B5_4945_8331_82FB6C30FC2D__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | #include "ResizableFrame.h" 13 | 14 | class CMainFrame : public CResizableFrame 15 | { 16 | 17 | protected: // create from serialization only 18 | CMainFrame(); 19 | DECLARE_DYNCREATE(CMainFrame) 20 | 21 | // Attributes 22 | public: 23 | 24 | // Operations 25 | public: 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CMainFrame) 30 | public: 31 | //}}AFX_VIRTUAL 32 | 33 | // Implementation 34 | public: 35 | virtual ~CMainFrame(); 36 | #ifdef _DEBUG 37 | virtual void AssertValid() const; 38 | virtual void Dump(CDumpContext& dc) const; 39 | #endif 40 | 41 | protected: // control bar embedded members 42 | CStatusBar m_wndStatusBar; 43 | CToolBar m_wndToolBar; 44 | 45 | // Generated message map functions 46 | protected: 47 | //{{AFX_MSG(CMainFrame) 48 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 49 | //}}AFX_MSG 50 | DECLARE_MESSAGE_MAP() 51 | }; 52 | 53 | ///////////////////////////////////////////////////////////////////////////// 54 | 55 | //{{AFX_INSERT_LOCATION}} 56 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 57 | 58 | #endif // !defined(AFX_MAINFRM_H__F892AEA3_73B5_4945_8331_82FB6C30FC2D__INCLUDED_) 59 | -------------------------------------------------------------------------------- /ResizableFormViewSDI/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // Demo.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ResizableFormViewSDI/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if !defined(AFX_STDAFX_H__ECDF7D25_C19F_4824_B920_7F77053D1D44__INCLUDED_) 7 | #define AFX_STDAFX_H__ECDF7D25_C19F_4824_B920_7F77053D1D44__INCLUDED_ 8 | 9 | #if _MSC_VER > 1000 10 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | #if defined _M_IX86 14 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 15 | #elif defined _M_IA64 16 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") 17 | #elif defined _M_X64 18 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 19 | #else 20 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 21 | #endif 22 | 23 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 24 | 25 | #include // MFC core and standard components 26 | #include // MFC extensions 27 | #include // MFC support for Internet Explorer 4 Common Controls 28 | #ifndef _AFX_NO_AFXCMN_SUPPORT 29 | #include // MFC support for Windows Common Controls 30 | #endif // _AFX_NO_AFXCMN_SUPPORT 31 | 32 | 33 | //{{AFX_INSERT_LOCATION}} 34 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 35 | 36 | #endif // !defined(AFX_STDAFX_H__ECDF7D25_C19F_4824_B920_7F77053D1D44__INCLUDED_) 37 | -------------------------------------------------------------------------------- /ResizableFormViewSDI/res/Demo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableFormViewSDI/res/Demo.ico -------------------------------------------------------------------------------- /ResizableFormViewSDI/res/Demo.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // DEMO.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /ResizableFormViewSDI/res/DemoDoc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableFormViewSDI/res/DemoDoc.ico -------------------------------------------------------------------------------- /ResizableFormViewSDI/res/Toolbar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableFormViewSDI/res/Toolbar.bmp -------------------------------------------------------------------------------- /ResizableFormViewSDI/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by Demo.rc 4 | // 5 | #define IDD_ABOUTBOX 100 6 | #define IDD_DEMO_FORM 101 7 | #define IDR_MAINFRAME 128 8 | #define IDR_DEMOTYPE 129 9 | #define IDC_LIST1 1000 10 | #define IDC_EDIT1 1001 11 | #define IDC_RADIO1 1002 12 | #define IDC_RADIO2 1003 13 | #define IDC_RADIO3 1004 14 | #define IDC_GROUP1 1005 15 | 16 | // Next default values for new objects 17 | // 18 | #ifdef APSTUDIO_INVOKED 19 | #ifndef APSTUDIO_READONLY_SYMBOLS 20 | #define _APS_NEXT_RESOURCE_VALUE 130 21 | #define _APS_NEXT_COMMAND_VALUE 32771 22 | #define _APS_NEXT_CONTROL_VALUE 1000 23 | #define _APS_NEXT_SYMED_VALUE 101 24 | #endif 25 | #endif 26 | -------------------------------------------------------------------------------- /ResizableLib/Docs/.gitignore: -------------------------------------------------------------------------------- 1 | html 2 | latex 3 | rtf 4 | man 5 | -------------------------------------------------------------------------------- /ResizableLib/Docs/Doxyfile-include: -------------------------------------------------------------------------------- 1 | # Doxygen include file 2 | # Used to specify compiler's include directories for the preprocessor 3 | 4 | # The INCLUDE_PATH tag can be used to specify one or more directories that 5 | # contain include files that are not input files but should be processed by 6 | # the preprocessor. 7 | 8 | INCLUDE_PATH = "C:\SDK\Windows\include" \ 9 | "C:\VS6\VC\MFC\INCLUDE" \ 10 | "C:\VS6\VC\ATL\INCLUDE" \ 11 | "C:\SDK\WTL70\include" 12 | -------------------------------------------------------------------------------- /ResizableLib/Docs/class.txt: -------------------------------------------------------------------------------- 1 | //! @brief brief_description 2 | /*! 3 | * long_description 4 | */ -------------------------------------------------------------------------------- /ResizableLib/Docs/default.txt: -------------------------------------------------------------------------------- 1 | //! @page page_name page_title 2 | /*! 3 | * @section section_name section_title 4 | * 5 | * @subsection subsection_name subsection_title 6 | * 7 | */ -------------------------------------------------------------------------------- /ResizableLib/Docs/footer.html: -------------------------------------------------------------------------------- 1 |
2 | 7 | 8 |
3 |
4 | $projectname - Copyright © Paolo Messina, 2000-2004.
5 | Released under the Artistic License as Open Source software, like anything should be.
6 | Documentation generated on $datetime by Doxygen $doxygenversion
doxygen
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ResizableLib/Docs/function.txt: -------------------------------------------------------------------------------- 1 | //! @brief brief_description 2 | /*! 3 | * long_description 4 | * 5 | * @param %PARAMNAME% argument_description 6 | * 7 | * @return return_value_description 8 | */ -------------------------------------------------------------------------------- /ResizableLib/Docs/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | $title 4 | 5 | 6 | 7 |
-------------------------------------------------------------------------------- /ResizableLib/Docs/refman.h: -------------------------------------------------------------------------------- 1 | /*! 2 | @mainpage 3 | 4 | @section whatsthis What is it? 5 | 6 | This class library is an attempt to make the development of 7 | resizable windows a little easier for the MFC developer and much more 8 | pleasant for the user. A resizable window in this context is a window, 9 | not necessarily top-level, that once resized either by the user or the 10 | developer, is able to automatically resize and reposition its child 11 | controls appropriately. 12 | 13 | @section howtouse Using the library 14 | 15 | To use the class library perform the following steps: 16 |
    17 |
  • Unzip the library source and put the ResizableLib directory in a place 18 | of your choice. I suggest to use the same directory where you create your 19 | Projects (e.g. "C:\MyProjects") or your common path for 3rd-party libraries 20 |
  • Go to the FileView pane and right click on the root element, or choose 21 | the "Project" menu, then select "Insert Project into Workspace..." 22 |
  • Navigate to the place where you put the library, select the library 23 | Project file and check "Dependency of" specifying which Project will make 24 | use of the library 25 |
  • Re-activate your Project in the FileView and open the Settings dialog 26 | (also from the "Project" menu) 27 |
  • Make sure your Project is selected in the tree view and that you have 28 | selected "All Configurations" in the combo box, then click on the "C/C++" tab 29 |
  • In the "Category" combo box choose "Preprocessor" and add the library 30 | path to the "Additional include directories" edit box 31 |
32 | This procedure is valid for VC++ 6.0 only and it is the suggested way of 33 | employment for new users of the library. Users of VC++ 7.0 and later versions 34 | can easily find corresponding steps for the new IDE. 35 | More experienced users may want to follow their own method to use the 36 | library in their projects. This includes, but it is not limited to, the 37 | following methods: 38 |
    39 |
  • Add the required library source files to the project, provided that 40 | directions in the library precompiled header are followed in the project 41 | precompiled header 42 |
  • Build the library independently and link to the proper output file 43 | manually, optionally adding the library source files directory to either 44 | the project settings or the IDE include path 45 |
46 | */ 47 | 48 | /*! 49 | @page license Artistic License 50 | You may obtain a copy of this document from: 51 | http://www.opensource.org/licenses/artistic-license.html 52 | @verbinclude Artistic-License.txt 53 | */ 54 | 55 | /*! 56 | @defgroup CoreComponents Core Components 57 | 58 | This module contains classes and structures that implement core 59 | functionalities of this library, such as layout management, size 60 | constraints, persisting windows layout and user interface elements 61 | used in resizable windows. 62 | */ 63 | -------------------------------------------------------------------------------- /ResizableLib/Docs/struct.txt: -------------------------------------------------------------------------------- 1 | //! @brief brief_description 2 | /*! 3 | * long_description 4 | */ -------------------------------------------------------------------------------- /ResizableLib/Docs/typedef.txt: -------------------------------------------------------------------------------- 1 | //! @brief brief_description -------------------------------------------------------------------------------- /ResizableLib/ResizableComboBox.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_RESIZABLECOMBOBOX_H__CAEDF06D_C4F5_49E4_A783_AD7D894CF9A0__INCLUDED_) 2 | #define AFX_RESIZABLECOMBOBOX_H__CAEDF06D_C4F5_49E4_A783_AD7D894CF9A0__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | 8 | // ResizableComboBox.h : header file 9 | // 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // 12 | // This file is part of ResizableLib 13 | // https://github.com/ppescher/resizablelib 14 | // 15 | // Copyright (C) 2000-2024 by Paolo Messina 16 | // mailto:ppescher@hotmail.com 17 | // 18 | // The contents of this file are subject to the Artistic License 2.0 19 | // http://opensource.org/licenses/Artistic-2.0 20 | // 21 | // If you find this code useful, credits would be nice! 22 | // 23 | ///////////////////////////////////////////////////////////////////////////// 24 | 25 | #include "ResizableComboLBox.h" 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | // CResizableComboBox window 29 | 30 | class CResizableComboBox : public CComboBox 31 | { 32 | friend class CResizableComboLBox; 33 | 34 | // Construction 35 | public: 36 | CResizableComboBox(); 37 | 38 | // Attributes 39 | public: 40 | 41 | protected: 42 | CResizableComboLBox m_ctrlListBox; 43 | 44 | // Operations 45 | public: 46 | 47 | // Overrides 48 | // ClassWizard generated virtual function overrides 49 | //{{AFX_VIRTUAL(CResizableComboBox) 50 | protected: 51 | virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); 52 | virtual void PreSubclassWindow(); 53 | //}}AFX_VIRTUAL 54 | 55 | // Implementation 56 | public: 57 | virtual ~CResizableComboBox(); 58 | 59 | protected: 60 | RECT m_rectDropDown; 61 | BOOL m_bClipMaxHeight; 62 | BOOL m_bIntegralHeight; 63 | int m_iExtent; 64 | 65 | void InitHorizontalExtent(); 66 | void UpdateHorizontalExtent(LPCTSTR szText); 67 | int MakeIntegralHeight(const int height); 68 | 69 | // Generated message map functions 70 | protected: 71 | //{{AFX_MSG(CResizableComboBox) 72 | afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); 73 | //}}AFX_MSG 74 | 75 | DECLARE_MESSAGE_MAP() 76 | }; 77 | 78 | ///////////////////////////////////////////////////////////////////////////// 79 | 80 | //{{AFX_INSERT_LOCATION}} 81 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 82 | 83 | #endif // !defined(AFX_RESIZABLECOMBOBOX_H__CAEDF06D_C4F5_49E4_A783_AD7D894CF9A0__INCLUDED_) 84 | -------------------------------------------------------------------------------- /ResizableLib/ResizableComboLBox.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_RESIZABLECOMBOLBOX_H__INCLUDED_) 2 | #define AFX_RESIZABLECOMBOLBOX_H__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | 8 | // ResizableComboLBox.h : header file 9 | // 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // 12 | // This file is part of ResizableLib 13 | // https://github.com/ppescher/resizablelib 14 | // 15 | // Copyright (C) 2000-2024 by Paolo Messina 16 | // mailto:ppescher@hotmail.com 17 | // 18 | // The contents of this file are subject to the Artistic License 2.0 19 | // http://opensource.org/licenses/Artistic-2.0 20 | // 21 | // If you find this code useful, credits would be nice! 22 | // 23 | ///////////////////////////////////////////////////////////////////////////// 24 | 25 | #include "ResizableGrip.h" 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | // CResizableComboLBox window 29 | 30 | class CResizableComboBox; 31 | 32 | class CResizableComboLBox : public CWnd, public CResizableGrip 33 | { 34 | friend class CResizableComboBox; 35 | 36 | // Construction 37 | public: 38 | CResizableComboLBox(); 39 | 40 | // Attributes 41 | public: 42 | 43 | // Operations 44 | public: 45 | 46 | // Overrides 47 | // ClassWizard generated virtual function overrides 48 | //{{AFX_VIRTUAL(CResizableComboLBox) 49 | protected: 50 | virtual void PreSubclassWindow(); 51 | virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); 52 | //}}AFX_VIRTUAL 53 | 54 | // Implementation 55 | public: 56 | virtual ~CResizableComboLBox(); 57 | 58 | private: 59 | CPoint m_ptBeforeSizing; // screen coords 60 | CRect m_rcBeforeSizing; // screen coords 61 | CSize m_sizeAfterSizing; // screen coords 62 | LRESULT m_nHitTest; // current resize operation 63 | BOOL m_bSizing; 64 | 65 | void InitializeControl(); 66 | 67 | protected: 68 | CSize m_sizeMin; // initial size (minimum) 69 | CResizableComboBox* m_pOwnerCombo; // owner combobox 70 | 71 | void ApplyLimitsToPos(WINDOWPOS* lpwndpos); 72 | void EndSizing(); 73 | void PaintSizeGrip(CDC * pDC); 74 | 75 | BOOL IsRTL(); 76 | 77 | virtual CWnd* GetResizableWnd() const 78 | { 79 | // make the layout know its parent window 80 | return CWnd::FromHandle(m_hWnd); 81 | }; 82 | 83 | // Generated message map functions 84 | protected: 85 | //{{AFX_MSG(CResizableComboLBox) 86 | afx_msg void OnMouseMove(UINT nFlags, CPoint point); 87 | afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 88 | afx_msg void OnLButtonUp(UINT nFlags, CPoint point); 89 | afx_msg LRESULT OnNcHitTest(CPoint point); 90 | afx_msg void OnCaptureChanged(CWnd *pWnd); 91 | afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos); 92 | afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos); 93 | afx_msg void OnNcPaint(); 94 | //}}AFX_MSG 95 | 96 | DECLARE_MESSAGE_MAP() 97 | }; 98 | 99 | ///////////////////////////////////////////////////////////////////////////// 100 | 101 | //{{AFX_INSERT_LOCATION}} 102 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 103 | 104 | #endif // !defined(AFX_RESIZABLECOMBOLBOX_H__INCLUDED_) 105 | -------------------------------------------------------------------------------- /ResizableLib/ResizableFormView.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_RESIZABLEFORMVIEW_H__INCLUDED_) 2 | #define AFX_RESIZABLEFORMVIEW_H__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | 8 | // ResizableFormView.h : header file 9 | // 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // 12 | // This file is part of ResizableLib 13 | // https://github.com/ppescher/resizablelib 14 | // 15 | // Copyright (C) 2000-2024 by Paolo Messina 16 | // mailto:ppescher@hotmail.com 17 | // 18 | // The contents of this file are subject to the Artistic License 2.0 19 | // http://opensource.org/licenses/Artistic-2.0 20 | // 21 | // If you find this code useful, credits would be nice! 22 | // 23 | ///////////////////////////////////////////////////////////////////////////// 24 | 25 | #include "ResizableLayout.h" 26 | #include "ResizableGrip.h" 27 | #include "ResizableMinMax.h" 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | // CResizableFormView form view 31 | 32 | #include 33 | 34 | class CResizableFormView : public CFormView, public CResizableLayout, 35 | public CResizableGrip, public CResizableMinMax 36 | { 37 | DECLARE_DYNAMIC(CResizableFormView) 38 | 39 | // Construction 40 | protected: // must derive your own class 41 | explicit CResizableFormView(UINT nIDTemplate); 42 | explicit CResizableFormView(LPCTSTR lpszTemplateName); 43 | virtual ~CResizableFormView(); 44 | 45 | private: 46 | void PrivateConstruct(); 47 | 48 | // support for temporarily hiding the grip 49 | DWORD m_dwGripTempState; 50 | enum GripHideReason // bitmask 51 | { 52 | GHR_MAXIMIZED = 0x01, 53 | GHR_SCROLLBAR = 0x02, 54 | GHR_ALIGNMENT = 0x04, 55 | }; 56 | 57 | // called from base class 58 | protected: 59 | 60 | virtual void GetTotalClientRect(LPRECT lpRect) const; 61 | 62 | virtual CWnd* GetResizableWnd() const 63 | { 64 | // make the layout know its parent window 65 | return CWnd::FromHandle(m_hWnd); 66 | }; 67 | 68 | 69 | // Attributes 70 | public: 71 | 72 | // Operations 73 | public: 74 | 75 | // Overrides 76 | public: 77 | virtual BOOL OnInitDialog(); 78 | // ClassWizard generated virtual function overrides 79 | //{{AFX_VIRTUAL(CResizableFormView) 80 | protected: 81 | virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); 82 | //}}AFX_VIRTUAL 83 | 84 | // Implementation 85 | protected: 86 | 87 | #ifdef _DEBUG 88 | virtual void AssertValid() const; 89 | virtual void Dump(CDumpContext& dc) const; 90 | #endif 91 | 92 | // Generated message map functions 93 | //{{AFX_MSG(CResizableFormView) 94 | afx_msg void OnSize(UINT nType, int cx, int cy); 95 | afx_msg BOOL OnEraseBkgnd(CDC* pDC); 96 | afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); 97 | afx_msg void OnDestroy(); 98 | afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct); 99 | //}}AFX_MSG 100 | DECLARE_MESSAGE_MAP() 101 | }; 102 | 103 | ///////////////////////////////////////////////////////////////////////////// 104 | 105 | //{{AFX_INSERT_LOCATION}} 106 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 107 | 108 | #endif // !defined(AFX_RESIZABLEFORMVIEW_H__INCLUDED_) 109 | -------------------------------------------------------------------------------- /ResizableLib/ResizableFrame.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_RESIZABLEFRAME_H__INCLUDED_) 2 | #define AFX_RESIZABLEFRAME_H__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // ResizableFrame.h : header file 8 | // 9 | ///////////////////////////////////////////////////////////////////////////// 10 | // 11 | // This file is part of ResizableLib 12 | // https://github.com/ppescher/resizablelib 13 | // 14 | // Copyright (C) 2000-2024 by Paolo Messina 15 | // mailto:ppescher@hotmail.com 16 | // 17 | // The contents of this file are subject to the Artistic License 2.0 18 | // http://opensource.org/licenses/Artistic-2.0 19 | // 20 | // If you find this code useful, credits would be nice! 21 | // 22 | ///////////////////////////////////////////////////////////////////////////// 23 | 24 | #include "ResizableMinMax.h" 25 | #include "ResizableWndState.h" 26 | #include "ResizableLayout.h" 27 | 28 | ///////////////////////////////////////////////////////////////////////////// 29 | // CResizableFrame frame 30 | 31 | class CResizableFrame : public CFrameWnd, public CResizableMinMax, 32 | public CResizableWndState, public CResizableLayout 33 | { 34 | DECLARE_DYNCREATE(CResizableFrame) 35 | protected: 36 | CResizableFrame(); // protected constructor used by dynamic creation 37 | 38 | // Attributes 39 | protected: 40 | 41 | // Operations 42 | public: 43 | 44 | // Overrides 45 | // ClassWizard generated virtual function overrides 46 | //{{AFX_VIRTUAL(CResizableFrame) 47 | protected: 48 | virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); 49 | //}}AFX_VIRTUAL 50 | 51 | // Implementation 52 | protected: 53 | virtual ~CResizableFrame(); 54 | 55 | BOOL EnableSaveRestore(LPCTSTR pszSection, BOOL bRectOnly = FALSE); 56 | 57 | virtual CWnd* GetResizableWnd() const 58 | { 59 | // make the layout know its parent window 60 | return CWnd::FromHandle(m_hWnd); 61 | }; 62 | 63 | private: 64 | // flags 65 | BOOL m_bEnableSaveRestore; 66 | BOOL m_bRectOnly; 67 | 68 | // internal status 69 | CString m_sSection; // section name (identifies a parent window) 70 | 71 | protected: 72 | // Generated message map functions 73 | //{{AFX_MSG(CResizableFrame) 74 | afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); 75 | afx_msg void OnDestroy(); 76 | afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct); 77 | afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos); 78 | //}}AFX_MSG 79 | DECLARE_MESSAGE_MAP() 80 | }; 81 | 82 | ///////////////////////////////////////////////////////////////////////////// 83 | 84 | //{{AFX_INSERT_LOCATION}} 85 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 86 | 87 | #endif // !defined(AFX_RESIZABLEFRAME_H__INCLUDED_) 88 | -------------------------------------------------------------------------------- /ResizableLib/ResizableGrip.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // 3 | // This file is part of ResizableLib 4 | // https://github.com/ppescher/resizablelib 5 | // 6 | // Copyright (C) 2000-2024 by Paolo Messina 7 | // mailto:ppescher@hotmail.com 8 | // 9 | // The contents of this file are subject to the Artistic License 2.0 10 | // http://opensource.org/licenses/Artistic-2.0 11 | // 12 | // If you find this code useful, credits would be nice! 13 | // 14 | ///////////////////////////////////////////////////////////////////////////// 15 | 16 | /*! 17 | * @file 18 | * @brief Interface for the CResizableGrip class. 19 | */ 20 | 21 | #if !defined(AFX_RESIZABLEGRIP_H__INCLUDED_) 22 | #define AFX_RESIZABLEGRIP_H__INCLUDED_ 23 | 24 | #if _MSC_VER > 1000 25 | #pragma once 26 | #endif // _MSC_VER > 1000 27 | 28 | /*! @addtogroup CoreComponents 29 | * @{ 30 | */ 31 | 32 | //! @brief brief_description 33 | /*! 34 | * long_description 35 | */ 36 | class CResizableGrip 37 | { 38 | private: 39 | class CSizeGrip : public CScrollBar 40 | { 41 | public: 42 | CSizeGrip() 43 | : m_size() 44 | { 45 | m_bTransparent = FALSE; 46 | m_bTriangular = FALSE; 47 | } 48 | 49 | void SetTriangularShape(BOOL bEnable); 50 | void SetTransparency(BOOL bActivate); 51 | 52 | BOOL IsRTL(); // right-to-left layout support 53 | 54 | virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); 55 | 56 | SIZE m_size; // holds grip size 57 | 58 | protected: 59 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 60 | 61 | BOOL m_bTriangular; // triangular shape active 62 | BOOL m_bTransparent; // transparency active 63 | 64 | // memory DCs and bitmaps for transparent grip 65 | CDC m_dcGrip, m_dcMask; 66 | CBitmap m_bmGrip, m_bmMask; 67 | }; 68 | 69 | CSizeGrip m_wndGrip; // grip control 70 | int m_nShowCount; // support for hiding the grip 71 | 72 | protected: 73 | // create a size grip, with options 74 | BOOL CreateSizeGrip(BOOL bVisible = TRUE, 75 | BOOL bTriangular = TRUE, BOOL bTransparent = FALSE); 76 | 77 | BOOL IsSizeGripVisible() const; // TRUE if grip is set to be visible 78 | void SetSizeGripVisibility(BOOL bVisible); // set default visibility 79 | void UpdateSizeGrip(); // update the grip's visibility and position 80 | void ShowSizeGrip(DWORD* pStatus, DWORD dwMask = 1); // temp show the size grip 81 | void HideSizeGrip(DWORD* pStatus, DWORD dwMask = 1); // temp hide the size grip 82 | BOOL SetSizeGripBkMode(int nBkMode); // like CDC::SetBkMode 83 | void SetSizeGripShape(BOOL bTriangular); 84 | CWnd* GetSizeGripWnd() { return &m_wndGrip; } 85 | 86 | virtual CWnd* GetResizableWnd() const = 0; 87 | 88 | public: 89 | CResizableGrip(); 90 | virtual ~CResizableGrip(); 91 | }; 92 | 93 | // @} 94 | #endif // !defined(AFX_RESIZABLEGRIP_H__INCLUDED_) 95 | -------------------------------------------------------------------------------- /ResizableLib/ResizableLib.dox: -------------------------------------------------------------------------------- 1 | PROJECT_EXPLORATION=1 2 | FORCE_HTML=1 3 | FORCE_HTML_HELP=1 4 | TEMPLATES_PATH=.\Docs 5 | 6 | -------------------------------------------------------------------------------- /ResizableLib/ResizableLib.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "ResizableLib"=.\ResizableLib.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /ResizableLib/ResizableMDIChild.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_RESIZABLEMDICHILD_H__INCLUDED_) 2 | #define AFX_RESIZABLEMDICHILD_H__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // ResizableMDIChild.h : header file 8 | // 9 | ///////////////////////////////////////////////////////////////////////////// 10 | // 11 | // This file is part of ResizableLib 12 | // https://github.com/ppescher/resizablelib 13 | // 14 | // Copyright (C) 2000-2024 by Paolo Messina 15 | // mailto:ppescher@hotmail.com 16 | // 17 | // The contents of this file are subject to the Artistic License 2.0 18 | // http://opensource.org/licenses/Artistic-2.0 19 | // 20 | // If you find this code useful, credits would be nice! 21 | // 22 | ///////////////////////////////////////////////////////////////////////////// 23 | 24 | #include "ResizableMinMax.h" 25 | #include "ResizableWndState.h" 26 | #include "ResizableLayout.h" 27 | 28 | ///////////////////////////////////////////////////////////////////////////// 29 | // CResizableMDIChild frame 30 | 31 | class CResizableMDIChild : public CMDIChildWnd, public CResizableMinMax, 32 | public CResizableWndState, public CResizableLayout 33 | { 34 | DECLARE_DYNCREATE(CResizableMDIChild) 35 | protected: 36 | CResizableMDIChild(); // protected constructor used by dynamic creation 37 | 38 | // Attributes 39 | public: 40 | 41 | // Operations 42 | public: 43 | 44 | // Overrides 45 | // ClassWizard generated virtual function overrides 46 | //{{AFX_VIRTUAL(CResizableMDIChild) 47 | protected: 48 | virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); 49 | //}}AFX_VIRTUAL 50 | 51 | // Implementation 52 | protected: 53 | virtual ~CResizableMDIChild(); 54 | 55 | BOOL EnableSaveRestore(LPCTSTR pszSection, BOOL bRectOnly = FALSE); 56 | 57 | virtual CWnd* GetResizableWnd() const 58 | { 59 | // make the layout know its parent window 60 | return CWnd::FromHandle(m_hWnd); 61 | }; 62 | 63 | private: 64 | // flags 65 | BOOL m_bEnableSaveRestore; 66 | BOOL m_bRectOnly; 67 | 68 | // internal status 69 | CString m_sSection; // section name (identifies a parent window) 70 | 71 | protected: 72 | // Generated message map functions 73 | //{{AFX_MSG(CResizableMDIChild) 74 | afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); 75 | afx_msg void OnSize(UINT nType, int cx, int cy); 76 | afx_msg void OnDestroy(); 77 | afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct); 78 | //}}AFX_MSG 79 | DECLARE_MESSAGE_MAP() 80 | }; 81 | 82 | ///////////////////////////////////////////////////////////////////////////// 83 | 84 | //{{AFX_INSERT_LOCATION}} 85 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 86 | 87 | #endif // !defined(AFX_RESIZABLEMDICHILD_H__INCLUDED_) 88 | -------------------------------------------------------------------------------- /ResizableLib/ResizableMDIFrame.h: -------------------------------------------------------------------------------- 1 | // ResizableMDIFrame.h : header file 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | // 5 | // This file is part of ResizableLib 6 | // https://github.com/ppescher/resizablelib 7 | // 8 | // Copyright (C) 2000-2024 by Paolo Messina 9 | // mailto:ppescher@hotmail.com 10 | // 11 | // The contents of this file are subject to the Artistic License 2.0 12 | // http://opensource.org/licenses/Artistic-2.0 13 | // 14 | // If you find this code useful, credits would be nice! 15 | // 16 | ///////////////////////////////////////////////////////////////////////////// 17 | 18 | #if !defined(AFX_RESIZABLEMDIFRAME_H__INCLUDED_) 19 | #define AFX_RESIZABLEMDIFRAME_H__INCLUDED_ 20 | 21 | #if _MSC_VER > 1000 22 | #pragma once 23 | #endif // _MSC_VER > 1000 24 | 25 | #include "ResizableMinMax.h" 26 | #include "ResizableWndState.h" 27 | #include "ResizableLayout.h" 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | // CResizableMDIFrame frame 31 | 32 | class CResizableMDIFrame : public CMDIFrameWnd, public CResizableMinMax, 33 | public CResizableWndState, public CResizableLayout 34 | { 35 | DECLARE_DYNCREATE(CResizableMDIFrame) 36 | protected: 37 | CResizableMDIFrame(); // protected constructor used by dynamic creation 38 | 39 | // Attributes 40 | protected: 41 | 42 | // Operations 43 | public: 44 | 45 | // Overrides 46 | // ClassWizard generated virtual function overrides 47 | //{{AFX_VIRTUAL(CResizableMDIFrame) 48 | protected: 49 | virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); 50 | //}}AFX_VIRTUAL 51 | 52 | // Implementation 53 | protected: 54 | virtual ~CResizableMDIFrame(); 55 | 56 | BOOL EnableSaveRestore(LPCTSTR pszSection, BOOL bRectOnly = FALSE); 57 | 58 | virtual CWnd* GetResizableWnd() const 59 | { 60 | // make the layout know its parent window 61 | return CWnd::FromHandle(m_hWnd); 62 | }; 63 | 64 | private: 65 | // flags 66 | BOOL m_bEnableSaveRestore; 67 | BOOL m_bRectOnly; 68 | 69 | // internal status 70 | CString m_sSection; // section name (identifies a parent window) 71 | 72 | protected: 73 | // Generated message map functions 74 | //{{AFX_MSG(CResizableMDIFrame) 75 | afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); 76 | afx_msg void OnDestroy(); 77 | afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct); 78 | afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos); 79 | //}}AFX_MSG 80 | DECLARE_MESSAGE_MAP() 81 | }; 82 | 83 | ///////////////////////////////////////////////////////////////////////////// 84 | 85 | //{{AFX_INSERT_LOCATION}} 86 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 87 | 88 | #endif // !defined(AFX_RESIZABLEMDIFRAME_H__INCLUDED_) 89 | -------------------------------------------------------------------------------- /ResizableLib/ResizableMinMax.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // 3 | // This file is part of ResizableLib 4 | // https://github.com/ppescher/resizablelib 5 | // 6 | // Copyright (C) 2000-2024 by Paolo Messina 7 | // mailto:ppescher@hotmail.com 8 | // 9 | // The contents of this file are subject to the Artistic License 2.0 10 | // http://opensource.org/licenses/Artistic-2.0 11 | // 12 | // If you find this code useful, credits would be nice! 13 | // 14 | ///////////////////////////////////////////////////////////////////////////// 15 | 16 | /*! 17 | * @file 18 | * @brief Interface for the CResizableMinMax class. 19 | */ 20 | 21 | #if !defined(AFX_RESIZABLEMINMAX_H__INCLUDED_) 22 | #define AFX_RESIZABLEMINMAX_H__INCLUDED_ 23 | 24 | #if _MSC_VER > 1000 25 | #pragma once 26 | #endif // _MSC_VER > 1000 27 | 28 | /*! @addtogroup CoreComponents 29 | * @{ 30 | */ 31 | 32 | //! @brief brief_description 33 | /*! 34 | * long_description 35 | */ 36 | class CResizableMinMax 37 | { 38 | // Attributes 39 | private: 40 | // flags 41 | BOOL m_bUseMaxTrack; 42 | BOOL m_bUseMinTrack; 43 | BOOL m_bUseMaxRect; 44 | 45 | POINT m_ptMinTrackSize; // min tracking size 46 | POINT m_ptMaxTrackSize; // max tracking size 47 | POINT m_ptMaxPos; // maximized position 48 | POINT m_ptMaxSize; // maximized size 49 | 50 | public: 51 | CResizableMinMax(); 52 | virtual ~CResizableMinMax(); 53 | 54 | protected: 55 | static void ApplyMinMaxTrackSize(LPMINMAXINFO lpMMI); 56 | 57 | void MinMaxInfo(LPMINMAXINFO lpMMI) const; 58 | static void ChainMinMaxInfo(LPMINMAXINFO lpMMI, CWnd* pParentFrame, const CWnd* pWnd); 59 | 60 | static void ChainMinMaxInfo(LPMINMAXINFO lpMMI, HWND hWndChild, const CSize& sizeExtra); 61 | 62 | static void ChainMinMaxInfo(LPMINMAXINFO lpMMI, const CWnd* pParentWnd, UINT nID, const CSize& sizeExtra) 63 | { 64 | ChainMinMaxInfo(lpMMI, 65 | ::GetDlgItem(pParentWnd->GetSafeHwnd(), nID), sizeExtra); 66 | } 67 | 68 | void ChainMinMaxInfoCB(LPMINMAXINFO lpMMI, HWND hWndChild); 69 | virtual BOOL CalcSizeExtra(HWND hWndChild, const CSize& sizeChild, CSize& sizeExtra); 70 | 71 | void ResetAllRects(); 72 | 73 | void SetMaximizedRect(const CRect& rc); // set window rect when maximized 74 | void ResetMaximizedRect(); // reset to default maximized rect 75 | void SetMinTrackSize(const CSize& size); // set minimum tracking size 76 | void ResetMinTrackSize(); // reset to default minimum tracking size 77 | void SetMaxTrackSize(const CSize& size); // set maximum tracking size 78 | void ResetMaxTrackSize(); // reset to default maximum tracking size 79 | }; 80 | 81 | // @} 82 | #endif // !defined(AFX_RESIZABLEMINMAX_H__INCLUDED_) 83 | -------------------------------------------------------------------------------- /ResizableLib/ResizableMsgSupport.cpp: -------------------------------------------------------------------------------- 1 | // ResizableMsgSupport.cpp: support messages for custom resizable wnds 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | // 5 | // This file is part of ResizableLib 6 | // https://github.com/ppescher/resizablelib 7 | // 8 | // Copyright (C) 2000-2024 by Paolo Messina 9 | // mailto:ppescher@hotmail.com 10 | // 11 | // The contents of this file are subject to the Artistic License 2.0 12 | // http://opensource.org/licenses/Artistic-2.0 13 | // 14 | // If you find this code useful, credits would be nice! 15 | // 16 | ///////////////////////////////////////////////////////////////////////////// 17 | 18 | #include "stdafx.h" 19 | #include "ResizableMsgSupport.h" 20 | 21 | #ifdef _DEBUG 22 | #define new DEBUG_NEW 23 | #undef THIS_FILE 24 | static char THIS_FILE[] = __FILE__; 25 | #endif 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | // Registered message to communicate with the library 29 | 30 | // static initializer must be called before user code 31 | #pragma warning(disable:4073) 32 | #pragma init_seg(lib) 33 | 34 | const UINT WMU_RESIZESUPPORT = ::RegisterWindowMessage(TEXT("WMU_RESIZESUPPORT")); 35 | 36 | -------------------------------------------------------------------------------- /ResizableLib/ResizablePage.cpp: -------------------------------------------------------------------------------- 1 | // ResizablePage.cpp : implementation file 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | // 5 | // This file is part of ResizableLib 6 | // https://github.com/ppescher/resizablelib 7 | // 8 | // Copyright (C) 2000-2024 by Paolo Messina 9 | // mailto:ppescher@hotmail.com 10 | // 11 | // The contents of this file are subject to the Artistic License 2.0 12 | // http://opensource.org/licenses/Artistic-2.0 13 | // 14 | // If you find this code useful, credits would be nice! 15 | // 16 | ///////////////////////////////////////////////////////////////////////////// 17 | 18 | #include "stdafx.h" 19 | #include "ResizablePage.h" 20 | 21 | #ifdef _DEBUG 22 | #define new DEBUG_NEW 23 | #undef THIS_FILE 24 | static char THIS_FILE[] = __FILE__; 25 | #endif 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | // CResizablePage 29 | 30 | IMPLEMENT_DYNCREATE(CResizablePage, CPropertyPage) 31 | 32 | CResizablePage::CResizablePage() 33 | { 34 | } 35 | 36 | CResizablePage::CResizablePage(UINT nIDTemplate, UINT nIDCaption) 37 | : CPropertyPage(nIDTemplate, nIDCaption) 38 | { 39 | } 40 | 41 | CResizablePage::CResizablePage(LPCTSTR lpszTemplateName, UINT nIDCaption) 42 | : CPropertyPage(lpszTemplateName, nIDCaption) 43 | { 44 | } 45 | 46 | CResizablePage::~CResizablePage() 47 | { 48 | } 49 | 50 | 51 | BEGIN_MESSAGE_MAP(CResizablePage, CPropertyPage) 52 | //{{AFX_MSG_MAP(CResizablePage) 53 | ON_WM_SIZE() 54 | ON_WM_ERASEBKGND() 55 | ON_WM_GETMINMAXINFO() 56 | ON_WM_DESTROY() 57 | //}}AFX_MSG_MAP 58 | END_MESSAGE_MAP() 59 | 60 | 61 | ///////////////////////////////////////////////////////////////////////////// 62 | // CResizablePage message handlers 63 | 64 | void CResizablePage::OnSize(UINT nType, int cx, int cy) 65 | { 66 | CWnd::OnSize(nType, cx, cy); 67 | 68 | ArrangeLayout(); 69 | } 70 | 71 | BOOL CResizablePage::OnEraseBkgnd(CDC* pDC) 72 | { 73 | ClipChildren(pDC, FALSE); 74 | 75 | BOOL bRet = CPropertyPage::OnEraseBkgnd(pDC); 76 | 77 | ClipChildren(pDC, TRUE); 78 | 79 | return bRet; 80 | } 81 | 82 | void CResizablePage::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) 83 | { 84 | MinMaxInfo(lpMMI); 85 | } 86 | 87 | BOOL CResizablePage::OnInitDialog() 88 | { 89 | CPropertyPage::OnInitDialog(); 90 | 91 | // set the initial size as the min track size 92 | CRect rc; 93 | GetWindowRect(&rc); 94 | SetMinTrackSize(rc.Size()); 95 | 96 | return TRUE; // return TRUE unless you set the focus to a control 97 | // EXCEPTION: OCX Property Pages should return FALSE 98 | } 99 | 100 | void CResizablePage::OnDestroy() 101 | { 102 | // remove child windows 103 | RemoveAllAnchors(); 104 | ResetAllRects(); 105 | 106 | CPropertyPage::OnDestroy(); 107 | } 108 | 109 | LRESULT CResizablePage::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) 110 | { 111 | if (message != WM_NCCALCSIZE || wParam == 0) 112 | return CPropertyPage::WindowProc(message, wParam, lParam); 113 | 114 | LRESULT lResult = 0; 115 | HandleNcCalcSize(FALSE, (LPNCCALCSIZE_PARAMS)lParam, lResult); 116 | lResult = CPropertyPage::WindowProc(message, wParam, lParam); 117 | HandleNcCalcSize(TRUE, (LPNCCALCSIZE_PARAMS)lParam, lResult); 118 | return lResult; 119 | } 120 | -------------------------------------------------------------------------------- /ResizableLib/ResizablePage.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_RESIZABLEPAGE_H__INCLUDED_) 2 | #define AFX_RESIZABLEPAGE_H__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | 8 | // ResizablePage.h : header file 9 | // 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // 12 | // This file is part of ResizableLib 13 | // https://github.com/ppescher/resizablelib 14 | // 15 | // Copyright (C) 2000-2024 by Paolo Messina 16 | // mailto:ppescher@hotmail.com 17 | // 18 | // The contents of this file are subject to the Artistic License 2.0 19 | // http://opensource.org/licenses/Artistic-2.0 20 | // 21 | // If you find this code useful, credits would be nice! 22 | // 23 | ///////////////////////////////////////////////////////////////////////////// 24 | 25 | #include "ResizableLayout.h" 26 | #include "ResizableMinMax.h" 27 | 28 | ///////////////////////////////////////////////////////////////////////////// 29 | // CResizablePage window 30 | 31 | class CResizablePage : public CPropertyPage, public CResizableLayout, 32 | public CResizableMinMax 33 | { 34 | DECLARE_DYNCREATE(CResizablePage) 35 | 36 | // Construction 37 | public: 38 | CResizablePage(); 39 | explicit CResizablePage(UINT nIDTemplate, UINT nIDCaption = 0); 40 | explicit CResizablePage(LPCTSTR lpszTemplateName, UINT nIDCaption = 0); 41 | 42 | // Attributes 43 | 44 | // Operations 45 | 46 | // Overrides 47 | virtual BOOL OnInitDialog(); 48 | // ClassWizard generated virtual function overrides 49 | //{{AFX_VIRTUAL(CResizablePage) 50 | protected: 51 | virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); 52 | //}}AFX_VIRTUAL 53 | 54 | // Implementation 55 | public: 56 | virtual ~CResizablePage(); 57 | 58 | // callable from derived classes 59 | protected: 60 | 61 | virtual CWnd* GetResizableWnd() const 62 | { 63 | // make the layout know its parent window 64 | return CWnd::FromHandle(m_hWnd); 65 | }; 66 | 67 | // Generated message map functions 68 | //{{AFX_MSG(CResizablePage) 69 | afx_msg void OnSize(UINT nType, int cx, int cy); 70 | afx_msg BOOL OnEraseBkgnd(CDC* pDC); 71 | afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); 72 | afx_msg void OnDestroy(); 73 | //}}AFX_MSG 74 | DECLARE_MESSAGE_MAP() 75 | }; 76 | 77 | ///////////////////////////////////////////////////////////////////////////// 78 | 79 | //{{AFX_INSERT_LOCATION}} 80 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 81 | 82 | #endif // !defined(AFX_RESIZABLEPAGE_H__INCLUDED_) 83 | -------------------------------------------------------------------------------- /ResizableLib/ResizablePageEx.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_RESIZABLEPAGEEX_H__INCLUDED_) 2 | #define AFX_RESIZABLEPAGEEX_H__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | 8 | // ResizablePageEx.h : header file 9 | // 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // 12 | // This file is part of ResizableLib 13 | // https://github.com/ppescher/resizablelib 14 | // 15 | // Copyright (C) 2000-2024 by Paolo Messina 16 | // mailto:ppescher@hotmail.com 17 | // 18 | // The contents of this file are subject to the Artistic License 2.0 19 | // http://opensource.org/licenses/Artistic-2.0 20 | // 21 | // If you find this code useful, credits would be nice! 22 | // 23 | ///////////////////////////////////////////////////////////////////////////// 24 | 25 | #include "ResizableLayout.h" 26 | #include "ResizableMinMax.h" 27 | 28 | ///////////////////////////////////////////////////////////////////////////// 29 | // CResizablePageEx window 30 | 31 | class CResizablePageEx : public CPropertyPageEx, public CResizableLayout, 32 | public CResizableMinMax 33 | { 34 | DECLARE_DYNCREATE(CResizablePageEx) 35 | 36 | // Construction 37 | public: 38 | CResizablePageEx(); 39 | explicit CResizablePageEx(UINT nIDTemplate, UINT nIDCaption = 0, UINT nIDHeaderTitle = 0, UINT nIDHeaderSubTitle = 0); 40 | explicit CResizablePageEx(LPCTSTR lpszTemplateName, UINT nIDCaption = 0, UINT nIDHeaderTitle = 0, UINT nIDHeaderSubTitle = 0); 41 | 42 | // Attributes 43 | public: 44 | 45 | // Operations 46 | public: 47 | 48 | // Overrides 49 | virtual BOOL OnInitDialog(); 50 | // ClassWizard generated virtual function overrides 51 | //{{AFX_VIRTUAL(CResizablePageEx) 52 | protected: 53 | virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); 54 | //}}AFX_VIRTUAL 55 | 56 | // Implementation 57 | public: 58 | virtual ~CResizablePageEx(); 59 | 60 | // callable from derived classes 61 | protected: 62 | 63 | virtual CWnd* GetResizableWnd() const 64 | { 65 | // make the layout know its parent window 66 | return CWnd::FromHandle(m_hWnd); 67 | }; 68 | 69 | // Generated message map functions 70 | protected: 71 | //{{AFX_MSG(CResizablePageEx) 72 | afx_msg void OnSize(UINT nType, int cx, int cy); 73 | afx_msg BOOL OnEraseBkgnd(CDC* pDC); 74 | afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); 75 | afx_msg void OnDestroy(); 76 | afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); 77 | //}}AFX_MSG 78 | DECLARE_MESSAGE_MAP() 79 | }; 80 | 81 | ///////////////////////////////////////////////////////////////////////////// 82 | 83 | //{{AFX_INSERT_LOCATION}} 84 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 85 | 86 | #endif // !defined(AFX_RESIZABLEPAGEEX_H__INCLUDED_) 87 | -------------------------------------------------------------------------------- /ResizableLib/ResizableSheetState.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // 3 | // This file is part of ResizableLib 4 | // https://github.com/ppescher/resizablelib 5 | // 6 | // Copyright (C) 2000-2024 by Paolo Messina 7 | // mailto:ppescher@hotmail.com 8 | // 9 | // The contents of this file are subject to the Artistic License 2.0 10 | // http://opensource.org/licenses/Artistic-2.0 11 | // 12 | // If you find this code useful, credits would be nice! 13 | // 14 | ///////////////////////////////////////////////////////////////////////////// 15 | 16 | /*! 17 | * @file 18 | * @brief Implementation of the CResizableSheetState class. 19 | */ 20 | 21 | #include "stdafx.h" 22 | #include "ResizableSheetState.h" 23 | 24 | ////////////////////////////////////////////////////////////////////// 25 | // Construction/Destruction 26 | ////////////////////////////////////////////////////////////////////// 27 | 28 | CResizableSheetState::CResizableSheetState() 29 | { 30 | 31 | } 32 | 33 | CResizableSheetState::~CResizableSheetState() 34 | { 35 | 36 | } 37 | 38 | // used to save/restore active page 39 | // either in the registry or a private .INI file 40 | // depending on your application settings 41 | 42 | #define ACTIVEPAGE_ENT _T("ActivePage") 43 | 44 | /*! 45 | * This function saves the current property sheet active page using the base 46 | * class persist method. 47 | * @sa CResizableState::WriteState 48 | * 49 | * @param pszName String that identifies stored settings 50 | * 51 | * @return Returns @a TRUE if successful, @a FALSE otherwise 52 | */ 53 | BOOL CResizableSheetState::SavePage(LPCTSTR pszName) 54 | { 55 | // saves active page index, or the initial page if problems 56 | // cannot use GetActivePage, because it always fails 57 | 58 | const CPropertySheet* pSheet = DYNAMIC_DOWNCAST(CPropertySheet, GetResizableWnd()); 59 | if (pSheet == NULL) 60 | return FALSE; 61 | 62 | const CTabCtrl *pTab = pSheet->GetTabControl(); 63 | int page = (pTab != NULL) ? pTab->GetCurSel() : pSheet->m_psh.nStartPage; 64 | 65 | if (page < 0) 66 | page = pSheet->m_psh.nStartPage; 67 | 68 | CString data; 69 | data.Format(_T("%i"), page); 70 | 71 | return WriteState(CString(pszName) + ACTIVEPAGE_ENT, data); 72 | } 73 | 74 | /*! 75 | * This function loads the active page using the base class persist method. 76 | * @sa CResizableState::ReadState 77 | * 78 | * @param pszName String that identifies stored settings 79 | * 80 | * @return Returns @a TRUE if successful, @a FALSE otherwise 81 | */ 82 | BOOL CResizableSheetState::LoadPage(LPCTSTR pszName) 83 | { 84 | // restore active page, zero (the first) if not found 85 | 86 | CString data; 87 | if (!ReadState(CString(pszName) + ACTIVEPAGE_ENT, data)) 88 | return FALSE; 89 | 90 | CPropertySheet* pSheet = DYNAMIC_DOWNCAST(CPropertySheet, GetResizableWnd()); 91 | 92 | return (pSheet != NULL) && pSheet->SetActivePage(_ttoi(data)); 93 | } 94 | -------------------------------------------------------------------------------- /ResizableLib/ResizableSheetState.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // 3 | // This file is part of ResizableLib 4 | // https://github.com/ppescher/resizablelib 5 | // 6 | // Copyright (C) 2000-2024 by Paolo Messina 7 | // mailto:ppescher@hotmail.com 8 | // 9 | // The contents of this file are subject to the Artistic License 2.0 10 | // http://opensource.org/licenses/Artistic-2.0 11 | // 12 | // If you find this code useful, credits would be nice! 13 | // 14 | ///////////////////////////////////////////////////////////////////////////// 15 | 16 | /*! 17 | * @file 18 | * @brief Interface for the CResizableSheetState class. 19 | */ 20 | 21 | #if !defined(AFX_RESIZABLESHEETSTATE_H__INCLUDED_) 22 | #define AFX_RESIZABLESHEETSTATE_H__INCLUDED_ 23 | 24 | #if _MSC_VER > 1000 25 | #pragma once 26 | #endif // _MSC_VER > 1000 27 | 28 | #include "ResizableWndState.h" 29 | 30 | /*! @addtogroup CoreComponents 31 | * @{ 32 | */ 33 | 34 | //! @brief Persists active page in property sheets or wizard dialogs 35 | /*! 36 | * Derive from this class when you want to persist the active page 37 | * in property sheets or wizard dialogs. 38 | * This class is used in the provided resizable counterparts of 39 | * the standard MFC property sheet classes. 40 | */ 41 | class CResizableSheetState : public CResizableWndState 42 | { 43 | protected: 44 | 45 | //! @brief Load and set the active property page 46 | BOOL LoadPage(LPCTSTR pszName); 47 | 48 | //! @brief Save the current active property page 49 | BOOL SavePage(LPCTSTR pszName); 50 | 51 | //! @brief Override to provide the parent window 52 | virtual CWnd* GetResizableWnd() const = 0; 53 | 54 | public: 55 | CResizableSheetState(); 56 | virtual ~CResizableSheetState(); 57 | }; 58 | 59 | // @} 60 | #endif // !defined(AFX_RESIZABLESHEETSTATE_H__INCLUDED_) 61 | -------------------------------------------------------------------------------- /ResizableLib/ResizableSplitterWnd.h: -------------------------------------------------------------------------------- 1 | // ResizableSplitterWnd.h : header file 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | // 5 | // This file is part of ResizableLib 6 | // https://github.com/ppescher/resizablelib 7 | // 8 | // Copyright (C) 2000-2024 by Paolo Messina 9 | // mailto:ppescher@hotmail.com 10 | // 11 | // The contents of this file are subject to the Artistic License 2.0 12 | // http://opensource.org/licenses/Artistic-2.0 13 | // 14 | // If you find this code useful, credits would be nice! 15 | // 16 | ///////////////////////////////////////////////////////////////////////////// 17 | 18 | #if !defined(AFX_RESIZABLESPLITTERWND_H__INCLUDED_) 19 | #define AFX_RESIZABLESPLITTERWND_H__INCLUDED_ 20 | 21 | #if _MSC_VER > 1000 22 | #pragma once 23 | #endif // _MSC_VER > 1000 24 | 25 | #include "ResizableMinMax.h" 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | // CResizableSplitterWnd frame with splitter 29 | 30 | class CResizableSplitterWnd : public CSplitterWnd, public CResizableMinMax 31 | { 32 | DECLARE_DYNAMIC(CResizableSplitterWnd) 33 | 34 | // Construction 35 | public: 36 | CResizableSplitterWnd(); 37 | 38 | // Attributes 39 | public: 40 | 41 | // Operations 42 | public: 43 | 44 | // Overrides 45 | // ClassWizard generated virtual function overrides 46 | //{{AFX_VIRTUAL(CResizableSplitterWnd) 47 | protected: 48 | //}}AFX_VIRTUAL 49 | 50 | // Implementation 51 | public: 52 | virtual ~CResizableSplitterWnd(); 53 | 54 | // Generated message map functions 55 | //{{AFX_MSG(CResizableSplitterWnd) 56 | afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); 57 | //}}AFX_MSG 58 | DECLARE_MESSAGE_MAP() 59 | }; 60 | 61 | ///////////////////////////////////////////////////////////////////////////// 62 | 63 | //{{AFX_INSERT_LOCATION}} 64 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 65 | 66 | #endif // !defined(AFX_RESIZABLESPLITTERWND_H__INCLUDED_) 67 | -------------------------------------------------------------------------------- /ResizableLib/ResizableState.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // 3 | // This file is part of ResizableLib 4 | // https://github.com/ppescher/resizablelib 5 | // 6 | // Copyright (C) 2000-2024 by Paolo Messina 7 | // mailto:ppescher@hotmail.com 8 | // 9 | // The contents of this file are subject to the Artistic License 2.0 10 | // http://opensource.org/licenses/Artistic-2.0 11 | // 12 | // If you find this code useful, credits would be nice! 13 | // 14 | ///////////////////////////////////////////////////////////////////////////// 15 | 16 | /*! 17 | * @file 18 | * @brief Interface for the CResizableState class. 19 | */ 20 | 21 | #if !defined(AFX_RESIZABLESTATE_H__INCLUDED_) 22 | #define AFX_RESIZABLESTATE_H__INCLUDED_ 23 | 24 | #if _MSC_VER > 1000 25 | #pragma once 26 | #endif // _MSC_VER > 1000 27 | 28 | /*! @addtogroup CoreComponents 29 | * @{ 30 | */ 31 | 32 | //! @brief Provides basic persisting capabilities 33 | /*! 34 | * Derive from this class to persist user interface settings, or anything 35 | * suitable. The base implementation uses the application profile, which can 36 | * be set to either the Registry or an INI File. Other storing methods 37 | * can be implemented in derived classes. 38 | */ 39 | class CResizableState 40 | { 41 | static LPCTSTR m_sDefaultStorePath; 42 | CString m_sStorePath; 43 | 44 | protected: 45 | 46 | //! @brief Get default path where state is stored 47 | static LPCTSTR GetDefaultStateStore(); 48 | 49 | //! @brief Set default path where state is stored 50 | static void SetDefaultStateStore(LPCTSTR szPath); 51 | 52 | //! @brief Get current path where state is stored 53 | LPCTSTR GetStateStore() const; 54 | 55 | //! @brief Set current path where state is stored 56 | void SetStateStore(LPCTSTR szPath); 57 | 58 | //! @name Overridables 59 | //@{ 60 | 61 | //! @brief Read state information 62 | virtual BOOL ReadState(LPCTSTR szId, CString& rsState); 63 | 64 | //! @brief Write state information 65 | virtual BOOL WriteState(LPCTSTR szId, LPCTSTR szState); 66 | 67 | //@} 68 | 69 | public: 70 | CResizableState(); 71 | virtual ~CResizableState(); 72 | }; 73 | 74 | // @} 75 | #endif // !defined(AFX_RESIZABLESTATE_H__INCLUDED_) 76 | -------------------------------------------------------------------------------- /ResizableLib/ResizableVersion.h: -------------------------------------------------------------------------------- 1 | // ResizableVersion.h: interface for the CResizableVersion class. 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | // 5 | // This file is part of ResizableLib 6 | // https://github.com/ppescher/resizablelib 7 | // 8 | // Copyright (C) 2000-2024 by Paolo Messina 9 | // mailto:ppescher@hotmail.com 10 | // 11 | // The contents of this file are subject to the Artistic License 2.0 12 | // http://opensource.org/licenses/Artistic-2.0 13 | // 14 | // If you find this code useful, credits would be nice! 15 | // 16 | ///////////////////////////////////////////////////////////////////////////// 17 | 18 | #if !defined(AFX_RESIZABLEVERSION_H__INCLUDED_) 19 | #define AFX_RESIZABLEVERSION_H__INCLUDED_ 20 | 21 | #if _MSC_VER > 1000 22 | #pragma once 23 | #endif // _MSC_VER > 1000 24 | 25 | // global variables that hold actual version numbers 26 | // retrieved and adapted at run-time to be equivalent 27 | // to preprocessor macros that set the target platform 28 | 29 | extern DWORD realWINVER; 30 | 31 | #ifdef _WIN32_WINDOWS 32 | extern DWORD real_WIN32_WINDOWS; 33 | #endif 34 | 35 | #ifdef _WIN32_WINNT 36 | extern DWORD real_WIN32_WINNT; 37 | #endif 38 | 39 | #ifdef _WIN32_IE 40 | extern DWORD real_WIN32_IE; 41 | #endif 42 | 43 | extern DWORD real_ThemeSettings; 44 | 45 | // called automatically by a static initializer 46 | // (if not appropriate can be called later) 47 | // to setup global version numbers 48 | 49 | void InitRealVersions(); 50 | 51 | // check for visual style settings 52 | 53 | void InitThemeSettings(); 54 | 55 | #endif // !defined(AFX_RESIZABLEVERSION_H__INCLUDED_) 56 | -------------------------------------------------------------------------------- /ResizableLib/ResizableWndState.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // 3 | // This file is part of ResizableLib 4 | // http://sourceforge.net/projects/resizablelib 5 | // 6 | // Copyright (C) 2000-2004 by Paolo Messina 7 | // http://www.geocities.com/ppescher - mailto:ppescher@hotmail.com 8 | // 9 | // The contents of this file are subject to the Artistic License (the "License"). 10 | // You may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at: 12 | // http://www.opensource.org/licenses/artistic-license.html 13 | // 14 | // If you find this code useful, credits would be nice! 15 | // 16 | ///////////////////////////////////////////////////////////////////////////// 17 | 18 | /*! 19 | * @file 20 | * @brief Interface for the CResizableWndState class. 21 | */ 22 | 23 | #if !defined(AFX_RESIZABLEWNDSTATE_H__INCLUDED_) 24 | #define AFX_RESIZABLEWNDSTATE_H__INCLUDED_ 25 | 26 | #if _MSC_VER > 1000 27 | #pragma once 28 | #endif // _MSC_VER > 1000 29 | 30 | #include "ResizableState.h" 31 | 32 | /*! @addtogroup CoreComponents 33 | * @{ 34 | */ 35 | 36 | //! @brief Persists window position, size and state 37 | /*! 38 | * Derive from this class when you want to persist the size, position and 39 | * minimized/maximized state of top level windows. 40 | * This class is used in the provided resizable counterparts of 41 | * the standard MFC window and dialog classes. 42 | */ 43 | class CResizableWndState : public CResizableState 44 | { 45 | protected: 46 | 47 | //! @brief Load and set the window position and size 48 | BOOL LoadWindowRect(LPCTSTR pszName, BOOL bRectOnly); 49 | 50 | //! @brief Save the current window position and size 51 | BOOL SaveWindowRect(LPCTSTR pszName, BOOL bRectOnly); 52 | 53 | //! @brief Override to provide the parent window 54 | virtual CWnd* GetResizableWnd() const = 0; 55 | 56 | public: 57 | CResizableWndState(); 58 | virtual ~CResizableWndState(); 59 | }; 60 | 61 | // @} 62 | #endif // !defined(AFX_RESIZABLEWNDSTATE_H__INCLUDED_) 63 | -------------------------------------------------------------------------------- /ResizableLib/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // ResizableLib.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | -------------------------------------------------------------------------------- /ResizableLib/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, or project 2 | // specific include files that are used frequently, but are changed infrequently 3 | // 4 | ///////////////////////////////////////////////////////////////////////////// 5 | // 6 | // This file is part of ResizableLib 7 | // https://github.com/ppescher/resizablelib 8 | // 9 | // Copyright (C) 2000-2024 by Paolo Messina 10 | // mailto:ppescher@hotmail.com 11 | // 12 | // The contents of this file are subject to the Artistic License 2.0 13 | // http://opensource.org/licenses/Artistic-2.0 14 | // 15 | // If you find this code useful, credits would be nice! 16 | // 17 | ///////////////////////////////////////////////////////////////////////////// 18 | 19 | #if !defined(AFX_RESIZABLESTDAFX_H__INCLUDED_) 20 | #define AFX_RESIZABLESTDAFX_H__INCLUDED_ 21 | 22 | #if _MSC_VER > 1000 23 | #pragma once 24 | #endif // _MSC_VER > 1000 25 | 26 | // Set max target Windows platform 27 | #define WINVER 0x0501 28 | #define _WIN32_WINNT 0x0501 29 | 30 | // Use target Common Controls version for compatibility 31 | // with CPropertyPageEx, CPropertySheetEx 32 | #define _WIN32_IE 0x0500 33 | 34 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 35 | 36 | #include // MFC core and standard components 37 | #include // MFC extensions 38 | #include // MFC support for Windows Common Controls 39 | #include // DLL Version support 40 | #if _WIN32_WINNT >= 0x0501 41 | #include // Windows XP Visual Style API support 42 | #endif 43 | #include // Standard format specifier macros 44 | 45 | #ifndef WS_EX_LAYOUTRTL 46 | #pragma message("Please update your Windows header files, get the latest SDK") 47 | #pragma message("WinUser.h is out of date!") 48 | 49 | #define WS_EX_LAYOUTRTL 0x00400000 50 | #endif 51 | 52 | #ifndef WC_BUTTON 53 | #pragma message("Please update your Windows header files, get the latest SDK") 54 | #pragma message("CommCtrl.h is out of date!") 55 | 56 | #define WC_BUTTON TEXT("Button") 57 | #define WC_STATIC TEXT("Static") 58 | #define WC_EDIT TEXT("Edit") 59 | #define WC_LISTBOX TEXT("ListBox") 60 | #define WC_COMBOBOX TEXT("ComboBox") 61 | #define WC_SCROLLBAR TEXT("ScrollBar") 62 | #endif 63 | 64 | #define RSZLIB_NO_XP_DOUBLE_BUFFER 65 | 66 | //{{AFX_INSERT_LOCATION}} 67 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 68 | 69 | #endif // !defined(AFX_RESIZABLESTDAFX_H__INCLUDED_) 70 | -------------------------------------------------------------------------------- /ResizableProperties/Demo.cpp: -------------------------------------------------------------------------------- 1 | // Demo.cpp : Defines the class behaviors for the application. 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "Demo.h" 6 | #include "DemoDlg.h" 7 | 8 | #ifdef _DEBUG 9 | #define new DEBUG_NEW 10 | #undef THIS_FILE 11 | static char THIS_FILE[] = __FILE__; 12 | #endif 13 | 14 | ///////////////////////////////////////////////////////////////////////////// 15 | // CDemoApp 16 | 17 | BEGIN_MESSAGE_MAP(CDemoApp, CWinApp) 18 | //{{AFX_MSG_MAP(CDemoApp) 19 | // NOTE - the ClassWizard will add and remove mapping macros here. 20 | // DO NOT EDIT what you see in these blocks of generated code! 21 | //}}AFX_MSG 22 | END_MESSAGE_MAP() 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // CDemoApp construction 26 | 27 | CDemoApp::CDemoApp() 28 | { 29 | // TODO: add construction code here, 30 | // Place all significant initialization in InitInstance 31 | } 32 | 33 | ///////////////////////////////////////////////////////////////////////////// 34 | // The one and only CDemoApp object 35 | 36 | CDemoApp theApp; 37 | 38 | ///////////////////////////////////////////////////////////////////////////// 39 | // CDemoApp initialization 40 | 41 | BOOL CDemoApp::InitInstance() 42 | { 43 | // open the main dialog 44 | 45 | CDemoDlg dlg; 46 | m_pMainWnd = &dlg; 47 | dlg.DoModal(); 48 | 49 | // Since the dialog has been closed, return FALSE so that we exit the 50 | // application, rather than start the application's message pump. 51 | return FALSE; 52 | } 53 | -------------------------------------------------------------------------------- /ResizableProperties/Demo.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "Demo"=.\Demo.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | Begin Project Dependency 15 | Project_Dep_Name ResizableLib 16 | End Project Dependency 17 | }}} 18 | 19 | ############################################################################### 20 | 21 | Project: "ResizableLib"=..\ResizableLib\ResizableLib.dsp - Package Owner=<4> 22 | 23 | Package=<5> 24 | {{{ 25 | }}} 26 | 27 | Package=<4> 28 | {{{ 29 | }}} 30 | 31 | ############################################################################### 32 | 33 | Global: 34 | 35 | Package=<5> 36 | {{{ 37 | }}} 38 | 39 | Package=<3> 40 | {{{ 41 | }}} 42 | 43 | ############################################################################### 44 | 45 | -------------------------------------------------------------------------------- /ResizableProperties/Demo.h: -------------------------------------------------------------------------------- 1 | // Demo.h : main header file for the DEMO application 2 | // 3 | 4 | #if !defined(AFX_DEMO_H__F370EDC6_3EC9_11D4_9C0C_A4D231A8944A__INCLUDED_) 5 | #define AFX_DEMO_H__F370EDC6_3EC9_11D4_9C0C_A4D231A8944A__INCLUDED_ 6 | 7 | #if _MSC_VER > 1000 8 | #pragma once 9 | #endif // _MSC_VER > 1000 10 | 11 | #ifndef __AFXWIN_H__ 12 | #error include 'stdafx.h' before including this file for PCH 13 | #endif 14 | 15 | #include "resource.h" // main symbols 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // CDemoApp: 19 | // See Demo.cpp for the implementation of this class 20 | // 21 | 22 | class CDemoApp : public CWinApp 23 | { 24 | public: 25 | CDemoApp(); 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CDemoApp) 30 | public: 31 | virtual BOOL InitInstance(); 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | 36 | //{{AFX_MSG(CDemoApp) 37 | // NOTE - the ClassWizard will add and remove member functions here. 38 | // DO NOT EDIT what you see in these blocks of generated code ! 39 | //}}AFX_MSG 40 | DECLARE_MESSAGE_MAP() 41 | }; 42 | 43 | 44 | ///////////////////////////////////////////////////////////////////////////// 45 | 46 | //{{AFX_INSERT_LOCATION}} 47 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 48 | 49 | #endif // !defined(AFX_DEMO_H__F370EDC6_3EC9_11D4_9C0C_A4D231A8944A__INCLUDED_) 50 | -------------------------------------------------------------------------------- /ResizableProperties/Demo.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {c2e29fb3-ce45-4e0c-bbf4-a0ae3caa4d33} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {8f2e208d-5de2-4010-a304-1ec475b4bb9c} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {d7785c50-3f45-42aa-b000-6aef1d02a030} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Source Files 37 | 38 | 39 | 40 | 41 | Header Files 42 | 43 | 44 | Header Files 45 | 46 | 47 | Header Files 48 | 49 | 50 | Header Files 51 | 52 | 53 | Header Files 54 | 55 | 56 | Header Files 57 | 58 | 59 | 60 | 61 | Resource Files 62 | 63 | 64 | 65 | 66 | Resource Files 67 | 68 | 69 | -------------------------------------------------------------------------------- /ResizableProperties/DemoDlg.cpp: -------------------------------------------------------------------------------- 1 | // DemoDlg.cpp : implementation file 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "demo.h" 6 | #include "DemoDlg.h" 7 | 8 | 9 | #ifdef _DEBUG 10 | #define new DEBUG_NEW 11 | #undef THIS_FILE 12 | static char THIS_FILE[] = __FILE__; 13 | #endif 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // CDemoDlg dialog 17 | 18 | 19 | CDemoDlg::CDemoDlg(CWnd* pParent /*=NULL*/) 20 | : CDialog(CDemoDlg::IDD, pParent) 21 | { 22 | //{{AFX_DATA_INIT(CDemoDlg) 23 | // NOTE: the ClassWizard will add member initialization here 24 | //}}AFX_DATA_INIT 25 | } 26 | 27 | 28 | void CDemoDlg::DoDataExchange(CDataExchange* pDX) 29 | { 30 | CDialog::DoDataExchange(pDX); 31 | //{{AFX_DATA_MAP(CDemoDlg) 32 | // NOTE: the ClassWizard will add DDX and DDV calls here 33 | //}}AFX_DATA_MAP 34 | } 35 | 36 | 37 | BEGIN_MESSAGE_MAP(CDemoDlg, CDialog) 38 | //{{AFX_MSG_MAP(CDemoDlg) 39 | ON_BN_CLICKED(IDC_BUTTON1, OnButton1) 40 | ON_BN_CLICKED(IDC_BUTTON2, OnButton2) 41 | //}}AFX_MSG_MAP 42 | END_MESSAGE_MAP() 43 | 44 | ///////////////////////////////////////////////////////////////////////////// 45 | // CDemoDlg message handlers 46 | 47 | void CDemoDlg::OnButton1() 48 | { 49 | // wizard mode (with help) 50 | propSheet.m_psh.dwFlags |= PSH_HASHELP; 51 | propSheet.m_psh.dwFlags |= PSH_WIZARD; 52 | propSheet.DoModal(); 53 | } 54 | 55 | void CDemoDlg::OnButton2() 56 | { 57 | // property sheet (without help) 58 | propSheet.m_psh.dwFlags &= ~PSH_HASHELP; 59 | propSheet.m_psh.dwFlags &= ~PSH_WIZARD; 60 | // propSheet.EnableStackedTabs(FALSE); 61 | propSheet.DoModal(); 62 | } 63 | 64 | -------------------------------------------------------------------------------- /ResizableProperties/DemoDlg.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_DEMODLG_H__56853FC4_DCE9_4760_969C_5234847689BF__INCLUDED_) 2 | #define AFX_DEMODLG_H__56853FC4_DCE9_4760_969C_5234847689BF__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // DemoDlg.h : header file 8 | // 9 | #include "MyPropertySheet.h" 10 | 11 | ///////////////////////////////////////////////////////////////////////////// 12 | // CDemoDlg dialog 13 | 14 | class CDemoDlg : public CDialog 15 | { 16 | // Construction 17 | public: 18 | CDemoDlg(CWnd* pParent = NULL); // standard constructor 19 | 20 | // Dialog Data 21 | //{{AFX_DATA(CDemoDlg) 22 | enum { IDD = IDD_MAINDIALOG }; 23 | // NOTE: the ClassWizard will add data members here 24 | //}}AFX_DATA 25 | 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CDemoDlg) 30 | protected: 31 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | protected: 36 | CMyPropertySheet propSheet; 37 | 38 | // Generated message map functions 39 | //{{AFX_MSG(CDemoDlg) 40 | afx_msg void OnButton1(); 41 | afx_msg void OnButton2(); 42 | //}}AFX_MSG 43 | DECLARE_MESSAGE_MAP() 44 | }; 45 | 46 | //{{AFX_INSERT_LOCATION}} 47 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 48 | 49 | #endif // !defined(AFX_DEMODLG_H__56853FC4_DCE9_4760_969C_5234847689BF__INCLUDED_) 50 | -------------------------------------------------------------------------------- /ResizableProperties/MyPropertySheet.cpp: -------------------------------------------------------------------------------- 1 | // MyPropertySheet.cpp : implementation file 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "resource.h" 6 | #include "MyPropertySheet.h" 7 | 8 | #ifdef _DEBUG 9 | #undef THIS_FILE 10 | static char BASED_CODE THIS_FILE[] = __FILE__; 11 | #endif 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | // CMyPropertySheet 15 | 16 | IMPLEMENT_DYNAMIC(CMyPropertySheet, CResizableSheet) 17 | 18 | CMyPropertySheet::CMyPropertySheet(CWnd* pWndParent) 19 | : CResizableSheet(_T("CResizableSheet"), pWndParent) 20 | { 21 | AddPage(&m_Page1); 22 | AddPage(&m_Page2); 23 | AddPage(&m_Page3); 24 | } 25 | 26 | CMyPropertySheet::~CMyPropertySheet() 27 | { 28 | } 29 | 30 | 31 | BEGIN_MESSAGE_MAP(CMyPropertySheet, CResizableSheet) 32 | //{{AFX_MSG_MAP(CMyPropertySheet) 33 | //}}AFX_MSG_MAP 34 | END_MESSAGE_MAP() 35 | 36 | 37 | ///////////////////////////////////////////////////////////////////////////// 38 | // CMyPropertySheet message handlers 39 | 40 | BOOL CMyPropertySheet::OnInitDialog() 41 | { 42 | CResizableSheet::OnInitDialog(); 43 | 44 | // ModifyStyleEx(WS_EX_DLGMODALFRAME, 0); // enable sys menu and icon 45 | 46 | // set minimal size 47 | CRect rc; 48 | GetWindowRect(&rc); 49 | SetMinTrackSize(CSize(GetMinWidth(), rc.Height())); 50 | //ResetMinTrackSize(); 51 | 52 | // enable save/restore, with active page 53 | EnableSaveRestore(_T("MyPropertySheet"), TRUE, TRUE); 54 | 55 | return TRUE; 56 | } 57 | -------------------------------------------------------------------------------- /ResizableProperties/MyPropertySheet.h: -------------------------------------------------------------------------------- 1 | // MyPropertySheet.h : header file 2 | // 3 | // This class defines custom modal property sheet 4 | // CMyPropertySheet. 5 | 6 | #ifndef __MYPROPERTYSHEET_H__ 7 | #define __MYPROPERTYSHEET_H__ 8 | 9 | #include "MyPropertyPages.h" 10 | 11 | ///////////////////////////////////////////////////////////////////////////// 12 | // CMyPropertySheet 13 | 14 | #include "ResizableSheet.h" 15 | 16 | class CMyPropertySheet : public CResizableSheet 17 | { 18 | DECLARE_DYNAMIC(CMyPropertySheet) 19 | 20 | // Construction 21 | public: 22 | CMyPropertySheet(CWnd* pWndParent = NULL); 23 | 24 | // Attributes 25 | public: 26 | CMyPropertyPage1 m_Page1; 27 | CMyPropertyPage2 m_Page2; 28 | CMyPropertyPage3 m_Page3; 29 | 30 | // Operations 31 | public: 32 | 33 | // Overrides 34 | // ClassWizard generated virtual function overrides 35 | //{{AFX_VIRTUAL(CMyPropertySheet) 36 | //}}AFX_VIRTUAL 37 | 38 | // Implementation 39 | public: 40 | virtual ~CMyPropertySheet(); 41 | 42 | // Generated message map functions 43 | protected: 44 | //{{AFX_MSG(CMyPropertySheet) 45 | virtual BOOL OnInitDialog(); 46 | //}}AFX_MSG 47 | DECLARE_MESSAGE_MAP() 48 | }; 49 | 50 | ///////////////////////////////////////////////////////////////////////////// 51 | 52 | #endif // __MYPROPERTYSHEET_H__ 53 | -------------------------------------------------------------------------------- /ResizableProperties/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // Demo.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ResizableProperties/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if !defined(AFX_STDAFX_H__F370EDCA_3EC9_11D4_9C0C_A4D231A8944A__INCLUDED_) 7 | #define AFX_STDAFX_H__F370EDCA_3EC9_11D4_9C0C_A4D231A8944A__INCLUDED_ 8 | 9 | #if _MSC_VER > 1000 10 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | #if defined _M_IX86 14 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 15 | #elif defined _M_IA64 16 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") 17 | #elif defined _M_X64 18 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 19 | #else 20 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 21 | #endif 22 | 23 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 24 | 25 | #include // MFC core and standard components 26 | #include // MFC extensions 27 | #ifndef _AFX_NO_AFXCMN_SUPPORT 28 | #include // MFC support for Windows Common Controls 29 | #endif // _AFX_NO_AFXCMN_SUPPORT 30 | 31 | 32 | //{{AFX_INSERT_LOCATION}} 33 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 34 | 35 | #endif // !defined(AFX_STDAFX_H__F370EDCA_3EC9_11D4_9C0C_A4D231A8944A__INCLUDED_) 36 | -------------------------------------------------------------------------------- /ResizableProperties/res/Demo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableProperties/res/Demo.ico -------------------------------------------------------------------------------- /ResizableProperties/res/Demo.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // DEMO.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /ResizableProperties/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by Demo.rc 4 | // 5 | #define IDD_DEMO_DIALOG 102 6 | #define IDS_PROPSHT_CAPTION 103 7 | #define IDD_PROPPAGE1 104 8 | #define IDD_PROPPAGE2 105 9 | #define IDD_PROPPAGE3 106 10 | #define IDS_PROPSHT_CAPTION1 107 11 | #define IDD_PROPPAGE11 108 12 | #define IDD_PROPPAGE21 109 13 | #define IDD_PROPPAGE31 110 14 | #define IDR_MAINFRAME 128 15 | #define IDD_MAINDIALOG 129 16 | #define IDB_BITMAP1 131 17 | #define IDB_BITMAP2 132 18 | #define IDC_EDIT1 1000 19 | #define IDC_BUTTON1 1001 20 | #define IDC_BUTTON2 1002 21 | #define IDC_COMBO1 1002 22 | #define IDC_CHECK1 1003 23 | #define IDC_BUTTON3 1003 24 | #define IDC_RADIO1 1004 25 | #define IDC_LIST1 1006 26 | #define IDC_GROUP1 1007 27 | #define IDC_PICTURE1 1008 28 | #define IDC_SLIDER1 1010 29 | #define IDC_LABEL1 1011 30 | 31 | // Next default values for new objects 32 | // 33 | #ifdef APSTUDIO_INVOKED 34 | #ifndef APSTUDIO_READONLY_SYMBOLS 35 | #define _APS_NEXT_RESOURCE_VALUE 133 36 | #define _APS_NEXT_COMMAND_VALUE 32771 37 | #define _APS_NEXT_CONTROL_VALUE 1012 38 | #define _APS_NEXT_SYMED_VALUE 111 39 | #endif 40 | #endif 41 | -------------------------------------------------------------------------------- /ResizableWizard97/Complete.cpp: -------------------------------------------------------------------------------- 1 | // Complete.cpp : implementation file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #include "stdafx.h" 14 | #include "Wizard97.h" 15 | #include "Complete.h" 16 | 17 | #ifdef _DEBUG 18 | #define new DEBUG_NEW 19 | #undef THIS_FILE 20 | static char THIS_FILE[] = __FILE__; 21 | #endif 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // CCompletion property page 25 | 26 | IMPLEMENT_DYNCREATE(CCompletion, CResizablePageEx) 27 | 28 | CCompletion::CCompletion() : CResizablePageEx(CCompletion::IDD) 29 | { 30 | //{{AFX_DATA_INIT(CCompletion) 31 | // NOTE: the ClassWizard will add member initialization here 32 | //}}AFX_DATA_INIT 33 | m_psp.dwFlags |= PSP_HIDEHEADER; 34 | } 35 | 36 | CCompletion::~CCompletion() 37 | { 38 | } 39 | 40 | void CCompletion::DoDataExchange(CDataExchange* pDX) 41 | { 42 | CResizablePageEx::DoDataExchange(pDX); 43 | //{{AFX_DATA_MAP(CCompletion) 44 | // NOTE: the ClassWizard will add DDX and DDV calls here 45 | //}}AFX_DATA_MAP 46 | } 47 | 48 | 49 | BEGIN_MESSAGE_MAP(CCompletion, CResizablePageEx) 50 | //{{AFX_MSG_MAP(CCompletion) 51 | //}}AFX_MSG_MAP 52 | END_MESSAGE_MAP() 53 | 54 | ///////////////////////////////////////////////////////////////////////////// 55 | // CCompletion message handlers 56 | 57 | BOOL CCompletion::OnSetActive() 58 | { 59 | CPropertySheet* pSheet = (CPropertySheet*)GetParent(); 60 | ASSERT_KINDOF(CPropertySheet, pSheet); 61 | pSheet->SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT | PSWIZB_FINISH); 62 | return CResizablePageEx::OnSetActive(); 63 | } 64 | 65 | BOOL CCompletion::OnInitDialog() 66 | { 67 | CResizablePageEx::OnInitDialog(); 68 | 69 | AddAnchor(IDC_BOLDTITLE, TOP_LEFT); 70 | AddAnchor(IDC_BIGBOLDTITLE, TOP_LEFT); 71 | AddAnchor(IDC_TRANSPARENT1, TOP_LEFT); 72 | 73 | LOGFONT lf; 74 | GetDlgItem(IDC_BOLDTITLE)->GetFont()->GetLogFont(&lf); 75 | 76 | lf.lfWeight = FW_BOLD; 77 | m_fontTitle.CreateFontIndirect(&lf); 78 | GetDlgItem(IDC_BOLDTITLE)->SetFont(&m_fontTitle); 79 | 80 | lf.lfWeight = FW_BOLD; 81 | lf.lfHeight *= 2; 82 | m_fontBig.CreateFontIndirect(&lf); 83 | GetDlgItem(IDC_BIGBOLDTITLE)->SetFont(&m_fontBig); 84 | 85 | return TRUE; // return TRUE unless you set the focus to a control 86 | // EXCEPTION: OCX Property Pages should return FALSE 87 | } 88 | -------------------------------------------------------------------------------- /ResizableWizard97/Complete.h: -------------------------------------------------------------------------------- 1 | // Completion.h : header file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #if !defined(AFX_COMPLETION_H__99E7B195_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 14 | #define AFX_COMPLETION_H__99E7B195_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_ 15 | 16 | #include "ResizablePageEx.h" 17 | 18 | #if _MSC_VER > 1000 19 | #pragma once 20 | #endif // _MSC_VER > 1000 21 | 22 | ///////////////////////////////////////////////////////////////////////////// 23 | // CCompletion dialog 24 | 25 | class CCompletion : public CResizablePageEx 26 | { 27 | DECLARE_DYNCREATE(CCompletion) 28 | 29 | CFont m_fontTitle; 30 | CFont m_fontBig; 31 | 32 | // Construction 33 | public: 34 | CCompletion(); 35 | ~CCompletion(); 36 | 37 | // Dialog Data 38 | //{{AFX_DATA(CCompletion) 39 | enum { IDD = IDD_COMPLETION }; 40 | // NOTE - ClassWizard will add data members here. 41 | // DO NOT EDIT what you see in these blocks of generated code ! 42 | //}}AFX_DATA 43 | 44 | 45 | // Overrides 46 | // ClassWizard generate virtual function overrides 47 | //{{AFX_VIRTUAL(CCompletion) 48 | public: 49 | virtual BOOL OnSetActive(); 50 | protected: 51 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 52 | //}}AFX_VIRTUAL 53 | 54 | // Implementation 55 | protected: 56 | // Generated message map functions 57 | //{{AFX_MSG(CCompletion) 58 | virtual BOOL OnInitDialog(); 59 | //}}AFX_MSG 60 | DECLARE_MESSAGE_MAP() 61 | 62 | }; 63 | 64 | //{{AFX_INSERT_LOCATION}} 65 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 66 | 67 | #endif // !defined(AFX_COMPLETION_H__99E7B195_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 68 | -------------------------------------------------------------------------------- /ResizableWizard97/CompleteNew.cpp: -------------------------------------------------------------------------------- 1 | // CompleteNew.cpp : implementation file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #include "stdafx.h" 14 | #include "Wizard97.h" 15 | #include "CompleteNew.h" 16 | 17 | #ifdef _DEBUG 18 | #define new DEBUG_NEW 19 | #undef THIS_FILE 20 | static char THIS_FILE[] = __FILE__; 21 | #endif 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // CCompletionNew property page 25 | 26 | IMPLEMENT_DYNCREATE(CCompletionNew, CResizablePageEx) 27 | 28 | CCompletionNew::CCompletionNew() : CResizablePageEx(CCompletionNew::IDD) 29 | { 30 | //{{AFX_DATA_INIT(CCompletionNew) 31 | // NOTE: the ClassWizard will add member initialization here 32 | //}}AFX_DATA_INIT 33 | m_psp.dwFlags |= PSP_HIDEHEADER; 34 | } 35 | 36 | CCompletionNew::~CCompletionNew() 37 | { 38 | } 39 | 40 | void CCompletionNew::DoDataExchange(CDataExchange* pDX) 41 | { 42 | CResizablePageEx::DoDataExchange(pDX); 43 | //{{AFX_DATA_MAP(CCompletionNew) 44 | // NOTE: the ClassWizard will add DDX and DDV calls here 45 | //}}AFX_DATA_MAP 46 | } 47 | 48 | 49 | BEGIN_MESSAGE_MAP(CCompletionNew, CResizablePageEx) 50 | //{{AFX_MSG_MAP(CCompletionNew) 51 | //}}AFX_MSG_MAP 52 | END_MESSAGE_MAP() 53 | 54 | ///////////////////////////////////////////////////////////////////////////// 55 | // CCompletionNew message handlers 56 | 57 | BOOL CCompletionNew::OnSetActive() 58 | { 59 | CPropertySheet* pSheet = (CPropertySheet*)GetParent(); 60 | ASSERT_KINDOF(CPropertySheet, pSheet); 61 | pSheet->SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT | PSWIZB_FINISH); 62 | return CResizablePageEx::OnSetActive(); 63 | } 64 | 65 | BOOL CCompletionNew::OnInitDialog() 66 | { 67 | CResizablePageEx::OnInitDialog(); 68 | 69 | AddAnchor(IDC_BOLDTITLE, TOP_LEFT); 70 | AddAnchor(IDC_BIGBOLDTITLE, TOP_LEFT); 71 | AddAnchor(IDC_TRANSPARENT1, TOP_LEFT); 72 | 73 | LOGFONT lf; 74 | GetDlgItem(IDC_BOLDTITLE)->GetFont()->GetLogFont(&lf); 75 | 76 | lf.lfWeight = FW_BOLD; 77 | m_fontTitle.CreateFontIndirect(&lf); 78 | GetDlgItem(IDC_BOLDTITLE)->SetFont(&m_fontTitle); 79 | 80 | lf.lfWeight = FW_BOLD; 81 | lf.lfHeight *= 2; 82 | m_fontBig.CreateFontIndirect(&lf); 83 | GetDlgItem(IDC_BIGBOLDTITLE)->SetFont(&m_fontBig); 84 | 85 | return TRUE; // return TRUE unless you set the focus to a control 86 | // EXCEPTION: OCX Property Pages should return FALSE 87 | } 88 | -------------------------------------------------------------------------------- /ResizableWizard97/CompleteNew.h: -------------------------------------------------------------------------------- 1 | // CompletionNew.h : header file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #if !defined(AFX_COMPLETION_H__19E7B195_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 14 | #define AFX_COMPLETION_H__19E7B195_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_ 15 | 16 | #include "ResizablePageEx.h" 17 | 18 | #if _MSC_VER > 1000 19 | #pragma once 20 | #endif // _MSC_VER > 1000 21 | 22 | ///////////////////////////////////////////////////////////////////////////// 23 | // CCompletionNew dialog 24 | 25 | class CCompletionNew : public CResizablePageEx 26 | { 27 | DECLARE_DYNCREATE(CCompletionNew) 28 | 29 | CFont m_fontTitle; 30 | CFont m_fontBig; 31 | 32 | // Construction 33 | public: 34 | CCompletionNew(); 35 | ~CCompletionNew(); 36 | 37 | // Dialog Data 38 | //{{AFX_DATA(CCompletionNew) 39 | enum { IDD = IDD_COMPLETION_NEW }; 40 | // NOTE - ClassWizard will add data members here. 41 | // DO NOT EDIT what you see in these blocks of generated code ! 42 | //}}AFX_DATA 43 | 44 | 45 | // Overrides 46 | // ClassWizard generate virtual function overrides 47 | //{{AFX_VIRTUAL(CCompletionNew) 48 | public: 49 | virtual BOOL OnSetActive(); 50 | protected: 51 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 52 | //}}AFX_VIRTUAL 53 | 54 | // Implementation 55 | protected: 56 | // Generated message map functions 57 | //{{AFX_MSG(CCompletionNew) 58 | virtual BOOL OnInitDialog(); 59 | //}}AFX_MSG 60 | DECLARE_MESSAGE_MAP() 61 | 62 | }; 63 | 64 | //{{AFX_INSERT_LOCATION}} 65 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 66 | 67 | #endif // !defined(AFX_COMPLETION_H__19E7B195_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 68 | -------------------------------------------------------------------------------- /ResizableWizard97/Int1.cpp: -------------------------------------------------------------------------------- 1 | // Int1.cpp : implementation file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #include "stdafx.h" 14 | #include "Wizard97.h" 15 | #include "Int1.h" 16 | 17 | #ifdef _DEBUG 18 | #define new DEBUG_NEW 19 | #undef THIS_FILE 20 | static char THIS_FILE[] = __FILE__; 21 | #endif 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // CInterior1 property page 25 | 26 | IMPLEMENT_DYNCREATE(CInterior1, CResizablePageEx) 27 | 28 | CInterior1::CInterior1() : CResizablePageEx(CInterior1::IDD, 0, IDS_HEADERTITLE, IDS_HEADERSUBTITLE) 29 | { 30 | //{{AFX_DATA_INIT(CInterior1) 31 | // NOTE: the ClassWizard will add member initialization here 32 | //}}AFX_DATA_INIT 33 | //m_strHeaderTitle = "Setup Page (Test)"; 34 | //m_psp.dwFlags |= PSP_HIDEHEADER; 35 | } 36 | 37 | CInterior1::~CInterior1() 38 | { 39 | } 40 | 41 | void CInterior1::DoDataExchange(CDataExchange* pDX) 42 | { 43 | CResizablePageEx::DoDataExchange(pDX); 44 | //{{AFX_DATA_MAP(CInterior1) 45 | // NOTE: the ClassWizard will add DDX and DDV calls here 46 | //}}AFX_DATA_MAP 47 | } 48 | 49 | 50 | BEGIN_MESSAGE_MAP(CInterior1, CResizablePageEx) 51 | //{{AFX_MSG_MAP(CInterior1) 52 | //}}AFX_MSG_MAP 53 | END_MESSAGE_MAP() 54 | 55 | ///////////////////////////////////////////////////////////////////////////// 56 | // CInterior1 message handlers 57 | 58 | BOOL CInterior1::OnSetActive() 59 | { 60 | CPropertySheet* pSheet = (CPropertySheet*)GetParent(); 61 | ASSERT_KINDOF(CPropertySheet, pSheet); 62 | pSheet->SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT); 63 | return CResizablePageEx::OnSetActive(); 64 | } 65 | 66 | BOOL CInterior1::OnInitDialog() 67 | { 68 | CResizablePageEx::OnInitDialog(); 69 | 70 | AddAnchor(IDC_STATIC_TITLE, TOP_LEFT, TOP_RIGHT); 71 | AddAnchor(IDC_LIST1, TOP_LEFT, BOTTOM_RIGHT); 72 | AddAnchor(IDC_GROUP1, TOP_RIGHT, BOTTOM_RIGHT); 73 | AddAnchor(IDC_BUTTON1, BOTTOM_RIGHT); 74 | AddAnchor(IDC_STATIC1, BOTTOM_LEFT, BOTTOM_CENTER); 75 | AddAnchor(IDC_STATIC2, BOTTOM_CENTER, BOTTOM_RIGHT); 76 | AddAnchor(IDC_STATIC3, TOP_LEFT); 77 | 78 | return TRUE; // return TRUE unless you set the focus to a control 79 | // EXCEPTION: OCX Property Pages should return FALSE 80 | } 81 | -------------------------------------------------------------------------------- /ResizableWizard97/Int1.h: -------------------------------------------------------------------------------- 1 | // Interior1.h : header file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #if !defined(AFX_INTERIOR1_H__99E7B194_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 14 | #define AFX_INTERIOR1_H__99E7B194_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_ 15 | 16 | #include "ResizablePageEx.h" 17 | 18 | #if _MSC_VER > 1000 19 | #pragma once 20 | #endif // _MSC_VER > 1000 21 | 22 | ///////////////////////////////////////////////////////////////////////////// 23 | // CInterior1 dialog 24 | 25 | class CInterior1 : public CResizablePageEx 26 | { 27 | DECLARE_DYNCREATE(CInterior1) 28 | 29 | // Construction 30 | public: 31 | CInterior1(); 32 | ~CInterior1(); 33 | 34 | // Dialog Data 35 | //{{AFX_DATA(CInterior1) 36 | enum { IDD = IDD_INTERIOR1 }; 37 | // NOTE - ClassWizard will add data members here. 38 | // DO NOT EDIT what you see in these blocks of generated code ! 39 | //}}AFX_DATA 40 | 41 | 42 | // Overrides 43 | // ClassWizard generate virtual function overrides 44 | //{{AFX_VIRTUAL(CInterior1) 45 | public: 46 | virtual BOOL OnSetActive(); 47 | protected: 48 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 49 | //}}AFX_VIRTUAL 50 | 51 | // Implementation 52 | protected: 53 | // Generated message map functions 54 | //{{AFX_MSG(CInterior1) 55 | virtual BOOL OnInitDialog(); 56 | //}}AFX_MSG 57 | DECLARE_MESSAGE_MAP() 58 | 59 | }; 60 | 61 | //{{AFX_INSERT_LOCATION}} 62 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 63 | 64 | #endif // !defined(AFX_INTERIOR1_H__99E7B194_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 65 | -------------------------------------------------------------------------------- /ResizableWizard97/Int2.cpp: -------------------------------------------------------------------------------- 1 | // Int2.cpp : implementation file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #include "stdafx.h" 14 | #include "Wizard97.h" 15 | #include "Int2.h" 16 | 17 | #ifdef _DEBUG 18 | #define new DEBUG_NEW 19 | #undef THIS_FILE 20 | static char THIS_FILE[] = __FILE__; 21 | #endif 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // Interior2 property page 25 | 26 | IMPLEMENT_DYNCREATE(CInterior2, CResizablePageEx) 27 | 28 | CInterior2::CInterior2() 29 | : CResizablePageEx(CInterior2::IDD, 0, IDS_HEADERTITLE, IDS_HEADERSUBTITLE) 30 | { 31 | //{{AFX_DATA_INIT(CInterior2) 32 | // NOTE: the ClassWizard will add member initialization here 33 | //}}AFX_DATA_INIT 34 | } 35 | 36 | CInterior2::~CInterior2() 37 | { 38 | } 39 | 40 | void CInterior2::DoDataExchange(CDataExchange* pDX) 41 | { 42 | CResizablePageEx::DoDataExchange(pDX); 43 | //{{AFX_DATA_MAP(CInterior2) 44 | // NOTE: the ClassWizard will add DDX and DDV calls here 45 | //}}AFX_DATA_MAP 46 | } 47 | 48 | 49 | BEGIN_MESSAGE_MAP(CInterior2, CResizablePageEx) 50 | //{{AFX_MSG_MAP(CInterior2) 51 | //}}AFX_MSG_MAP 52 | END_MESSAGE_MAP() 53 | 54 | ///////////////////////////////////////////////////////////////////////////// 55 | // CInterior2 message handlers 56 | 57 | BOOL CInterior2::OnSetActive() 58 | { 59 | CPropertySheet* pSheet = (CPropertySheet*)GetParent(); 60 | ASSERT_KINDOF(CPropertySheet, pSheet); 61 | pSheet->SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT); 62 | return CResizablePageEx::OnSetActive(); 63 | } 64 | 65 | BOOL CInterior2::OnInitDialog() 66 | { 67 | CResizablePageEx::OnInitDialog(); 68 | 69 | AddAnchor(IDC_RADIO1, TOP_LEFT, TOP_RIGHT); 70 | AddAnchor(IDC_STATIC1, TOP_LEFT, MIDDLE_RIGHT); 71 | AddAnchor(IDC_RADIO2, MIDDLE_LEFT, MIDDLE_RIGHT); 72 | AddAnchor(IDC_STATIC2, MIDDLE_LEFT, BOTTOM_RIGHT); 73 | AddAnchor(IDC_STATIC3, TOP_LEFT); 74 | 75 | return TRUE; // return TRUE unless you set the focus to a control 76 | // EXCEPTION: OCX Property Pages should return FALSE 77 | } 78 | -------------------------------------------------------------------------------- /ResizableWizard97/Int2.h: -------------------------------------------------------------------------------- 1 | // Interior2.h : header file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #if !defined(AFX_INTERIOR2_H__99E7B193_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 14 | #define AFX_INTERIOR2_H__99E7B193_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_ 15 | 16 | #include "ResizablePageEx.h" 17 | 18 | #if _MSC_VER > 1000 19 | #pragma once 20 | #endif // _MSC_VER > 1000 21 | 22 | ///////////////////////////////////////////////////////////////////////////// 23 | // Interior2 dialog 24 | 25 | class CInterior2 : public CResizablePageEx 26 | { 27 | DECLARE_DYNCREATE(CInterior2) 28 | 29 | // Construction 30 | public: 31 | CInterior2(); 32 | ~CInterior2(); 33 | 34 | // Dialog Data 35 | //{{AFX_DATA(CInterior2) 36 | enum { IDD = IDD_INTERIOR2 }; 37 | // NOTE - ClassWizard will add data members here. 38 | // DO NOT EDIT what you see in these blocks of generated code ! 39 | //}}AFX_DATA 40 | 41 | 42 | // Overrides 43 | // ClassWizard generate virtual function overrides 44 | //{{AFX_VIRTUAL(CInterior2) 45 | public: 46 | virtual BOOL OnSetActive(); 47 | protected: 48 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 49 | //}}AFX_VIRTUAL 50 | 51 | // Implementation 52 | protected: 53 | // Generated message map functions 54 | //{{AFX_MSG(CInterior2) 55 | virtual BOOL OnInitDialog(); 56 | //}}AFX_MSG 57 | DECLARE_MESSAGE_MAP() 58 | 59 | }; 60 | 61 | //{{AFX_INSERT_LOCATION}} 62 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 63 | 64 | #endif // !defined(AFX_INTERIOR2_H__99E7B193_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 65 | -------------------------------------------------------------------------------- /ResizableWizard97/IntroPg.cpp: -------------------------------------------------------------------------------- 1 | // IntroPg.cpp : implementation file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #include "stdafx.h" 14 | #include "Wizard97.h" 15 | #include "IntroPg.h" 16 | 17 | #ifdef _DEBUG 18 | #define new DEBUG_NEW 19 | #undef THIS_FILE 20 | static char THIS_FILE[] = __FILE__; 21 | #endif 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // CIntroPage property page 25 | 26 | IMPLEMENT_DYNCREATE(CIntroPage, CResizablePageEx) 27 | 28 | CIntroPage::CIntroPage() : CResizablePageEx(CIntroPage::IDD) 29 | { 30 | //{{AFX_DATA_INIT(CIntroPage) 31 | // NOTE: the ClassWizard will add member initialization here 32 | //}}AFX_DATA_INIT 33 | m_psp.dwFlags |= PSP_HIDEHEADER; 34 | } 35 | 36 | CIntroPage::~CIntroPage() 37 | { 38 | } 39 | 40 | void CIntroPage::DoDataExchange(CDataExchange* pDX) 41 | { 42 | CResizablePageEx::DoDataExchange(pDX); 43 | //{{AFX_DATA_MAP(CIntroPage) 44 | // NOTE: the ClassWizard will add DDX and DDV calls here 45 | //}}AFX_DATA_MAP 46 | } 47 | 48 | 49 | BEGIN_MESSAGE_MAP(CIntroPage, CResizablePageEx) 50 | //{{AFX_MSG_MAP(CIntroPage) 51 | //}}AFX_MSG_MAP 52 | END_MESSAGE_MAP() 53 | 54 | ///////////////////////////////////////////////////////////////////////////// 55 | // CIntroPage message handlers 56 | 57 | BOOL CIntroPage::OnSetActive() 58 | { 59 | CPropertySheet* pSheet = (CPropertySheet*)GetParent(); 60 | ASSERT_KINDOF(CPropertySheet, pSheet); 61 | pSheet->SetWizardButtons(PSWIZB_NEXT); 62 | return CResizablePageEx::OnSetActive(); 63 | } 64 | 65 | BOOL CIntroPage::OnInitDialog() 66 | { 67 | CResizablePageEx::OnInitDialog(); 68 | 69 | AddAnchor(IDC_BOLDTITLE, TOP_LEFT); 70 | AddAnchor(IDC_BIGBOLDTITLE, TOP_LEFT); 71 | AddAnchor(IDC_TRANSPARENT1, TOP_LEFT, MIDDLE_RIGHT); 72 | AddAnchor(IDC_TRANSPARENT2, MIDDLE_LEFT, BOTTOM_RIGHT); 73 | AddAnchor(IDC_TRANSPARENT3, BOTTOM_LEFT); 74 | AddAnchor(IDC_EDIT1, BOTTOM_LEFT, BOTTOM_RIGHT); 75 | 76 | LOGFONT lf; 77 | GetDlgItem(IDC_BOLDTITLE)->GetFont()->GetLogFont(&lf); 78 | 79 | lf.lfWeight = FW_BOLD; 80 | m_fontTitle.CreateFontIndirect(&lf); 81 | GetDlgItem(IDC_BOLDTITLE)->SetFont(&m_fontTitle); 82 | 83 | lf.lfWeight = FW_BOLD; 84 | lf.lfHeight *= 2; 85 | m_fontBig.CreateFontIndirect(&lf); 86 | GetDlgItem(IDC_BIGBOLDTITLE)->SetFont(&m_fontBig); 87 | 88 | return TRUE; // return TRUE unless you set the focus to a control 89 | } 90 | -------------------------------------------------------------------------------- /ResizableWizard97/IntroPg.h: -------------------------------------------------------------------------------- 1 | // IntroPage.h : header file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #if !defined(AFX_INTROPAGE_H__99E7B192_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 14 | #define AFX_INTROPAGE_H__99E7B192_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_ 15 | 16 | #include "ResizablePageEx.h" 17 | 18 | #if _MSC_VER > 1000 19 | #pragma once 20 | #endif // _MSC_VER > 1000 21 | 22 | ///////////////////////////////////////////////////////////////////////////// 23 | // CIntroPage dialog 24 | 25 | class CIntroPage : public CResizablePageEx 26 | { 27 | DECLARE_DYNCREATE(CIntroPage) 28 | 29 | CFont m_fontTitle; 30 | CFont m_fontBig; 31 | 32 | // Construction 33 | public: 34 | CIntroPage(); 35 | ~CIntroPage(); 36 | 37 | // Dialog Data 38 | //{{AFX_DATA(CIntroPage) 39 | enum { IDD = IDD_INTRO }; 40 | // NOTE - ClassWizard will add data members here. 41 | // DO NOT EDIT what you see in these blocks of generated code ! 42 | //}}AFX_DATA 43 | 44 | 45 | // Overrides 46 | // ClassWizard generate virtual function overrides 47 | //{{AFX_VIRTUAL(CIntroPage) 48 | public: 49 | virtual BOOL OnSetActive(); 50 | protected: 51 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 52 | //}}AFX_VIRTUAL 53 | 54 | // Implementation 55 | protected: 56 | // Generated message map functions 57 | //{{AFX_MSG(CIntroPage) 58 | virtual BOOL OnInitDialog(); 59 | //}}AFX_MSG 60 | DECLARE_MESSAGE_MAP() 61 | 62 | }; 63 | 64 | //{{AFX_INSERT_LOCATION}} 65 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 66 | 67 | #endif // !defined(AFX_INTROPAGE_H__99E7B192_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 68 | -------------------------------------------------------------------------------- /ResizableWizard97/IntroPgNew.cpp: -------------------------------------------------------------------------------- 1 | // IntroPgNew.cpp : implementation file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #include "stdafx.h" 14 | #include "Wizard97.h" 15 | #include "IntroPgNew.h" 16 | 17 | #ifdef _DEBUG 18 | #define new DEBUG_NEW 19 | #undef THIS_FILE 20 | static char THIS_FILE[] = __FILE__; 21 | #endif 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // CIntroPageNew property page 25 | 26 | IMPLEMENT_DYNCREATE(CIntroPageNew, CResizablePageEx) 27 | 28 | CIntroPageNew::CIntroPageNew() : CResizablePageEx(CIntroPageNew::IDD) 29 | { 30 | //{{AFX_DATA_INIT(CIntroPageNew) 31 | // NOTE: the ClassWizard will add member initialization here 32 | //}}AFX_DATA_INIT 33 | m_psp.dwFlags |= PSP_HIDEHEADER; 34 | } 35 | 36 | CIntroPageNew::~CIntroPageNew() 37 | { 38 | } 39 | 40 | void CIntroPageNew::DoDataExchange(CDataExchange* pDX) 41 | { 42 | CResizablePageEx::DoDataExchange(pDX); 43 | //{{AFX_DATA_MAP(CIntroPageNew) 44 | // NOTE: the ClassWizard will add DDX and DDV calls here 45 | //}}AFX_DATA_MAP 46 | } 47 | 48 | 49 | BEGIN_MESSAGE_MAP(CIntroPageNew, CResizablePageEx) 50 | //{{AFX_MSG_MAP(CIntroPageNew) 51 | //}}AFX_MSG_MAP 52 | END_MESSAGE_MAP() 53 | 54 | ///////////////////////////////////////////////////////////////////////////// 55 | // CIntroPageNew message handlers 56 | 57 | BOOL CIntroPageNew::OnSetActive() 58 | { 59 | CPropertySheet* pSheet = (CPropertySheet*)GetParent(); 60 | ASSERT_KINDOF(CPropertySheet, pSheet); 61 | pSheet->SetWizardButtons(PSWIZB_NEXT); 62 | return CResizablePageEx::OnSetActive(); 63 | } 64 | 65 | BOOL CIntroPageNew::OnInitDialog() 66 | { 67 | CResizablePageEx::OnInitDialog(); 68 | 69 | AddAnchor(IDC_BOLDTITLE, TOP_LEFT); 70 | AddAnchor(IDC_BIGBOLDTITLE, TOP_LEFT); 71 | AddAnchor(IDC_TRANSPARENT1, TOP_LEFT, MIDDLE_RIGHT); 72 | AddAnchor(IDC_TRANSPARENT2, MIDDLE_LEFT, BOTTOM_RIGHT); 73 | AddAnchor(IDC_TRANSPARENT3, BOTTOM_LEFT); 74 | AddAnchor(IDC_EDIT1, BOTTOM_LEFT, BOTTOM_RIGHT); 75 | 76 | LOGFONT lf; 77 | GetDlgItem(IDC_BOLDTITLE)->GetFont()->GetLogFont(&lf); 78 | 79 | lf.lfWeight = FW_BOLD; 80 | m_fontTitle.CreateFontIndirect(&lf); 81 | GetDlgItem(IDC_BOLDTITLE)->SetFont(&m_fontTitle); 82 | 83 | lf.lfWeight = FW_BOLD; 84 | lf.lfHeight *= 2; 85 | m_fontBig.CreateFontIndirect(&lf); 86 | GetDlgItem(IDC_BIGBOLDTITLE)->SetFont(&m_fontBig); 87 | 88 | return TRUE; // return TRUE unless you set the focus to a control 89 | } 90 | -------------------------------------------------------------------------------- /ResizableWizard97/IntroPgNew.h: -------------------------------------------------------------------------------- 1 | // IntroPgNew.h : header file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #if !defined(AFX_INTROPAGE_H__19E7B192_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 14 | #define AFX_INTROPAGE_H__19E7B192_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_ 15 | 16 | #include "ResizablePageEx.h" 17 | 18 | #if _MSC_VER > 1000 19 | #pragma once 20 | #endif // _MSC_VER > 1000 21 | 22 | ///////////////////////////////////////////////////////////////////////////// 23 | // CIntroPageNew dialog 24 | 25 | class CIntroPageNew : public CResizablePageEx 26 | { 27 | DECLARE_DYNCREATE(CIntroPageNew) 28 | 29 | CFont m_fontTitle; 30 | CFont m_fontBig; 31 | 32 | // Construction 33 | public: 34 | CIntroPageNew(); 35 | ~CIntroPageNew(); 36 | 37 | // Dialog Data 38 | //{{AFX_DATA(CIntroPageNew) 39 | enum { IDD = IDD_INTRO_NEW }; 40 | // NOTE - ClassWizard will add data members here. 41 | // DO NOT EDIT what you see in these blocks of generated code ! 42 | //}}AFX_DATA 43 | 44 | 45 | // Overrides 46 | // ClassWizard generate virtual function overrides 47 | //{{AFX_VIRTUAL(CIntroPageNew) 48 | public: 49 | virtual BOOL OnSetActive(); 50 | protected: 51 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 52 | //}}AFX_VIRTUAL 53 | 54 | // Implementation 55 | protected: 56 | // Generated message map functions 57 | //{{AFX_MSG(CIntroPageNew) 58 | virtual BOOL OnInitDialog(); 59 | //}}AFX_MSG 60 | DECLARE_MESSAGE_MAP() 61 | 62 | }; 63 | 64 | //{{AFX_INSERT_LOCATION}} 65 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 66 | 67 | #endif // !defined(AFX_INTROPAGE_H__19E7B192_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 68 | -------------------------------------------------------------------------------- /ResizableWizard97/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // Wizard97.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | -------------------------------------------------------------------------------- /ResizableWizard97/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if !defined(AFX_STDAFX_H__9D85AAA9_59C4_11D1_A4EC_00C04FD91A9F__INCLUDED_) 7 | #define AFX_STDAFX_H__9D85AAA9_59C4_11D1_A4EC_00C04FD91A9F__INCLUDED_ 8 | 9 | #if _MSC_VER > 1000 10 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | #if defined _M_IX86 14 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 15 | #elif defined _M_IA64 16 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") 17 | #elif defined _M_X64 18 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 19 | #else 20 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 21 | #endif 22 | 23 | // Set target Windows platform 24 | #define WINVER 0x0501 25 | #define _WIN32_WINNT 0x0501 26 | 27 | // Use target Common Controls version for compatibility 28 | // with CPropertyPageEx, CPropertySheetEx 29 | #define _WIN32_IE 0x0500 30 | 31 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 32 | 33 | #include // MFC core and standard components 34 | #include // MFC extensions 35 | #ifndef _AFX_NO_AFXCMN_SUPPORT 36 | #include // MFC support for Windows Common Controls 37 | #endif // _AFX_NO_AFXCMN_SUPPORT 38 | 39 | 40 | //{{AFX_INSERT_LOCATION}} 41 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 42 | 43 | #endif // !defined(AFX_STDAFX_H__9D85AAA9_59C4_11D1_A4EC_00C04FD91A9F__INCLUDED_) 44 | -------------------------------------------------------------------------------- /ResizableWizard97/WizSheet.cpp: -------------------------------------------------------------------------------- 1 | // SampWizP.cpp : implementation file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #include "stdafx.h" 14 | #include "Wizard97.h" 15 | #include "WizSheet.h" 16 | 17 | #ifdef _DEBUG 18 | #define new DEBUG_NEW 19 | #undef THIS_FILE 20 | static char THIS_FILE[] = __FILE__; 21 | #endif 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // CWizard97Sheet 25 | 26 | IMPLEMENT_DYNAMIC(CWizard97Sheet, CResizableSheetEx) 27 | 28 | CWizard97Sheet::CWizard97Sheet(BOOL bOldStyle) 29 | { 30 | if (bOldStyle) 31 | { 32 | VERIFY(m_bmpWatermark.LoadBitmap(IDB_WATERMARK_OLD)); 33 | VERIFY(m_bmpHeader.LoadBitmap(IDB_BANNER_OLD)); 34 | } 35 | else 36 | { 37 | VERIFY(m_bmpWatermark.LoadBitmap(IDB_WATERMARK_NEW)); 38 | VERIFY(m_bmpHeader.LoadBitmap(IDB_BANNER_NEW)); 39 | } 40 | 41 | Construct(IDS_SAMPLEWIZARD, NULL, 0, m_bmpWatermark, NULL, m_bmpHeader); 42 | 43 | // add all the pages of the wizard 44 | if (bOldStyle) 45 | AddPage(&m_Intro); 46 | else 47 | AddPage(&m_IntroNew); 48 | AddPage(&m_Interior1); 49 | AddPage(&m_Interior2); 50 | if (bOldStyle) 51 | AddPage(&m_Completion); 52 | else 53 | AddPage(&m_CompletionNew); 54 | 55 | // use the right flag for Wizard97 style 56 | m_psh.dwFlags |= bOldStyle ? PSH_IE4WIZARD97|PSH_STRETCHWATERMARK : PSH_IE5WIZARD97; 57 | } 58 | 59 | CWizard97Sheet::~CWizard97Sheet() 60 | { 61 | } 62 | 63 | 64 | BEGIN_MESSAGE_MAP(CWizard97Sheet, CResizableSheetEx) 65 | //{{AFX_MSG_MAP(CWizard97Sheet) 66 | //}}AFX_MSG_MAP 67 | END_MESSAGE_MAP() 68 | 69 | ///////////////////////////////////////////////////////////////////////////// 70 | // CWizard97Sheet message handlers 71 | 72 | BOOL CWizard97Sheet::OnInitDialog() 73 | { 74 | CResizableSheetEx::OnInitDialog(); 75 | 76 | CRect rect; 77 | GetWindowRect(&rect); 78 | SetMinTrackSize(CSize(GetMinWidth(), rect.Height())); 79 | 80 | //EnableSaveRestore("Wizard97"); 81 | 82 | return TRUE; // return TRUE unless you set the focus to a control 83 | // EXCEPTION: OCX Property Pages should return FALSE 84 | } 85 | -------------------------------------------------------------------------------- /ResizableWizard97/WizSheet.h: -------------------------------------------------------------------------------- 1 | // WizSheet.h : header file 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #if !defined(AFX_SAMPWIZP_H__99E7B18F_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 14 | #define AFX_SAMPWIZP_H__99E7B18F_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_ 15 | 16 | #include "ResizableSheetEx.h" 17 | 18 | #if _MSC_VER > 1000 19 | #pragma once 20 | #endif // _MSC_VER > 1000 21 | 22 | #include "IntroPg.h" 23 | #include "IntroPgNew.h" 24 | #include "Int1.h" 25 | #include "Int2.h" 26 | #include "Complete.h" 27 | #include "CompleteNew.h" 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | // CWizard97Sheet 31 | 32 | class CWizard97Sheet : public CResizableSheetEx 33 | { 34 | DECLARE_DYNAMIC(CWizard97Sheet) 35 | 36 | // Construction 37 | public: 38 | CWizard97Sheet(BOOL bOldStyle); 39 | 40 | // Attributes 41 | public: 42 | CIntroPage m_Intro; 43 | CIntroPageNew m_IntroNew; 44 | CInterior1 m_Interior1; 45 | CInterior2 m_Interior2; 46 | CCompletion m_Completion; 47 | CCompletionNew m_CompletionNew; 48 | 49 | CBitmap m_bmpWatermark; 50 | CBitmap m_bmpHeader; 51 | 52 | // Operations 53 | public: 54 | 55 | // Overrides 56 | // ClassWizard generated virtual function overrides 57 | //{{AFX_VIRTUAL(CWizard97Sheet) 58 | //}}AFX_VIRTUAL 59 | 60 | // Implementation 61 | public: 62 | virtual ~CWizard97Sheet(); 63 | 64 | // Generated message map functions 65 | protected: 66 | //{{AFX_MSG(CWizard97Sheet) 67 | virtual BOOL OnInitDialog(); 68 | //}}AFX_MSG 69 | DECLARE_MESSAGE_MAP() 70 | }; 71 | 72 | ///////////////////////////////////////////////////////////////////////////// 73 | 74 | //{{AFX_INSERT_LOCATION}} 75 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 76 | 77 | #endif // !defined(AFX_SAMPWIZP_H__99E7B18F_4A5C_11D1_BF2C_00C04FC99F83__INCLUDED_) 78 | -------------------------------------------------------------------------------- /ResizableWizard97/Wizard97.cpp: -------------------------------------------------------------------------------- 1 | // Wizard97.cpp : Defines the class behaviors for the application. 2 | // 3 | // This is a part of the Microsoft Foundation Classes C++ library. 4 | // Copyright (C) 1992-1998 Microsoft Corporation 5 | // All rights reserved. 6 | // 7 | // This source code is only intended as a supplement to the 8 | // Microsoft Foundation Classes Reference and related 9 | // electronic documentation provided with the library. 10 | // See these sources for detailed information regarding the 11 | // Microsoft Foundation Classes product. 12 | 13 | #include "stdafx.h" 14 | #include "Wizard97.h" 15 | #include "WizSheet.h" 16 | 17 | #ifdef _DEBUG 18 | #define new DEBUG_NEW 19 | #undef THIS_FILE 20 | static char THIS_FILE[] = __FILE__; 21 | #endif 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // CWizard97App 25 | 26 | BEGIN_MESSAGE_MAP(CWizard97App, CWinApp) 27 | //{{AFX_MSG_MAP(CWizard97App) 28 | // NOTE - the ClassWizard will add and remove mapping macros here. 29 | // DO NOT EDIT what you see in these blocks of generated code! 30 | //}}AFX_MSG 31 | ON_COMMAND(ID_HELP, CWinApp::OnHelp) 32 | END_MESSAGE_MAP() 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | // CWizard97App construction 36 | 37 | CWizard97App::CWizard97App() 38 | { 39 | // TODO: add construction code here, 40 | // Place all significant initialization in InitInstance 41 | } 42 | 43 | ///////////////////////////////////////////////////////////////////////////// 44 | // The one and only CWizard97App object 45 | 46 | CWizard97App theApp; 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // CWizard97App initialization 50 | 51 | BOOL CWizard97App::InitInstance() 52 | { 53 | // use old style wizard (ala Wizard97 with IE4) 54 | { 55 | CWizard97Sheet dlg(TRUE); 56 | dlg.DoModal(); 57 | } 58 | 59 | // display a new style wizard (ala Windows 2000) 60 | { 61 | CWizard97Sheet dlg(FALSE); 62 | dlg.DoModal(); 63 | } 64 | 65 | // Since the dialog has been closed, return FALSE so that we exit the 66 | // application, rather than start the application's message pump. 67 | return FALSE; 68 | } 69 | -------------------------------------------------------------------------------- /ResizableWizard97/Wizard97.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "Wizard97"=.\Wizard97.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | Begin Project Dependency 15 | Project_Dep_Name ResizableLib 16 | End Project Dependency 17 | }}} 18 | 19 | ############################################################################### 20 | 21 | Project: "ResizableLib"=..\ResizableLib\ResizableLib.dsp - Package Owner=<4> 22 | 23 | Package=<5> 24 | {{{ 25 | }}} 26 | 27 | Package=<4> 28 | {{{ 29 | }}} 30 | 31 | ############################################################################### 32 | 33 | Global: 34 | 35 | Package=<5> 36 | {{{ 37 | }}} 38 | 39 | Package=<3> 40 | {{{ 41 | }}} 42 | 43 | ############################################################################### 44 | 45 | -------------------------------------------------------------------------------- /ResizableWizard97/Wizard97.h: -------------------------------------------------------------------------------- 1 | // Wizard97.h : main header file for the WIZARD97 application 2 | // 3 | 4 | #if !defined(AFX_WIZARD97_H__9D85AAA5_59C4_11D1_A4EC_00C04FD91A9F__INCLUDED_) 5 | #define AFX_WIZARD97_H__9D85AAA5_59C4_11D1_A4EC_00C04FD91A9F__INCLUDED_ 6 | 7 | #if _MSC_VER > 1000 8 | #pragma once 9 | #endif // _MSC_VER > 1000 10 | 11 | #ifndef __AFXWIN_H__ 12 | #error include 'stdafx.h' before including this file for PCH 13 | #endif 14 | 15 | #include "resource.h" // main symbols 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // CWizard97App: 19 | // See Wizard97.cpp for the implementation of this class 20 | // 21 | 22 | class CWizard97App : public CWinApp 23 | { 24 | public: 25 | CWizard97App(); 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CWizard97App) 30 | public: 31 | virtual BOOL InitInstance(); 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | 36 | //{{AFX_MSG(CWizard97App) 37 | // NOTE - the ClassWizard will add and remove member functions here. 38 | // DO NOT EDIT what you see in these blocks of generated code ! 39 | //}}AFX_MSG 40 | DECLARE_MESSAGE_MAP() 41 | }; 42 | 43 | 44 | ///////////////////////////////////////////////////////////////////////////// 45 | 46 | //{{AFX_INSERT_LOCATION}} 47 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 48 | 49 | #endif // !defined(AFX_WIZARD97_H__9D85AAA5_59C4_11D1_A4EC_00C04FD91A9F__INCLUDED_) 50 | -------------------------------------------------------------------------------- /ResizableWizard97/res/Baner16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableWizard97/res/Baner16.bmp -------------------------------------------------------------------------------- /ResizableWizard97/res/Baner256.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableWizard97/res/Baner256.bmp -------------------------------------------------------------------------------- /ResizableWizard97/res/Water16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableWizard97/res/Water16.bmp -------------------------------------------------------------------------------- /ResizableWizard97/res/Water256.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableWizard97/res/Water256.bmp -------------------------------------------------------------------------------- /ResizableWizard97/res/Wizard97.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppescher/resizablelib/733ea0d9bf0346d88dac460d19b656d3efc3a210/ResizableWizard97/res/Wizard97.ico -------------------------------------------------------------------------------- /ResizableWizard97/res/Wizard97.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // WIZARD97.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /ResizableWizard97/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by Wizard97.rc 4 | // 5 | #define IDS_SAMPLEWIZARD 1 6 | #define IDS_HEADERTITLE 2 7 | #define IDS_HEADERSUBTITLE 3 8 | #define IDS_ABOUTBOX 101 9 | #define IDB_BANNER_OLD 103 10 | #define IDB_WATERMARK_OLD 106 11 | #define IDC_BIGBOLDTITLE 107 12 | #define IDC_BOLDTITLE 108 13 | #define IDC_TRANSPARENT1 109 14 | #define IDC_TRANSPARENT2 110 15 | #define IDC_TRANSPARENT3 111 16 | #define IDC_LIST1 112 17 | #define IDC_BUTTON1 113 18 | #define IDC_RADIO1 114 19 | #define IDC_RADIO2 115 20 | #define IDD_INTRO_NEW 116 21 | #define IDD_INTERIOR1_NEW 117 22 | #define IDD_INTERIOR1 117 23 | #define IDD_INTERIOR2_NEW 118 24 | #define IDD_INTERIOR2 118 25 | #define IDD_COMPLETION_NEW 119 26 | #define IDR_MAINFRAME 128 27 | #define IDB_BANNER_NEW 129 28 | #define IDB_WATERMARK_NEW 130 29 | #define IDD_COMPLETION 131 30 | #define IDD_INTRO 132 31 | #define IDC_EDIT1 1000 32 | #define IDC_STATIC1 1000 33 | #define IDC_STATIC2 1001 34 | #define IDC_GROUP1 1002 35 | #define IDC_STATIC_TITLE 1003 36 | #define IDC_STATIC3 1004 37 | 38 | // Next default values for new objects 39 | // 40 | #ifdef APSTUDIO_INVOKED 41 | #ifndef APSTUDIO_READONLY_SYMBOLS 42 | #define _APS_NEXT_RESOURCE_VALUE 133 43 | #define _APS_NEXT_COMMAND_VALUE 32771 44 | #define _APS_NEXT_CONTROL_VALUE 1006 45 | #define _APS_NEXT_SYMED_VALUE 101 46 | #endif 47 | #endif 48 | --------------------------------------------------------------------------------