|
|
Comments and Discussions
|
|
 |

|
I try to use Windows XP Style , but the property pages have another size.
any fix for Windows XP Style ?
Robert
|
|
|
|

|
Hi,
Thanks for writing such a good library.
I am using it and it works fine except When we minimize the window and then again maximize it the widht of the window increases by some amount. I am not able to figure it out. Please help!!
Sanat Tiwari
|
|
|
|

|
This dialog class does not appear to have effect on the chris maunder grid control ? Or do I need to do some extra work on the grid class ?
|
|
|
|

|
I've been using your CResizableDialog class for a couple months now, and I really appreciate how easy it makes it to make my program's main dialog dynamically resizable. Unfortunately, I've been getting reports from some people (both on ME and XP) that when starting up my program, it is only visible on the taskbar and they can't restore it. I'm using EnableSaveRestore with RectOnly=True, so I can't understand why that would be happening. As soon as the users deletes the registry key that saves the dialog's state, the program starts up fine. Please help; I'd rather not be forced to stop using this helpful class
|
|
|
|

|
I was just thinking to myself yesterday while I kicked and screamed at trying to get my stinking controls to stretch and grow the way I need them to that I really miss this class! MFC was my bread and butter for years and there are times when I really miss it. This class, to this day, remains the most heavily used piece of shared code I've ever downloaded.
Nowadays I'm 99.9% .NET (a pretty even mix of VB.NET and C#) with a little bit of old ATL COM still thrown into the mix on occasion and I'd give ANYTHING to have this project converted into a proper layout manager for Winforms for use in VB.NET and C#. The new features in Winforms for Docking and Anchoring are really great and do the job more often than not with very little effort... but there are so many times when they fall way short and I never came across a scenario with CResizableDialog that would not allow me to lay out my controls in the manner I frequently need to (more than 1 or 2 controls on a "line").
At any rate, if you do ever make the switch, PLEASE consider writing this for .NET.
|
|
|
|

