Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 Nov : WM_NCHITTEST troubles
| Subject: | WM_NCHITTEST troubles |
| Posted by: | "Paul" (peeb..@nw.com) |
| Date: | Fri, 9 Nov 2007 09:29:03 |
I have a form without a caption and placed a image on top of the form.
The image's cursor is set to crDrag.
I can drag the form when the mouse is over this image catching the
WM_NCHITTEST- message, but then the image cursor doesn't change to crDrag.
When I remove WM_NCHITTEST, the cursor changes correctly
Is there another message I should catch to get it working ?
procedure TForm1.WmNCHitTest(var Msg: TWMNCHitTest);
begin
DefaultHandler(Msg);
if Msg.Result = HTCLIENT then
Msg.Result := HTCAPTION;
end;
Paul