Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Pane does not initially size correctly
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Pane does not initially size correctly

 Post Reply Post Reply
Author
Message
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Topic: Pane does not initially size correctly
    Posted: 29 August 2007 at 2:14am
If I'm doing something stupid then please let me know...

I've got a 'find' dialog as a floating pane. The problem is that the very first time it's displayed it does not size correctly. Here's what it should look like:




but the first time it's shown it looks like this:


If the user attempts a resize it snaps to the correct size and always shows correctly thereafter.

Here's my code for displaying the pane:


        Dim p As XtremeDockingPane.Pane
        Dim l As Long
        Dim t As Long

1000    If b Then
1010        Set p = dp.FindPane(DP_FIND)

1020        If p Is Nothing Then
1030            l = Me.Left / Screen.TwipsPerPixelX
1040            t = Me.Top / Screen.TwipsPerPixelY
1050            l = l + 32
1060            t = t + 100
1070            Set p = dp.CreatePane(DP_FIND, 399, 123, DockBottomOf, 1)
1080            p.Title = "Find..."
1090            p.Handle = ucFind.hwnd
1100            dp.FloatPane p, l, t, 399, 123
1110            p.Options = PaneNoDockable Or PaneNoHideable
1120            p.MinTrackSize.SetSize 399, 123
1130            p.MaxTrackSize.SetSize 399, 123

            Else
1140            p.Handle = ucFind.hwnd
1150            p.Closed = False
            End If
        End If

It's a bit hard to debug as one manual resize and everythings' ok again..

BTW this is using the latest version 11.1.

Thanks in advance for any help.


Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Posted: 29 August 2007 at 2:15am
Sorry, posted in wrong section. This should be in activeX section. Can moderator please move?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 03 September 2007 at 7:05am
Hi,
 
Replace 
dp.FloatPane p, l, t, 399, 123
to
dp.FloatPane p, l, t, l + 399, t + 123
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.203 seconds.