![]() |
resize |
Post Reply ![]() |
Author | |
minnen ![]() Newbie ![]() ![]() Joined: 18 March 2007 Location: Belgium Status: Offline Points: 11 |
![]() ![]() ![]() ![]() ![]() 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.
|
|
![]() |
|
younicke ![]() Senior Member ![]() ![]() Joined: 11 March 2005 Status: Offline Points: 107 |
![]() ![]() ![]() ![]() ![]() |
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. :( |
|
![]() |
|
raybe ![]() Newbie ![]() ![]() Joined: 31 March 2008 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
minnen ![]() Newbie ![]() ![]() Joined: 18 March 2007 Location: Belgium Status: Offline Points: 11 |
![]() ![]() ![]() ![]() ![]() |
thanks raybe. Have been searching to use the getwindowrect.
Can't get it to work. Could you send me a small sample please.
|
|
![]() |
|
raybe ![]() Newbie ![]() ![]() Joined: 31 March 2008 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
minnen ![]() Newbie ![]() ![]() Joined: 18 March 2007 Location: Belgium Status: Offline Points: 11 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |