Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - resize
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

resize

 Post Reply Post Reply
Author
Message
minnen View Drop Down
Newbie
Newbie
Avatar

Joined: 18 March 2007
Location: Belgium
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote minnen Quote  Post ReplyReply Direct Link To This Post Topic: resize
    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.
 
Back to Top
younicke View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 March 2005
Status: Offline
Points: 107
Post Options Post Options   Thanks (0) Thanks(0)   Quote younicke Quote  Post ReplyReply Direct Link To This Post 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. :(
Back to Top
raybe View Drop Down
Newbie
Newbie
Avatar

Joined: 31 March 2008
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote raybe Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
minnen View Drop Down
Newbie
Newbie
Avatar

Joined: 18 March 2007
Location: Belgium
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote minnen Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
raybe View Drop Down
Newbie
Newbie
Avatar

Joined: 31 March 2008
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote raybe Quote  Post ReplyReply Direct Link To This Post 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.

 
 
Back to Top
minnen View Drop Down
Newbie
Newbie
Avatar

Joined: 18 March 2007
Location: Belgium
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote minnen Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.