🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages Started by Renald Yazmir Thu, 14 Feb 2008 21:35
How to reduce client area of the main frame?
#650
Author: Renald Yazmir
Date: Thu, 14 Feb 2008 21:35
36 lines
2115 bytes
Hello,



I have a MDI document. I created a custom icon bar which I permanently 
attach to the main window. This custom icon bar is just a child window with 
pictures.



When I move any child window by clicking on its title bar and dragging I 
want to stop as soon as I bump into my custom icon bar. Two things must 
occur; the window stops and cursor stops when it bumps to the custom icon 
bar. Basically it needs to behave the same as if window is moved towards the 
menu bar.

Currently to achieve it I use ClipCursor(&clip_rect); while processing 
WM_MOVING message.

I would like to use a different approach.

Is it possible to reset a client rectangle of the main window (main frame)? 
If client rectangle of the main window is reduced by the height of custom 
icon bar then window will police the mouse motion and will stop when cursor 
bumps into the icon bar while dragging the child window.



If it is not possible to reduce the client area of the main frame, can you 
suggest other ways to achieve what I described above?



Thank you in advance.

Rony
Re: How to reduce client area of the main frame?
#651
Author: Remy Lebeau (TeamB)
Date: Thu, 14 Feb 2008 22:47
13 lines
1366 bytes
"Renald Yazmir" <renald@partmaker.com> wrote in message 
news:47b4b417$1@newsgroups.borland.com...

> I would like to use a different approach.

Assuming the icon bar is a TPanel or other VCL-based container, you could 
simply align it to one side of the form's client area.  That will 
effectively change the size of the available area that MDI can use.  Then 
you don't have to modify the MDI's behavior manually.


Gambit 
Re: How to reduce client area of the main frame?
#657
Author: Renald Yazmir
Date: Fri, 15 Feb 2008 13:01
19 lines
1759 bytes
Icon bar is not a TPanel. I created it as child window. My program is using 
general windows API calls.

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:47b4c527@newsgroups.borland.com...
>
> "Renald Yazmir" <renald@partmaker.com> wrote in message 
> news:47b4b417$1@newsgroups.borland.com...
>
>> I would like to use a different approach.
>
> Assuming the icon bar is a TPanel or other VCL-based container, you could 
> simply align it to one side of the form's client area.  That will 
> effectively change the size of the available area that MDI can use.  Then 
> you don't have to modify the MDI's behavior manually.
>
>
> Gambit
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads