|
|
Comments and Discussions
|
|
 |

|
Hello Paolo,
I debuged the library with VS2005 on XP today an I think this bug occurs, because in function CResizableDialog::OnNcCreate SetMinTrackSize(CSize(lpCreateStruct->cx, lpCreateStruct->cy)) is called before MakeResizable(lpCreateStruct) and in function CResizableLayout::MakeResizable the style of the window is modified, so the dimension of the window changes.
If you call SetMinTrackSize after MakeResizable all is fine.
Andreas.
|
|
|
|

|
Paolo,
First of thanks for the excellent library.
First question, is the SF CVS rep the latest and greatest? I’m just curious as its showing 11 months since the last change.
Problems I’ve found and solved:
I found a problem if you try to anchor an OLE control (ChartFX). Basically you get an exception because the hWnd can’t be extracted by AddAnchor. I changed it to the following:
void AddAnchor(UINT nID, ANCHOR anchorTopLeft, ANCHOR anchorBottomRight)
{
HWND hWnd = ::GetDlgItem(GetResizableWnd()->GetSafeHwnd(),nID);
if (!hWnd)
{
CWnd * pControl = GetResizableWnd()->GetDlgItem(nID);
hWnd = pControl ? pControl->GetSafeHwnd() : 0;
}
AddAnchor(hWnd, anchorTopLeft, anchorBottomRight);
}
This is the approach I noticed MS used to handle OLE controls while debugging into a DDX control binding for the same OLE control.
Problems I have:
If I create a 1 x 2 matrix (i.e. embed a 2 row splitter into a 2 column splitter and have essentially 3 panes) I have problems resizing the frame. The left pane is a CEditView, while the other two views are in-house views. I can email it to you if you like. I modified one of your demos and reproduced the same problem. I ported your library to VC2008 but I’m still running a VC2005 version if that helps.
Anyway the problem is the frame basically gets a mind of its own. When you initially open it up things look okay, but if I click the resize widget the frame shrinks a bit and then I can’t resize it beyond a certain amount. It appears to be resizing to some amount bound by the min column/row sizes set during splitter view creation.
Grazie Tanto - I was born in Naples. My parents now live there again and my wife and I love to travel in Italy. BTW my mother is Greek (hence the forum name).
Pavlo
|
|
|
|

|
Hi Pavlo,
Yes, code on SourceForge is the latest available.
The problem with ActiveX ID was known and there is a work-around somewhere in the forums. Basically you just need to associate a member variable with the control and use that with AddAnchor (the variant that takes an HWND, not a control ID).
You may send me a (as smallest as possible) demo project for VC++ 6.0 or VS2008. It could be the occasion to resume a bit of work on this project.
Glad to hear you like my country, but sad because I dislike its governants!
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)
|
|
|
|

|
I've not used code project to send email messages before and I realized that perhaps it's "email" is also tied to your yahoo email which I discovered yesterday is probably no longer valid because of the bounce back I got. Just wanted to ping you to see if you got my message yesterday and that I need your email to send you the test project.
Pavlos
|
|
|
|

|
That's strange, I have updated the copyright notice inside each source file with my new email address a long time ago. Also, I don't know if you can send attachments via codeproject.
Anyway, just replace yahoo dot com with hotmail dot com and you'll get my new address.
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)
|
|
|
|
|

|
Hi Pavlo,
I got your Demo project and I found there was an overflow in min/max calculations for splitters.
The fix is to replace code at line 119 in ResizableSplitterWnd.cpp with this:
if (sizeMax.cx != LONG_MAX)
sizeMax.cx += 2*m_cxBorder - m_cxSplitterGap;
if (sizeMax.cy != LONG_MAX)
sizeMax.cy += 2*m_cyBorder - m_cySplitterGap;
There is still room for improvement in splitter code however, since the parent window does get the total min/max size correctly, but it does not move its internal splitter bars to accommodate its child views individual constraints.
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)
|
|
|
|

|
Paolo,
Thank you very much. Sorry it's taken me so long to respond to you but work and life have been very hectic as of late. I finally had the chance (I'd been on a C#/WPF project for a few months as well as in Italy visiting my parents for a month in April/May) to apply your fix. Works like a charm
|
|
|
|
|

|
In step1 Page, has two RADIO fot select,
RADIO1 set next page to Step2
RADIO1 set next page to Step3
#include "WizSheet.h"
LRESULT CPageSelect::OnWizardNext()
{
BOOL bNew= IsDlgButtonChecked(IDC_RADIO2);
CWizard97Sheet* sheet = (CWizard97Sheet*) GetParent();
ASSERT_KINDOF(CWizard97Sheet, sheet);
if (bNew)
sheet->addNew();
else
sheet->addOld();
return CPropertyPageEx::OnWizardNext();
}
CWizard97Sheet::addOld()
{
while(GetPageCount() > 1)
RemovePage(1);
AddPage(&m_Intro);
AddPage(&m_Interior1);
AddPage(&m_Interior2);
AddPage(&m_Completion);
}
CWizard97Sheet::addNew()
{
while(GetPageCount() > 1)
RemovePage(1);
AddPage(&m_IntroNew);
AddPage(&m_Interior1);
AddPage(&m_Interior2);
AddPage(&m_CompletionNew);
}
AddPage throw error.
|
|
|
|
 |
|
|
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,328 |
| Downloads | 22,479 |
| Bookmarked | 240 times |
|
|