|
|
Comments and Discussions
|
|
 |

|
You can inherit from CResizableLayout (and others), the same way as CResizableDialog is doing and copy the basic implementation (OnSize, OnInitDialog, and so on...) to your own class.
If you need to reuse the same logic, you can make another base class, very much like CResizableDialog, but that does not inherit from CDialog. You can then inherit your dialogs from CDialog and from this "window-less" class, and connect window messages to its base implementation.
Just make sure that both your "skin" base class and CResizableLayout have a chance to process OnSize events.
It may become tricky when you have to implement OnEraseBkgnd.
Best,
Paolo
------
Why spend 2 minutes doing it by hand when you can spend all night plus most of the following day writing a system to do it for you? - (Chris Maunder)
|
|
|
|

|
Thanks.I worked it out as you said.void CDlgSimul::OnSize(UINT nType, int cx, int cy)
{
CBaseDialog::OnSize(nType, cx, cy);
ArrangeLayout();
}
class CDlgSimul : public CBaseDialog,CResizableLayout
AddAnchor(IDC_EDIT_REV,TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_STATIC_TRA,BOTTOM_LEFT, BOTTOM_RIGHT);
It workes well.Thanks very much!
|
|
|
|

|
May I ask why not add DECLARE_DYNAMIC(CResizableDialog)
and IMPLEMENT_DYNAMIC(CResizableDialog, CDialog)
to CResizableDialog source files?
So I can replace all "CDialog" to "CResizableDialog" in my TestDlg.cpp including the code "IMPLEMENT_DYNAMIC(CTestDlg , CDialog)"
modified 29 Sep '11 - 9:37.
|
|
|
|
|
|

|
I haven't got the time to dedicate to this code for a long time, it's true.
But that doesn't mean that users of this library cannot do some work on it on their own and then share their improvements. That's the primary reason why I shared the code.
So you decide if it's dead or not.
Paolo------
Why spend 2 minutes doing it by hand when you can spend all night plus most of the following day writing a system to do it for you? - (Chris Maunder)
|
|
|
|

|
Has anyone looked into adding dialog (or control) ratio restrictions?
ie: - keep same aspect ratio while stretching...
Help!
Thanks!
|
|
|
|

|
In my application the propertysheets are modeless. The first time the sheet and its pages are brought up, the sizes are correct. However next time that the sheet and its pages are brought up, size of the sheet and placement of the p[ages has changed, does anyone know whether it is possible at all to use this library for modeless property sheets and pages?
|
|
|
|

|
It is possible, I'm using modeless CResizableSheetEx as a child control in CResizableDialog. 1.4 alpha has several issues with such use. I hope the owner will fix it in the future releases.
1. CResizableLayout::MakeResizable is making parent dialog smaller (approximately by size of the border), as a workaround change your main dialog's Border to Resizing.
2. CListCtrl with View property as Report is the most problematic. CWnd::DefWindosProc bombards property sheet with WM_GETDLGCODE messages, use WS_EX_CONTROLPARENT style when creating property sheet or modify it in OnInitDialog. Such report list controls also have problem with double buffering in CResizableLayout::ClipChildren, it's affecting other childs, disable it by defining RSZLIB_NO_XP_DOUBLE_BUFFER preprocessor.
|
|
|
|

|
Hi,
One of a demo of projects is not Linking.
Libraries are compiled.
Used Library source v1.4 (alpha) and Visual Studio 2008.
Has read through all similar themes but decisions in them has not found.
Help to solve the given problem, or prompt the alternative decision please.
1>------ Build started: Project: Demo, Configuration: Debug Unicode Win32 ------
1>Compiling...
1>StdAfx.cpp
1> WINVER not defined. Defaulting to 0x0600 (Windows Vista)
1>Compiling...
1>Demo.cpp
1>DemoDlg.cpp
1>MyPropertyPages.cpp
1>MyPropertySheet.cpp
1>Generating Code...
1>Compiling resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1>MyPropertyPages.obj : error LNK2001: unresolved external symbol "protected: static struct AFX_MSGMAP const * __stdcall CResizablePage::GetThisMessageMap(void)" (?GetThisMessageMap@CResizablePage@@KGPBUAFX_MSGMAP@@XZ)
1>MyPropertyPages.obj : error LNK2019: unresolved external symbol "public: static struct CRuntimeClass * __stdcall CResizablePage::GetThisClass(void)" (?GetThisClass@CResizablePage@@SGPAUCRuntimeClass@@XZ) referenced in function "protected: static struct CRuntimeClass * __stdcall CMyPropertyPage1::_GetBaseClass(void)" (?_GetBaseClass@CMyPropertyPage1@@KGPAUCRuntimeClass@@XZ)
1>MyPropertyPages.obj : error LNK2019: unresolved external symbol "public: __thiscall CResizablePage::CResizablePage(unsigned int,unsigned int)" (??0CResizablePage@@QAE@II@Z) referenced in function "public: __thiscall CMyPropertyPage1::CMyPropertyPage1(void)" (??0CMyPropertyPage1@@
..... e.t.c.
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
A set of classes to ease the development of resizable windows with MFC
| Type | Article |
| Licence | CPOL |
| First Posted | 10 Jun 2001 |
| Views | 723,163 |
| Downloads | 22,479 |
| Bookmarked | 240 times |
|
|