Search by Tags

Mouse Cursor

 

Article updated at 10 Sep 2018
Compare with Revision




Hide the Mouse Cursor

Hide Mouse Cursor by Registry Setting

You can hide the mouse cursor in the Display driver registry settings.

  1. Open RegEdit by going to Start > Programs > ColibriTools > RegEdit

  2. Make the following change:

  • For Colibri T20/T30, Apalis T30

    [HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA Corporation\NVDDI]
    "HwCursor"=dword:0
    

  • For Colibri PXAxxx, VFxx, and iMX7

    [HKEY_LOCAL_MACHINE\Drivers\Display\Colibri]
    "Cursor"=dword:0
    

  • For Colibri iMX6, Apalis iMX6

    [HKEY_LOCAL_MACHINE\Drivers\Display]
    "Cursor"=dword:0
    

  1. Save the registry using SaveReg in ColibriTools.

  2. Restart the module.

Hide Mouse Curser Globally From an Application

You can call an escape code to globally enable/disable the mouse cursor.

 
#define ESCAPECODEBASE          100000
#define MOUSECURSOR             (ESCAPECODEBASE + 20)
 
DWORD old_cursor=0;
DWORD new_cursor=0;
 
// Get Cursor Status
ExtEscape(GetDC(NULL), MOUSECURSOR, 0, NULL, 4, (char*)&old_cursor);
 
// Disable Cursor
new_cursor=0;
ExtEscape(GetDC(NULL), MOUSECURSOR, 4, (char*)&new_cursor, 4, (char*)&old_cursor);
 
// Enable Cursor
new_cursor=1;
ExtEscape(GetDC(NULL), MOUSECURSOR, 4, (char*)&new_cursor, 4, (char*)&old_cursor);
 

Note: Using escape codes is not supported on iMX6

Hide the Mouse Cursor for one Application

There is an API call to hide the mouse cursor for only one application

{
    ShowCursor(FALSE);
}