Slide in dock window after create

Discussion forum about all things Team Developer 5.x and 6.x

Slide in dock window after create

Post by Zephy » 30 Aug 2013, 15:13

How can I slide in dock window after create a form?
I can not use "Call SalDlgSetDockSlide( whDock, FALSE )", because "SalDlgSetDockSlide" delete "AutoHide" pin :( .

I use now:

Code: Select all

On SAM_CreateComplete
   Set whDock = SalCreateWindow( dlg1, hWndForm )
   Call SalDlgSetDockStatus( whDock, DOCK_Right )
I need slide in the dock window after CreateComplete, like this:
You do not have the required permissions to view the files attached to this post.

User avatar
Posts: 640
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

Re: Slide in dock window after create

Post by Charlie » 05 Sep 2013, 17:19

Here's what I've done.

A menu item, in the customers' applications, that only developers can access:

Code: Select all

Menu Item: Save Current MDI Dock State
   Menu Actions
      Call SalWindowWriteDockState( hWndMDI, GetMyApplicationPath() || 'CURRENT_MDI_DOCK_STATE.xml' )
At run-time, we slide all docked windows the way we like, then we save teh current MDI dock state.

We take the saved XML file, and give it another name, say "SYSTEM_DEFAULT_DOCK_STATE.xml"

Upon launch of our customers' applications and creation of the MDI:

Code: Select all

Call SalWindowApplyDockState(mdi, GetMyApplicationPath() || 'SYSTEM_DEFAULT_DOCK_STATE.xml')
NOTE: if the metrics of any docking dialog change in the source, the previously saved dock state file will stop working. We then either have to create a new XML file, or take the original one given to clients and tweak it as necessary. Compare XML files generated by WriteDockState for every change in any docking dialog.


User avatar
Steve Leighton
Site Admin
Site Admin
New Zealand
Posts: 338
Joined: 05 Mar 2017, 20:57
Location: Stroud, England <--> Tauranga, New Zealand

Re: Slide in dock window after create

Post by Steve Leighton » 29 Oct 2020, 21:51

As an addendum to using SalWindowApplyDockState() - which can really flicker as the Dialog is being re-set to its Saved state,
I found that suspending painting of the Parent ( MDI ) can make everything alot smoother.
I know its not the answer for every situation - but its worth a try if you get the screen shakes :
p.s. you may need to suspend painting on the actual dialogs being re-docked also, to make things even more smooth.
p.p.s. Dont forget to re-enable painting as soon as SalWindowApplyDockState() is done - which in turn re-paints the finished result.
You do not have the required permissions to view the files attached to this post.
Greetings from New Zealand
Steve Leighton

Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand


Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot], [Google] and 1 guest