|
Paolo
Very useful implementation. However, I had the need to use an ActiveX Control (Component One's FlexGrid) in the dialog which caused an ASSERT failure when AddAnchor is called. Tested this with VideoSoft's Flexgrid with a similar result.
Is this known issue?
Thanks,
Alex
|
|
|
|

|
I've been using this for a while but I've found another class that I'd like to use for skinning the dialogs which also requires a find and replace of all the CDialog instances.
Is there a way to get them both working at the same time or a different way of doing it that might work?
If not, does anyone know how to get rid of the border if you set the dialog border property to resizable? If I'm using a transparent, or non-rectangular image for the dialog, I'd like to add a grip somewhere on the skin and hide the border.
Thanks,
Don
|
|
|
|

|
I installed the latest sdk from ms. It was necessary to
add the lib and include directories to the project setup as extra directories in the project setup to get Visual Studio to know they are there. I was able to get past the undeclared identifier error by including this
#if !defined (WC_STATIC)
#define WC_STATIC TEXT("Static")
#endif
#if !defined (WC_LISTBOX)
#define WC_LISTBOX TEXT("ListBox")
#endif
#if !defined (WC_BUTTON)
#define WC_BUTTON TEXT("Button")
#endif
If I did not include the #defines, I still got the undeclared identifier error. If I include them without the #if, then I got a duplicate definition error.
Now I am getting
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: __setmbcp already defined in libcmtd.lib(mbctype.obj)
LINK : warning LNK4098: defaultlib "mfc42d.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "mfcs42d.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/WSP.exe : fatal error LNK1169: one or more multiply defined symbols found
I have been through all the other messages and do not see where anybody else is having this problem.
Suggestions?
Thanks for your continued interest in this work.
Gleason
|
|
|
|

|
I am using "Oscilloscope/StripChart Control By Mark C. Malburg " for a simple graph dilaog. Especially, dialog resizing can be easily done by this article thankfully.
According to the Malburg documentation,the graph is created and drawn on the picture control. So, when I resize the main dialog, picture control can resize normally. However a part of graph on the picture control can be never redrawn in this situation. Because I have fixed the Onsize function in graph class, graph resizing can be obtained but a part of graph on expanded area can not be redrawn.
How can I resize the graph control perfectly?
I am waiting for your kind suggestion and comment.
|
|
|
|
|

|
Hello,
First of all, great job! My controls are finally lining up exactly the way I wanted them to, but I just have one minor problem and I'm sure it's real easy to overcome, but I'm fairly new to C++.
I have a simple MFC Dialog box in which I do NOT want the user to be able to resize, but rather have the application resize the dialog box automatically upon startup, based on the users screen resolution, ie. 800x600, 1024x768, etc.
Is there a simple way to make the dialog box NOT resizable by the user, or do I have to add code for min and max thresholds for each possible resolution? No big deal if that's what I have to do, as I already have "if, then" statements in place for each possible resolution, but could you explain such a process in layman's terms?
Thanks!
Don
|
|
|
|

|
Hi, i am new to visual c++ and has started to do a project.
I added the library to the workplace as what you told in the article. But when i wanted to execute the program it gave me some error.
--------------------------------------------------------------------------------------------------Configuration: ResizableLib - Win32 Release Static--------------------
Compiling...
ResizableLayout.cpp
C:\WINNT\Profiles\student\Desktop\For Testing\IETEST\ResizableLib_1_3\ResizableLib\ResizableLayout.cpp(323) : error C2065: 'WC_STATIC' : undeclared identifier
C:\WINNT\Profiles\student\Desktop\For Testing\IETEST\ResizableLib_1_3\ResizableLib\ResizableLayout.cpp(365) : error C2065: 'WC_LISTBOX' : undeclared identifier
C:\WINNT\Profiles\student\Desktop\For Testing\IETEST\ResizableLib_1_3\ResizableLib\ResizableLayout.cpp(407) : error C2065: 'WC_BUTTON' : undeclared identifier
Error executing cl.exe.
ResizableLib.lib - 3 error(s), 0 warning(s)
------------------------------------------------------------------------------Did i done anything wrong? Can anyone kind enough to guide me along? Thanks
|
|
|
|

|
i add resizedialog.h in my project and on my dialog form form i add ok and cancel button
i fellow your steps and when linking i can resize my form but the resizer isn't visible,
Please help,
Thanks
Bye
liuqid
|
|
|
|

|
I Created a Dialog base project,and added some ComboBox(DropList).However,after i resized the dialog ,the combobox can not list
|
|
|
|

|
When I derive my dailog form CResizableDialog class. If I remove all the button such as the default OK button and Cancel button. The grip will twinkle. If Mr P.L can give me your E-mail I will send a example source code to you. Thank you!
|
|
|
|

|
Inside my main CResizableDialog application dialog, I have a child window (modeless) that contains a list control. I would like to resize this child window automatically as I resize my application dialog, as well as automatically resize the list control inside the child window. When I tried to Add an Anchor to the child window, I got an error. How do I get to resize this child window when I resize the application window? Does my child window need to be a CResizableDialog object?
Thanks A Million,
|
|
|
|

|
First ,u have done an excellent job ,but there is a little question :
i create a dialog base project ,and add sentence in OnInitDialog()
AddAnchor(IDOK,BOTTOM_RIGHT);
AddAnchor(IDCANCEL,TOP_RIGHT);
When i resize the dialog ,the OK & cancel button will not be update !
|
|
|
|

|
I have a fixed size dialog.
I have list of tree items on the left view and when I click one of the nodes I want to display the dialog in the right view
with the condition that if the size of the dialog is bigger than the view then I'll have to provide the scroll bars to navigate.
I don't want to change the size of the dialogs at all.
My dialogs are all modal dialogs. I'm using splitter window to create two separate view.
Left side is the tree view and right side is the form view.
I want all my controls in the dialog in tact.
My view on the right side is a form view.
Can you provide some help regarding this.
Thanks
|
|
|
|

|
I wonder if anyone else has encountered these problems -
I'm currently using Windows XP with the default theme enabled. The resized controls don't behave as expected. Most of them leave ghost 'blocks' of unpainted areas after the move.
I did a little digging around and it seems that if I disable the LikesClipping() function (i.e. make it always return FALSE), most of the problems go away.
Another problem was with group boxes. This seems to be a bug in WindowsXP: resizing the group box using DeferWindowPos() leaves the lower-right hand side of the control unpainted. I fixed this by calling SetWindowPos() for group controls and leaving DeferWindowPos() for the rest of them.
If anybody else could corroborate my findings, I'd be happy to share my code updates.
Cheers,
-Oz
---
Grab WndTabs from http://www.wndtabs.com to make your VC++ experience that much more comfortable...
|
|
|
|
|
|

|
Hi Paolo,
Great project. I see that the dialogs have a resize gripper. In an app I wrote the only way I could find to get a gripper was to add a status bar but since I did not really need one, except to get the gripper, I called SetParts(1, 0) which is OK but it means you have a large border at the bottom.
I tried to implement what you have done in your dialogs and can get a gripper displayed and it stays in the corner when the dialog is resized, but it won't work Moving the cursor over it doesn't give the resize cursor.
Can you tell me which part of your code actually activates it?
Regards,
PArish
while (!asleep)
code();
|
|
|
|

|
Hello,
Can some one tell me how to write a dialog application with MFC that on execution disables the Windows Task Menu and automatically runs on Full Screem Modus??? Alternatively, one can choose the option to run in Full Screen modus and effect the same thing above.
Also, can some one also tell me how to influence the bg color of Dialog boxes like in the case above?? for example I want to have a background color like Black or Red in stead of the usual Windows default grey.
mail me if neccessary at kennteh@hotmail.com or post the reply simply on this forum.
Thanks
Kenneth
|
|
|
|

|
Hi,
Looks great, I would realy like to use it in our project, but is there any way for me to use the lib in a more conventional sense, (ie without adding the project as a dependancy of my own).
It may seem a stange questsion but I just prefer it that way.
Regards
Dave Griggs
Ubitrade Asia Pacific
|
|
|
|

|
I want to Resize the Windows Comon Dialog as File open dialog with a button placwed on the same dialog i did
it but is not working on win 2000 have u any idea.....?
|
|
|
|

|
Hello,
I want to use that CResizableDialog-class, which is great so far...
...but it won't calculate the client area properly once the dialog has a menu. Where would one have to start within ResizableLib to get this fixed?
I's appreciate very much if u could give me a hint...
thx in advance and with great respect to your work
solong Carsten
|
|
|
|
|

|
My dialog ressource has a button control defined. I want to hide this button in a context. The showing of the dialog is OK if base class is CDialog. After using ResizableLib the background place of the hided button control isn't repainted. Who knows a solution for this problem?
|
|
|
|

|
I tried to use your class with a web browser control on a dlg (CWebBrowser2) activeX but it would not resize.
I wonder why???
djpulse
|
|
|
|

|
I have a problem related to my project.
The project is designed like this:
Two different users(Super user & normal user) have two different menu. If I login as a normal user first. Some menu items will be deleted according to limitation of normal user. Then I logoff and login again as a super user(notice: without closing the window and application). Then it should show the whole menu items(since super user can see anything) if I use file open or file new. But unfortunatly the menu still is the non superuser menu.
This happens becsause MFC initiates the frame or menu once and then uses the shared menu later on.
I'm think of reloading the menu or frame from rc file again to solve this problem. But I wondered how I can do it or if you guys can think another way to solve this problem.
Thanks in advance!
Thanks very much
Amber
|
|
|
|
|

|
Thanks!
Rob Jones
|
|
|
|

|
I have a problem with a activx.
I put a activx, a gantt, in a dialog, and my problem is:
the variable "wnd" in the addanchor function for the gantt is NULL, and so the dialog crashes.
if is somebady with some solution, please answer.
Thanks.
Bogdan
|
|
|
|

|
can you expand on the following copyright notice
/////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2000 by Paolo Messina
// (ppescher@yahoo.com)
//
// Free for non-commercial use.
// You may change the code to your needs,
// provided that credits to the original
// author is given in the modified files.
//
/////////////////////////////////////////////////////////////////////////////
Are you saying that I cannot use your code in a commercial app or that I cannot redistribute the source in its current form as part of a library.
I am currently writing an app that may be commercial (in the future) not now as I am not too sure how useful it will be to other people. I'd ike to use your code but I cannot if it restricts me down the line. I'll probably have to use an alternate one which is more complicated to use or write my own.
Holy Handgrenade of Antioch instructions
|
|
|
|

|
I'm having a strange problem. For any radio boxes or checkboxes I have within a group, if I anchor the group and the checkboxes the checkboxes disappear. If I leave them unanchored they appear just fine. Any ideas?
Thanks,
Matt Philmon
|
|
|
|

|
There's probably a easy way to do this already, but (since I don't know it)
A cool new member function would allow the developer to show the resizing as it is done vs. just pulling the outline of the window until you stopped and then drawing the window. That way if I was also resizing pictures and things internally I wouldn't have to do it until the window finished resizing...
|
|
|
|

