How to convert a cursor file into a bitmap (Views: 27)
Problem/Question/Abstract: How to convert a cursor file into a bitmap Answer: procedure TForm1.Button1Click(Sender: TObject); var hCursor: LongInt; Bitmap: TBitmap; begin Bitmap := TBitmap.Create; Bitmap.Width := 32; Bitmap.Height := 32; hCursor := LoadCursorFromFile('test.cur'); DrawIcon(Bitmap.Canvas.Handle, 0, 0, hCursor); Bitmap.SaveToFile('test.bmp'); Bitmap.Free; end; |