I have custom Delphi VCL control that intercepts WM_NCHITTEST message and returns HTCAPTION to make control movable on its parent window.
That part works fine, but returning HTCAPTION also resets my custom cursor to Windows default one when hovering over that control. Is there any way I can use HTCAPTION and still show my custom cursor?
Note: I know how to implement control movement without using HTCAPTION and solve cursor issue that way
Use a WM_SETCURSOR message handler:
procedure TCustomVCLControl.WMSetCursor(var Message: TWMSetCursor);
begin
SetCursor(Screen.Cursors[cr..]);
Message.Result := 1;
end;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With