View previous topic :: View next topic |
Author |
Message |
jalih
Joined: 30 Jul 2012 Posts: 196
|
Posted: Thu Nov 01, 2012 6:06 pm Post subject: Dragging window by it's client area? |
|
|
Anyone figured out a simple way to drag window by it's client area?
Currently I modify shape of the window by setting the new window region and use right mouse button click to alternate between normal and "skinned" window mode.
Simple clock example here
Is there some simple trick to fool Clearwin+ and Windows to think window client area to be the caption bar? That way skinned window could be moved easily by dragging with mouse. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
Posted: Fri Nov 02, 2012 1:45 pm Post subject: |
|
|
Part of the function of the caption is to allow the window to be moved, and to respond differently to the client area. If you want to move a window with no caption bar, you have to get the mouse coordinates relative to the screen, and decode the button clicks to work out how much click and drag there has been.
E |
|
Back to top |
|
|
jalih
Joined: 30 Jul 2012 Posts: 196
|
Posted: Fri Nov 02, 2012 2:16 pm Post subject: Re: |
|
|
LitusSaxonicum wrote: | Part of the function of the caption is to allow the window to be moved, and to respond differently to the client area.
|
Yes, but on a pure Win32 program I could process WM_NCHITTEST message on a window procedure, call default window procedure and test the return value. If the return value is HTCLIENT, then return HTCAPTION instead. |
|
Back to top |
|
|
|