
yet another owl-related question
I''m beginning to frequent this site with my questions more often than one should, i know, but well...
Anyways, the problem comes up when using a TDockableControlBar. Namely, when I create the controlbar and harbor it in the top slip (is that what a slip is?), and draw stuff to the screen, the picture is shifted down by the height of the controlbar. What I need to do, is create hittesting within the client area of the window which is NOT translated as is the picture. When the user "undocks" the controlbar, however, and places it in the middle of the screen, for example, the picture becomes unaligned with the hittest rects, throwing everything out of proportion until the controlbar is nicely redocked at the top.
(I think) I need to know a way how to measure the height of the controlbar (which I don''t) and as the controlbar is undocked by the user (which I don''t know how to test), recalculate the hittest regions. (lol) I don''t even understand this myself, so ANY, even remotely related feedback would be well appreciated.
Thanx
"It''s the butler. It''s always the butler."

Hi
Save yourself time and hassle by using your main wnd as a ''frame''. Your toolbar and any other controls are children of this window. If you include a window as a ''view'' (possibly a subclass of std control types or your own registered wnd class) then you should be able to treat its client area as normal. This has the advantage of not requiring the hassle of re-defining the client area dimensions everytime you have to move or resize a control ( or maybe hide that toolbar).
Another possible method is to use SetViewportOrgEx to reset the origin for the client area of your main window. Use GetWindowRect to get the dimensions of your toolbar control.
There may be analagous functions to these win32 API ones in Borland''s vcl.
Anyway, hope that is of some use to you.
Save yourself time and hassle by using your main wnd as a ''frame''. Your toolbar and any other controls are children of this window. If you include a window as a ''view'' (possibly a subclass of std control types or your own registered wnd class) then you should be able to treat its client area as normal. This has the advantage of not requiring the hassle of re-defining the client area dimensions everytime you have to move or resize a control ( or maybe hide that toolbar).
Another possible method is to use SetViewportOrgEx to reset the origin for the client area of your main window. Use GetWindowRect to get the dimensions of your toolbar control.
There may be analagous functions to these win32 API ones in Borland''s vcl.
Anyway, hope that is of some use to you.
Country: Scotland [not listed in the ''Country'' combobox].
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement