[Ieleak-commit] SF.net SVN: ieleak: [102] trunk/sieve/src
Brought to you by:
matthiasmiller
From: <cor...@us...> - 2006-07-10 15:27:07
|
Revision: 102 Author: cordys-os Date: 2006-07-10 08:26:59 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/ieleak/?rev=102&view=rev Log Message: ----------- - EASYSIZE (Better implementation to support autoresize of controls) Modified Paths: -------------- trunk/sieve/src/PropDlg.cpp trunk/sieve/src/PropDlg.hpp Modified: trunk/sieve/src/PropDlg.cpp =================================================================== --- trunk/sieve/src/PropDlg.cpp 2006-07-10 15:26:09 UTC (rev 101) +++ trunk/sieve/src/PropDlg.cpp 2006-07-10 15:26:59 UTC (rev 102) @@ -36,6 +36,21 @@ ON_BN_CLICKED(IDC_PROPERTIES_BUTTON, OnBnClickedPropertiesButton) END_MESSAGE_MAP() + +BEGIN_EASYSIZE_MAP(CPropDlg) + //EASYSIZE(<control id>, left, top, right, bottom, options) + + //Anchored to top/right + EASYSIZE(IDC_PROPERTIES_BUTTON, ES_KEEPSIZE, ES_BORDER, ES_BORDER, ES_KEEPSIZE, 0) + EASYSIZE(IDOK, ES_KEEPSIZE, ES_BORDER, ES_BORDER, ES_KEEPSIZE, 0) + + //Anchored to left + top + right + bottom + EASYSIZE(IDC_PROPLIST, ES_BORDER, ES_BORDER, ES_BORDER, ES_BORDER, 0) + + //EASYSIZE(<control id>, left, top, right, bottom, options) +END_EASYSIZE_MAP + + bool GetPropertyValue(CComPtr<IDispatchEx> object, CStringW propertyName, VARIANT& result) { DISPID dispId; @@ -247,27 +262,19 @@ if (m_propList.GetItemCount() > 0) m_propList.SetItemState(0, LVIS_SELECTED, LVIS_SELECTED); - // Set up resizing - // - m_resizeHelper.Init(m_hWnd); - m_resizeHelper.Fix(IDC_PROPLIST, DlgResizeHelper::kLeftRight, DlgResizeHelper::kTopBottom); - m_resizeHelper.Fix(IDC_PROPERTIES_BUTTON, DlgResizeHelper::kWidthRight, DlgResizeHelper::kHeightTop); - m_resizeHelper.Fix(IDOK, DlgResizeHelper::kWidthRight, DlgResizeHelper::kHeightTop); - updateButtons(); + INIT_EASYSIZE; return TRUE; } void CPropDlg::OnPaint() { CDialog::OnPaint(); - m_resizeHelper.OnGripperPaint(); } UINT CPropDlg::OnNcHitTest(CPoint point) { UINT ht = CDialog::OnNcHitTest(point); - m_resizeHelper.OnGripperNcHitTest(point, ht); return ht; } @@ -353,7 +360,8 @@ } void CPropDlg::OnSize(UINT nType, int cx, int cy) { - m_resizeHelper.OnSize(); + CDialog::OnSize(nType, cx, cy); + UPDATE_EASYSIZE; } void CPropDlg::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) Modified: trunk/sieve/src/PropDlg.hpp =================================================================== --- trunk/sieve/src/PropDlg.hpp 2006-07-10 15:26:09 UTC (rev 101) +++ trunk/sieve/src/PropDlg.hpp 2006-07-10 15:26:59 UTC (rev 102) @@ -2,7 +2,6 @@ #include <afxtempl.h> #include "resource.h" -#include "DlgResizeHelper.h" void GetObjectProperties(CComPtr<IDispatchEx> object, CArray<DISPID> &raDispIDs, CArray<CStringW> &rasNames, CArray<CStringW> &rasValues); @@ -18,12 +17,12 @@ // A dialog box for displaying an object's properties and their values. // class CPropDlg : public CDialog { + DECLARE_EASYSIZE private: enum { IDD = IDD_PROPERTIES }; CListCtrl m_propList; CComPtr<IDispatchEx> m_object; CStringW m_titleDesc; - DlgResizeHelper m_resizeHelper; CStringW getPropName(int idx); void updateButtons(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |