[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: aaarghh...DragWindow doesn't drag...



In article <1993Jan27.200524.5726@ifi.unizh.ch> gudat@avalon.physik.unizh.ch (gudat henrik) writes:
> 
> I want to move windows to other places "manually", i.e. without using
> taskmaster. The user has to select "Move Window...", the cursor becomes
> a hand, and then he (or she) can walk with that window around. The
> pseudocode looks like this:
> ...
> _GetMouse
> _LocalToGlobal
> _DragWindow
> ...
> I've noticed that this routine works only with titled windows, but I'd
> like to apply this mechanism to windows without title bar. (Er, that's
> why it's here...)

My guess is that DragWindow is checking one or more of the following:

- Does the window have a title bar (fTitle set)?
- Is the window movable (fMove set)?
- Is the startX/startY position within the title bar?

If you don't have a title bar at all, the first and third tests would
fail.

How about using DragRect to determine the new window position, then
MoveWindow to place the window in the final position?
-- 
David Empson

Internet: David.Empson@bbs.actrix.gen.nz    EMPSON_D@kosmos.wcc.govt.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand