Answer the question
In order to leave comments, you need to log in
How to draw on cursor in RunTime?
The problem is the following: I created a resource with a colored cursor (32 bit), built the project - everything is fine, the cursor is loaded and displayed.
Now I want to modify its appearance before "turning on" this cursor.
I load a resource and try to draw on its Canvas. However, any of my "drawings" make the original image transparent, no matter what I do.
An example of how I do.
Cur := TCursorImage.Create;
Cur.LoadFromResourceID(HINSTANCE, CurId);
with Cur.Canvas do begin
Brush.Style := bsSolid;
Brush.Color := clBlue;
FillRect(10,10,21,21);
end;
Screen.Cursors[CurId] := Cur.ReleaseHandle;
Cur.Free;
Answer the question
In order to leave comments, you need to log in
Usually, several different cursors are made in the editor, and then the desired one is loaded during program execution.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question