开发者

Detect IBeam cursor

开发者 https://www.devze.com 2023-04-09 08:23 出处:网络
Is there a way for detect IBea开发者_如何学编程m cursors on windows from c++ code? I wonder is it even possible, for example just the MS Word has several IBeam like cursor (eg. text near or below the

Is there a way for detect IBea开发者_如何学编程m cursors on windows from c++ code? I wonder is it even possible, for example just the MS Word has several IBeam like cursor (eg. text near or below the IBeam).

Thanks, Abe


I think there are two ways you can go about this, the easier way requires Vista. Both start with calling GetCusorInfo. You can take the HCURSOR you get from that and pass it into GetIconInfoEx on Vista or GetIconInfo on XP, casting it to a HICON. The Ex version includes the resource name which you can search for the word "beam" or other hints about what it might be. For the older version you have to do image analysis on the HBITMAP mask. Since you are looking for the type of cursor, this might not be too hard. Or it could be really difficult, I have never tried anything like this.

0

精彩评论

暂无评论...
验证码 换一张
取 消