Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 318
  • Last Modified:

define click point custom cursor

hi,
i've made a custom cursor for my delphi program. The cursor looks like a paintbox. The default windows cursor (arrow) has its effective pixel in the upperleft corner (the point of the arrow). My own cursor has the 'effective pixel' also there. is there anyway to change this cuz i'd like to make the right side of custom cursor to be 'effective'

thanks in advance.

p.s. i know this is a little weird story, but i dont know another way to ask....
0
brutebass
Asked:
brutebass
1 Solution
 
EpsylonCommented:
Take a look at the 'CreateCursor' and 'SetCursor' API functions.
0
 
kretzschmarCommented:
normally you can define this point with the tool you've used to design it, like in microangelo or (not sure) in the workshop, which comes with delphi
0
 
FrodoBegginsCommented:
Yes, in the tool you are using look for "define hotspot"
0
 
FrodoBegginsCommented:
Or you can change it directly in the .cur file. The file fomat is (in C):
typedef struct _CURSORDIR {
  WORD           cdReserved;
  WORD           cdType;
  WORD           cdCount;
  CURSORDIRENTRY cdEntries[];
} CURSORDIR;

typedef struct _CURSORDIRENTRY {
  BYTE           bWidth;
  BYTE           bHeight;
  BYTE           bColorCount;
  BYTE           bReserved;
  WORD           wXHotspot;
  WORD           wYHotspot;
  DWORD          lBytesInRes;
  DWORD          dwImageOffset;
} CURSORDIRENTRY;

So you are on the 6-th and 7-th word, if I'm not wrong...
0
 
brutebassAuthor Commented:
great, didnt see the button in microangelo, but that was because i didnt look for it :)

thanks...all  of you
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now