hiding cursor and clipping cursor position in Ruby Component
Posted: Mon May 05, 2014 11:34 am
I want to share my way of doing subject
In the attached file i put some useful Ruby wrapped WinAPI functions for cursor manipulation, which was lacking in the standard set, and examples of their use (including holding ryby knob):
Standart Win32 API showCursor function doesn't work (I don know why), therefore i made a hook with standart ShowCur module.
All wrapped functions uses module view position in grid squares without the need for pixels, therefore it needs a reference point (curpos) - current view cursor position in grid squres. To use this functions in ruby components simply put "WinAPI and Utiities" module in top of your schematic.
Sorry for my english...
In the attached file i put some useful Ruby wrapped WinAPI functions for cursor manipulation, which was lacking in the standard set, and examples of their use (including holding ryby knob):
Code: Select all
setCursorPos(curpos, newpos)
cursorClip(curpos, rect)
cursorHide(hide)
cursorShow(show)
Standart Win32 API showCursor function doesn't work (I don know why), therefore i made a hook with standart ShowCur module.
All wrapped functions uses module view position in grid squares without the need for pixels, therefore it needs a reference point (curpos) - current view cursor position in grid squres. To use this functions in ruby components simply put "WinAPI and Utiities" module in top of your schematic.
Sorry for my english...