Article View: comp.os.ms-windows.programmer.misc
Article #1639Re: Clock applet
From: Blake Coverett
Date: Thu, 15 Oct 1992 22:55
Date: Thu, 15 Oct 1992 22:55
20 lines
1367 bytes
1367 bytes
In article <1992Oct15.053454.8491@engage.pko.dec.com> marshall@tfh.enet.dec.com (Hunting the Snark) writes:
>I would like to imitate an interesting property of the Clock applet in Windows
>3.1 (I don't remember now if the one in 3.0 did this). When you select the "No
>Title" setting, holding the left mouse button down in the clock window puts it
>into the move mode the same as in the caption of of a normal window. How does
>it do that? Is there an easy way (some undocumented windows fuction) or do they
>do it "the hard way" (LbuttonDown, SetCapture, GetDC, MouseMove, etc.) Is it
>significant that it only does this when there is no title bar?
Undocumented functions... Bah!
case WM_NCHITTEST: {
LONG lResult = DefWindowProc(hwnd,msgID,wParam,lParam);
return (bNoTitle && lResult == HTCLIENT) ? HTCAPTION : lResult;
}
-Blake
--
#include <std/disclaimer.h> blakeco@microsoft.com
Mail Flames, Post Apologies. ...!uunet!microsoft!blakeco
Technical Details
Message-ID:
<1992Oct15.225542.25313@microsoft.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!microsoft!hexnut!blakecoReferences:
<1992Oct15.053454.8491@engage.pko.dec.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!hexnut!blakeco From: blakeco@microsoft.com (Blake Coverett) Subject: Re: Clock applet Message-ID: <1992Oct15.225542.25313@microsoft.com> Date: 15 Oct 92 22:55:42 GMT Organization: Microsoft Canada Inc. References: <1992Oct15.053454.8491@engage.pko.dec.com> Lines: 20