Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Using cursor widget

A cursor widget is created by calling ISHELL_CreateInstance() and passing AEECLSID_CCursorWidget as the ClassID.

If successful, a pointer to the cursor widget object will be returned in the ppobj parameter of ISHELL_CreateInstance.

The cursor widget is derived from the decorator object and is used to show or hide an element on screen (the cursor). It is typically used in Brew MP as an overlay to show progress (such as a spinning beach ball) or a period to wait (such as a watch or an hourglass).

The cursor widget can also be used to track user-directed movements of a visual pointer on the display.

The bitmap used to represent the default cursor is stored as resource ID 100 in the "widgets.mif" file. The default bitmap could be overridden by retrieving an alternate bitmap and assigning it to the cursor widget by calling IWidget_SetBitmap().

To create a cursor widget, an application would do the following.

  1. Call ISHELL_CreateInstance() with a ClassID of AEECLSID_CCursorWidget to retrieve a reference counted instance of the cursor widget.
  2. If a bitmap other than the default cursor is to be displayed, the application should call IWidget_SetBitmap() on the cursor widget, passing in a pointer to the desired graphic.