DM_SETCURSORSIZE

Far Manager

DM_SETCURSORSIZE

The DM_SETCURSORSIZE message is sent to the dialog manager to set the cursor size and its visibility flag in edit lines or DI_USERCONTROL item.

Param1

The ID of the dialog item for which you want to retrieve the cursor position.

Param2

The high word is the cursor size (from 0 to 100, as used in the CONSOLE_CURSOR_INFO) structure), the low word is the cursor visibility flag (1 - the cursor is visible, 0 - the cursor is hidden).

Return

Previous values:
The high word is the cursor size (from 0 to 100, as used in the CONSOLE_CURSOR_INFO structure), the low word is the cursor visibility flag (1 - the cursor is visible, 0 - the cursor is hidden).

Controls

ControlDescription
DI_COMBOBOX combined list (without DIF_DROPDOWNLIST flag)
DI_EDIT edit line
DI_FIXEDIT fixed-size input field
DI_PSWEDIT password input field
DI_USERCONTROL custom (defined by programmer) control

Remarks

  1. To show the cursor in a DI_USERCONTROL dialog item, it is also necessary to move the cursor to the necessary position:
    Coord.X=X;
    Coord.Y=Y;
    Info.SendDlgMessage(hDlg,DM_SETCURSORPOS,3,(LONG_PTR)&Coord);
    
    The default cursor position in a DI_USERCONTROL is {-1,-1}.
  2. To show a cursor filling the entire character cell under Windows 9x/Me set the high word of Param2 to 99.

Example

// set the cursor of 3rd element as fully filled cell
Info.SendDlgMessage(hDlg,DM_SETCURSORSIZE,3,(LONG_PTR)MAKELONG(1,99));
See also: