Access to information is restricted depending on your login. Request login-information through our contact form.


Showing and Hiding the Cursor

Showing and hiding the cursor is controlled through the currently running application on a Windows CE device.
To control if a cursor is hidden or shown, they would typical call the ShowCursor() system API:

int ShowCursor( BOOL bShow);

If bShow is set to true a counter is incremented.
If bShow is set to false it is decremented.
If the counter is bigger than zero, the cursor is shown. The return value of this function is the current counter value.

Allthough this works well for most applications, there might be a need to hide the cursor completly, even if an application request it to be shown. For instance if you only have a touch as input device, you might want to remove the cursor-component completly from the OS-build (SYSGEN_CURSOR).
If you need the cursor-component, because you want to attach a USB-Mouse or it is a dependancy of one of your programs (i.e. some C#-apps need it), you could call ShowCursor() multiple times, so the counter-value is far beyond or below zero.

Another way would be to directly tell the display-driver to hide/show the cursor. This can be done through the Drvlib-functions CursorOn and CursorOff. Actually you can only tell the display driver to not draw the cursor or to allow the OS to draw it. If the cursor is hidden because the counter-value is equal or below zero, CursorOn will not show it. If you encounter this you might want to call:

while( ShowCursor( TRUE) < 0));

See the Download-section for a sample, which uses the drvlib_app.dll-functions.


Cookies helfen bei der Bereitstellung von Inhalten. Durch die Nutzung dieser Seiten erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Rechner gespeichert werden. Weitere Information
service/wince/appnotepub/cursor.txt · Zuletzt geändert: 2015/10/14 11:08 von