From: Chris244@aol.com (Chris Hill) Subject: Re: Draw to icon Date: 12 May 1999 00:00:00 GMT Message-ID: <37396656.286482530@forums.borland.com> References: <7hb605$pvi1@forums.borland.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.delphi.graphics Use CreateCursorIndirect: Here some code I posted here recently: const crMyFancyCursor = 5; var ii : TIconInfo; maskBM, colorBM : TBitmap; begin maskBM := TBitmap.Create; with maskBM do begin Height := 32; { Could/Should call GetSystemMetrics to get supported value (Assume 32x32) } Width := 32; with Canvas do begin Brush.Color := clWhite; FillRect(Rect(0,0,32,32)); Brush.Color := clBlack; Ellipse(10,10,21,21); end; end; colorBM := TBitmap.Create; with colorBM do begin Height := 32; { Could/Should call GetSystemMetrics to get supported value (Assume 32x32) } Width := 32; with Canvas do begin Brush.Color := clBlack; FillRect(Rect(0,0,32,32)); Brush.Color := clLime; Ellipse(10,10,21,21); end; end; with ii do begin fIcon := false; xHotspot := 15; yHotspot := 15; hbmMask := maskBM.Handle; hbmColor := colorBM.Handle; end; Screen.Cursors[crMyFancyCursor] := CreateIconIndirect(ii); Screen.Cursor := crMyFancyCursor; maskBM.Free; colorBM.Free; end; On Wed, 12 May 1999 16:16:44 +1000, "Oleg Shilo" wrote: >Hi, everyone > >I have to create new cursor (not load but just create). > >Cursor image should be based of some bitmap image. > >I can assign cursor to temporary icon but I cannot to draw bitmap to the >icon. > >Any idea? > >Thanks, Oleg > > > > Chris Hill Chris244@aol.com