Silverfrost Forums

Welcome to our forums

Dragging window by it's client area?

1 Nov 2012 5:06 #10942

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.

2 Nov 2012 12:45 #10945

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

2 Nov 2012 1:16 #10946

Quoted from LitusSaxonicum 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.

Please login to reply.