- Main Page
- Namespaces
- Classes
- Files
- Directories

- File List
- File Members

# ResizableDialog.h

    00001 #if !defined(AFX_RESIZABLEDIALOG_H__INCLUDED_)
    00002 #define AFX_RESIZABLEDIALOG_H__INCLUDED_
    00003
    00004 #if _MSC_VER > 1000
    00005 #pragma once
    00006 #endif // _MSC_VER > 1000
    00007
    00008 // ResizableDialog.h : header file
    00009 //
    00011 //
    00012 // Copyright (C) 2000-2002 by Paolo Messina
    00013 // (http://www.geocities.com/ppescher - ppescher@yahoo.com)
    00014 //
    00015 // The contents of this file are subject to the Artistic License (the "License").
    00016 // You may not use this file except in compliance with the License.
    00017 // You may obtain a copy of the License at:
    00018 // http://www.opensource.org/licenses/artistic-license.html
    00019 //
    00020 // If you find this code useful, credits would be nice!
    00021 //
    00023
    00024 #include "ResizableLayout.h"
    00025 #include "ResizableGrip.h"
    00026 #include "ResizableMinMax.h"
    00027 #include "ResizableState.h"
    00028 #include "..\CmdUI\CmdUI.h"
    00029
    00031 // CResizableDialog window
    00032
    00033 class CResizableDialog : public CCmdUIDialog, public CResizableLayout,
    00034                                                  public CResizableGrip, public CResizableMinMax,
    00035                                                  public CResizableState
    00036 {
    00037
    00038 // Construction
    00039 public:
    00040         CResizableDialog();
    00041         CResizableDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL);
    00042         CResizableDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);
    00043
    00044 // Attributes
    00045 private:
    00046         // support for temporarily hiding the grip
    00047         DWORD m_dwGripTempState;
    00048
    00049         // flags
    00050         BOOL m_bEnableSaveRestore;
    00051         BOOL m_bRectOnly;
    00052
    00053         // internal status
    00054         CString m_sSection;                     // section name (identifies a parent window)
    00055
    00056 // Operations
    00057 public:
    00058
    00059 // Overrides
    00060         // ClassWizard generated virtual function overrides
    00061         //{{AFX_VIRTUAL(CResizableDialog)
    00062         protected:
    00063         //}}AFX_VIRTUAL
    00064
    00065 // Implementation
    00066 public:
    00067         virtual ~CResizableDialog();
    00068
    00069 // used internally
    00070 private:
    00071         void PrivateConstruct();
    00072
    00073 // callable from derived classes
    00074 protected:
    00075         // section to use in app's profile
    00076         void EnableSaveRestore(LPCTSTR pszSection, BOOL bRectOnly = FALSE);
    00077
    00078         virtual CWnd* GetResizableWnd()
    00079         {
    00080                 // make the layout know its parent window
    00081                 return this;
    00082         };
    00083
    00084 // Generated message map functions
    00085 protected:
    00086         //{{AFX_MSG(CResizableDialog)
    00087         afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
    00088         afx_msg void OnSize(UINT nType, int cx, int cy);
    00089         afx_msg void OnDestroy();
    00090         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
    00091         afx_msg BOOL OnEraseBkgnd(CDC* pDC);
    00092         //}}AFX_MSG
    00093         DECLARE_MESSAGE_MAP()
    00094 };
    00095
    00097
    00098 //{{AFX_INSERT_LOCATION}}
    00099 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
    00100
    00101 #endif // !defined(AFX_RESIZABLEDIALOG_H__INCLUDED_)