|
Ok it works but do you know if its safe,
I'm unsure
The situation is,
" I have a Resizeable Dialog, while it expands/contrcts I wish to have new controls appearing Disappearing, But in the intemitant positions the controls resize normally, ?
I am using ( ShowWindow() and MoveWindow() to achieve this,
With AddAnchor !
So I'm regularly Adding new Anchors to the Layout Array
for the same Controls !
"Is this safe or Dangerous ?"
Regardz
Colin Davies
|
|
|
|

|
Now I see you class, is Good , but I want come forward my Idea.
1. Check if hwnd for new Element enable in Layour Array:
void CResizableDialog::AddAnchor(HWND wnd, CSize tl_type, CSize br_type)
...
Layout obj(wnd, tl_type, tl_margin, br_type, br_margin, hscroll, refresh);
/// My Addon
int count = m_arrLayout.GetSize();
for(int i = 0;i < count; i++)
{
Layout pobj = m_arrLayout[i];
if(pobj.hwnd == obj.hwnd)
{
m_arrLayout.RemoveAt(i);
break;
}
}
///// End My Addon
m_arrLayout.Add(obj);
2. Possible use CMap or you custom class instead of CArray for more speed.
|
|
|
|

|
I posted an article that features a formview using Paolo's ResizableDialog code. Go Here:
http://www.codetools.com/useritems/formview2.zip.asp
|
|
|
|

|
I just wanted to let Paolo know that I used the CResizablePage class successfully in a CFormView-derived object that contains an embedded property sheet.
The resize of the formview updates the size of the embedded proprety sheet, and the property sheet updates the size of the enclosed tabs, which all have an (anchored) list control in them. The propertysheet is positioned in such a way as to remove most of the MFC-imposed border around the tabs, and the scrollbars from the list controls appear as if they actually belong to the formview itself.
I just wanted to let you know that this is some of the most useful code I've ever found on the internet. Many thanks.
Now, if someone can provide info for placing a CView-derived object onto a dialog template, I would be most grateful.
Note: The version of the code I'm using was downloaded before the oct-27 code was released.
|
|
|
|

|
Hi Paolo,
Your CResizableXXX classes are those kind of stuff I really like! Quite simple to use and no dependencies among them. I have a collection of PropertyPages I use in several projects. With your code it is possible to make some of them resizable but let them still working in an ordinary PropertySheet of other projects.
Thanks!
Danie
|
|
|
|

|
Hello,
First of all, thanks for this nice and easy to use class. But I'm having a problem. It's probably not really related to your class, but I'll ask it here anyway.
I have a CComboBox (DropDown style) on my dialog. On startup (OnInitDialog) I fill the combobox and I select one of the items in it:
m_Combo = "Demo1"; // "Demo1" is one of the possible choices
UpdateData(FALSE);
What happens now is the following. On startup, the text "Demo1" is not selected. If I resize the dialog, then the text "Demo1" becomes selected. I would prefer to have it not selected after resizing too. I tested W2K and W98 and this seams to happen only on W2K.
Any idea what is going on here? And Any idea how to solve this in a generic way?
|
|
|
|

|
How do I put the CResizableSheet on the CResizableDialog?
Thanks,
Phili
|
|
|
|

|
IsZoomed doesn't seem to report 1 for a maximized
formview (mdi child)
I tried remembering the fSize from the most
recent WM_SIZE, but that doesn't show maximized
for it either...
|
|
|
|

|
I'm working on an application written as a SDI application using CFormView as the base class of the view class. With CFormView, your "view" is a dialog. I tried this class out with a Dialog based application I was playing with and really liked it. When creating an SDI application, Visual Studio creates your Mainframe, View, and Document classes and ties them together. When choosing CFormView as your base for your view class, it creates you an empty dialog that it stretches over the client area. This dialog is not set up as a CDialog anywhere but is tied into the View Class. So, all your typical functions available for a dialog are mostly available in the View class along with other CFormView calls. Any idea how I could use your class (or the code behind it) to add this resize functionality to my application
|
|
|
|

|
Hi Paolo,
great code, but I found a problem.
I anchor a button at the bottom of the window, centered, with
AddAnchor (IDC_BUTTON, BOTTOM_CENTER). On its right, I anchor
a text control with AddAnchor (IDC_TEXT, BOTTOM_CENTER),
initialised with some text.
When I first resize (enlarge) horizontally, then resize to the
initial size, some text from the text control overwrites part
of the button.
I played with the tab order of the contols, and the order of the
AddAnchor calls, without success.
Any ideas?
Best regards,
Hans
|
|
|
|

|
I have two group boxes on my dialog. The first one is in the upper portion of the dialog and I have anchored it with "Top Left" and "Bottom Right." It resizes properly as its text stays anchored where it is supposed to be.
The second group box is located below the first. I have anchored it with "bottom left" and "bottom right." It is supposed to stay the same height - which it does - and it is supposed to resize in width - which it also does. However, when I drag the bottom of the dialog down, the text from this second group box stays where it was and gets lost until I return the dialog to the size it was when the application originally started.
For now, I have placed a regular static text control at the point where the text for the group box should be and have anchored this in such a manner as to have it move with the group box.
Anyone else out there experience this behavior?
Also, when running under NT 4.0 SP 6a, if I have, "Show Window while dragging" enabled, the dialog does not always properly redraw itself and I sometimes get text showing in two or more seperate places.
Other than that, the code is great and easy to use.
Best Regards,
Matthew
|
|
|
|

|
I have uploaded the latest version of CResizableDialog to my site.
I also added a set of classes to implement resizable property sheets, but these needs testing. So if someone is interested, here is a demo project:
http://www.geocities.com/ppescher/productions.html
Cheers,
Paolo Messina
|
|
|
|

|
Your conversion of a CSize to CPoint via a typecast at line 454 generates a level 4 warning about a non-standard extension. Suggest you eliminate this in the next version. Many shops require a completely clean compile before release.
I notice there already is a message about the memory leaks: this MUST be fixed.
|
|
|
|

|
Your conversion of a CSize to CPoint via a typecast at line 454 generates a level 4 warning about a non-standard extension. Suggest you eliminate this in the next version. Many shops require a completely clean compile before release.
I notice there already is a message about the memory leaks: this MUST be fixed.
|
|
|
|

|
Very well presented. Simple to grasp. I am impressed
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
A CDialog derived class to implement resizable dialogs with MFC
| Type | Article |
| Licence | CPOL |
| First Posted | 24 May 2000 |
| Views | 540,342 |
| Downloads | 9,201 |
| Bookmarked | 185 times |
|
|