|
|
Comments and Discussions
|
|
 |

|
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.
|
|
|
|

|
Hi _andrey_,
I had same error, but when i add "resizeableformview.h (and .cpp) and resizeablelayout.h (and .cpp) under dll solution explorer, the problem solved.
hope that helps you as well
Moslem SALEH
|
|
|
|

|
Hello,
I have to draw the width of a property sheet and I need to have the width of this sheet dynamic. So I create the sheet with the pages and then I calculate the width and set this width of the sheet with setWindowPos.
Now the sheet grows bigger but the pages stay the same. Is there any special function I need to use when I change the size of a window so the pages resize too?
when I resize the window with the mouse and the grip everyting works perfect.
Thx and greetz
Ric
|
|
|
|

|
If the resize works when using the mouse, it has to work also with SetWindowPos. Make sure you pass SWP_NOACTIVATE | SWP_NOZORDER as flags and nothing else, or try to force SWP_FRAMECHANGED.
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)
modified on Saturday, March 27, 2010 6:23 AM
|
|
|
|

|
If I put a List Control on a CResizableDialog or CResizablePropertyPage and the resources 'View' property is set to 'Report' the entire Dialog/Page is blank. For example a simple dialog with a report and a few control buttons shows up as grey. As soon as the 'View' property is set to anything but 'Report' (Icon, List, or Small Icon) the problem goes away.
I've not found others talking about this on the forum and considering. Could this be a missing window style on the parent/control?
|
|
|
|

|
Hi,
I try to test your lib.
I have search for a solutions in posts but didn't found nothing
I have do exactly what you said
- put demo and lib in same folder
- add the lib project in the demo
- build
But visual studio 2008 show 98 errors LNK2001 and LNK2019 like this
Error 89 error LNK2001: unresolved external symbol "protected: virtual int __thiscall CResizableSheetEx::CalcSizeExtra(struct HWND__ *,class CSize,class CSize &)" (?CalcSizeExtra@CResizableSheetEx@@MAEHPAUHWND__@@VCSize@@AAV3@@Z) WizSheet.obj Wizard97
How can I resolv those errors and test the lib ?
thanks
How can
|
|
|
|

|
Hello,
I found the bug, that it is possible to size a dialog smaller (2 pixel) than the original size (resource) started with.
I tested this with the first dialog "IDD_DEMO_DIALOG" of the DemoDlg application.
Andreas.
|
|
|
|

|
Great!
Do you also have a fix for that?
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)
|
|
|
|

|
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.
|
|
|
|

|
I know, If AddPage Class is derive from CResizablePageEx, then throw error.
|
|
|
|

|
I am using release version 1.3 to upgrade some legacy code
one dialog had the inherit layout property set to false.
It would not resize the controls correctly.
This should be stated in the instructions (or overridden in the code).
Once I change the setting everything worked as expected
|
|
|
|
|

|
after a little use of the search function i thought i should explain further...
MyFormView - contains:
a MyTabControl
a MyDlg1
a MyDlg2
MyFormView and both the dialogs are derived from the appropriate resizable classes.
MyFormView::MyFormView instantiates the dialogs.
MyFormView::OnInitDialog 'creates' the dialogs and adds them to MyTabControl, which positions them correctly.
I anchor MyTabControl here also.
Should i be anchoring the Dlgs in MyFormView::OnInitDialog after MyTabControl has positioned them?
And anchoring the dialog's controls in their own OnInitDialog routine?
unless i hear otherwise i'll try this when i get back to the office and post my results.
thanks in advance
|
|
|
|

|
no luck...
the below function works for EITHER the tab OR the dialog, i cant seem to get them both to resize... unfortunately if the dialog resizes it gets clipped by the tab control
BOOL MyFormView::OnInitDialog()
{
...
AddAnchor(IDC_MY_TAB, TOP_LEFT, BOTTOM_RIGHT);
//AddAnchor(m_tabPages1->m_hWnd, BOTTOM_RIGHT, BOTTOM_RIGHT);
...
}
|
|
|
|

|
Hi David,
Working with the tab control requires a little more work than a simple AddAnchor() call.
You should have a look at CResizableSheet::PresetLayout() and CResizableSheet::ArrangeLayoutCallback in the library sources. You need to do the same in your parent window, which I guess is the FormView. Just remove the code wrapped in "if (IsWizard())" branches and get help from the comments.
The idea here is that you need a callback to determine which is the currently active page of the tab control and provide layout info for the visible dialog.
The tab itself must be anchored as any other control in the FormView, and its calculated position is used to align the dialog in the current page.
I hope this will put you on the right track.
Oh, another way to accomplish this is to simply use a modeless PropertySheet as a child of the FormView. The library should support such a scenario. And if something strange happens, try the latest code from CVS.
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)
|
|
|
|

|
Paulo - thanks for your quick and comprehensive reply, it works great
Once I added the correct notify and reflected message handlers everything's as it should be.
Thanks again.
D!
modified on Tuesday, October 28, 2008 3:34 PM
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
A set of classes to ease the development of resizable windows with MFC
| Type | Article |
| Licence | CPOL |
| First Posted | 10 Jun 2001 |
| Views | 742,410 |
| Downloads | 22,555 |
| Bookmarked | 240 times |
|
|