How to use custom cursor in non-client area of ββwindow using Delphi
I have a Delphi VCL custom control that intercepts a message WM_NCHITTEST
and returns HTCAPTION
to make the control float in its parent window.
This part works fine, but returning HTCAPTION
also resets my custom cursor to Windows by default when it hovers over that control. Can I use HTCAPTION
and show my custom cursor?
Note. I know how to implement non-use motion control HTCAPTION
and solve the problem with this way
+3
Dalija Prasnikar
source
to share
1 answer
Use a message handler WM_SETCURSOR
:
procedure TCustomVCLControl.WMSetCursor(var Message: TWMSetCursor);
begin
SetCursor(Screen.Cursors[cr..]);
Message.Result := 1;
end;
+5
Sertac Akyuz
source
to share