Colour Cursors

new topic     » topic index » view thread      » older message » newer message

Hello,
I'm trying to use colour cursors in my windows program (rather than just the
monochrome ones win32lib allows).  I've never messed around with low level
Windows stuff before though so inevitably it hasn't worked.  Can anyone tell
me where I've gone wrong?

Thanks,
chris.

include win32lib.ew --version 0.45r

constant fIcon=allot(Long),
xHotspot=allot(DWord),
yHotspot=allot(DWord),
hbmMask=allot(Long),
hbmColor=allot(Long),
SIZEOF_ICONINFO=allotted_size(),

,
main=create(Window,"My Window",0,Default,Default,330,330,0)

atom struc_pt, bmp_pt, mask_pt, cursor_pt
struc_pt=allocate_struct(SIZEOF_ICONINFO)
bmp_pt=loadBitmapFromFile("cursor.bmp")
mask_pt=loadBitmapFromFile("mask.bmp")
store(struc_pt,xHotspot,1)
store(struc_pt,yHotspot,1)
store(struc_pt,hbmMask,mask_pt)
store(struc_pt,hbmColor,bmp_pt)
cursor_pt=c_func(xCreateIconIndirect,{struc_pt})
trackCursor(cursor_pt)  --shouldn't this be documented by the way?

procedure onOpen_main()
    setMousePointer(main,cursor_pt)
end procedure
onOpen[main]=routine_id("onOpen_main")

WinMain(main,Normal)

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu