Print Page | Close Window

resize

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=11071
Printed Date: 28 September 2024 at 11:15am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: resize
Posted By: minnen
Subject: resize
Date Posted: 17 June 2008 at 4:41am
I'm working in a progress enviroment and I'm very happy about most components (reportcontrol, imagemanager,toolbar,..).
Only the dockingpane cause me problems. 
 
I add the handle of a progress frame to a pane. This progressprogressframe contains a reportcontrol and some other codejock compontents.
 
After resize of a pane, in the GUI the progressframe resizes itself but if you check in the code the actual height and width of the frame isn't changed.
 
My components in the progressframe don't resize. I have to do it myself in the code. Now the problem is that I cannot find a pane property that returns the width and height of a certain pane. Is there a workaround?
 
I tried by using the dockingpanemanager but I'm not able to make it working.
 
All ideas are welcome.
 



Replies:
Posted By: younicke
Date Posted: 17 June 2008 at 4:54am
the progressbarframe resizes automatically to fit inside the dockingpane.
maybe you could try to put a commandbutton inside the progressbarframe and try to msgbox the width and the height. it changes everytime the pane is resized. and then maybe you could start from there. i could have given you a sample code but then i dont use progress. :(


Posted By: raybe
Date Posted: 18 June 2008 at 4:45am
You can use the function GetWindowRect from user32.dll. This function will give you a structure with the correct width and height. I use it myself in a progress environment.


Posted By: minnen
Date Posted: 18 June 2008 at 4:26pm

thanks raybe.

Have been searching to use the getwindowrect.
Can't get it to work. Could you send me a small sample please.


Posted By: raybe
Date Posted: 19 June 2008 at 2:30am
A small sample of how to use GetWindowRect in Progress. If you can't get it to work then please let me know.
 
procedure GetWindowRect external "user32":
    define input parameter ipiHwnd as long no-undo.
    define input parameter ipiRect as memptr no-undo.
end procedure.
 
define variable rRect as memptr no-undo.
define variable iL as integer no-undo.
define variable iT as integer no-undo.
define variable iR as integer no-undo.
define variable iB as integer no-undo.
set-size(rRect) = 16.
 
run GetWindowRect (frame {&FRAME-NAME}:Hwnd, rRect).
 
iL = get-long(rRect, 1).
iT = get-long(rRect, 5).
iR = get-long(rRect, 9).
iB = get-long(rRect, 13).
 
set-size(rRect) = 0.
 
message "Height = " + string(iB - iT) skip "Width = " + string(iR - iL) view-as alert-box.

 
 


Posted By: minnen
Date Posted: 19 June 2008 at 2:48am
raybe,
 
My gratitude will be eternal :).
 
Mistake was that I tried to catch the handle to the pane. I didn't realise that windows captured the 'real' size of the progress frame.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net