MiniGUI API Reference (MiniGUI-Threads)  v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Macros | Functions
System bitmap/icon operations

Macros

#define GetSystemBitmapByHwnd(hWnd, id)   GetSystemBitmap ((hWnd), (id))
 An alias of GetSystemBitmap. More...
 
#define GetLargeSystemIcon(iItem)   GetLargeSystemIconEx(HWND_NULL, iItem)
 Retrieve a large (32x32) system icon by its identifier in default renderer. More...
 
#define GetSmallSystemIcon(iItem)   GetSmallSystemIconEx(HWND_NULL, iItem)
 Retrieve a small (16x16) system icon by its identifier in default renderer. More...
 

Functions

const MG_EXPORT BITMAP *GUIAPI GetSystemBitmapEx2 (HDC hdc, const char *rdr_name, const char *id)
 Retrieve the system bitmap object by identifier. More...
 
static const BITMAP *GUIAPI GetSystemBitmapEx (const char *rdr_name, const char *id)
 Retrieve the system bitmap object by identifier. More...
 
const MG_EXPORT BITMAP *GUIAPI GetSystemBitmap (HWND hWnd, const char *id)
 Retrieve the system bitmap object by identifier. More...
 
MG_EXPORT void GUIAPI TermSystemBitmapEx (const char *id, const char *rdr_name, PBITMAP bmp)
 Release the system bitmap object by identifier. More...
 
MG_EXPORT void GUIAPI TermSystemBitmap (HWND hWnd, const char *id, PBITMAP bmp)
 Release the system bitmap object by identifier. More...
 
MG_EXPORT HICON GUIAPI LoadSystemIconEx (HDC hdc, const char *rdr_name, const char *szItemName, int which)
 Loads an icon from information defined in MiniGUI.cfg. More...
 
MG_EXPORT HICON GUIAPI LoadSystemIcon (const char *szItemName, int which)
 Uses default renderer and HDC_SCREEN to load an icon from information defined in MiniGUI.cfg. More...
 
MG_EXPORT HICON GUIAPI GetLargeSystemIconEx (HWND hWnd, int iItem)
 Retrieve a large system icon by its identifier in default renderer. More...
 
MG_EXPORT HICON GUIAPI GetSmallSystemIconEx (HWND hWnd, int iItem)
 Retrieve a small system icon by its identifier. More...
 

Detailed Description

Macro Definition Documentation

◆ GetLargeSystemIcon

#define GetLargeSystemIcon (   iItem)    GetLargeSystemIconEx(HWND_NULL, iItem)

Retrieve a large (32x32) system icon by its identifier in default renderer.

See also
GetSmallSystemIconEx

Definition at line 9381 of file window.h.

◆ GetSmallSystemIcon

#define GetSmallSystemIcon (   iItem)    GetSmallSystemIconEx(HWND_NULL, iItem)

Retrieve a small (16x16) system icon by its identifier in default renderer.

See also
GetSmallSystemIconEx

Definition at line 9389 of file window.h.

◆ GetSystemBitmapByHwnd

#define GetSystemBitmapByHwnd (   hWnd,
  id 
)    GetSystemBitmap ((hWnd), (id))

An alias of GetSystemBitmap.

See also
GetSystemBitmap

Definition at line 9236 of file window.h.

Function Documentation

◆ GetLargeSystemIconEx()

HICON GUIAPI GetLargeSystemIconEx ( HWND  hWnd,
int  iItem 
)

Retrieve a large system icon by its identifier in default renderer.

This function retrieves the handle to a large (32x32) system icon by its identifier id.

Parameters
hWndThe handle to the window.
iItemThe identifier of the icon. It can be one of the following values:
  • IDI_APPLICATION
    The application icon.
  • IDI_STOP
    The stop icon.
  • IDI_QUESTION
    The question mark icon.
  • IDI_EXCLAMATION
    The exclamation mark icon.
  • IDI_INFORMATION
    The information mark icon.
Returns
The handle to the icon.
See also
GetSystemBitmap

◆ GetSmallSystemIconEx()

HICON GUIAPI GetSmallSystemIconEx ( HWND  hWnd,
int  iItem 
)

Retrieve a small system icon by its identifier.

This function retrieves the handle to a small (16x16) system icon by its identifier id.

Parameters
hWndThe handle to the window.
iItemThe identifier of the icon. It can be one of the following values:
  • IDI_APPLICATION
    The application icon.
  • IDI_STOP
    The stop icon.
  • IDI_QUESTION
    The question mark icon.
  • IDI_EXCLAMATION
    The exclamation mark icon.
  • IDI_INFORMATION
    The information mark icon.
Returns
The handle to the icon.
See also
GetSystemBitmap

◆ GetSystemBitmap()

PBITMAP GUIAPI GetSystemBitmap ( HWND  hWnd,
const char *  id 
)

Retrieve the system bitmap object by identifier.

This function retrieves and returns the system bitmap object by its identifier id for the specified window hWnd.

Parameters
hWndThe handle to the window.
idThe identifier of the system bitmap object, can be one of the following values:
- SYSBMP_RADIOBUTTON\n
- SYSBMP_CHECKBUTTON\n
- SYSBMP_BGPICTURE\n
Returns
The pointer to the system bitmap object.
See also
GetSystemBitmapEx2

◆ GetSystemBitmapEx()

const BITMAP *GUIAPI GetSystemBitmapEx ( const char *  rdr_name,
const char *  id 
)
inlinestatic

Retrieve the system bitmap object by identifier.

This function retrieves and returns the system bitmap object by the renderer name rdr_name and the identifier id. This function returns a BITMAP object which complies which is compliant to HDC_SCREEN.

Parameters
rdr_nameThe renderer name.
idThe identifier of the system bitmap object, can be one of the following values:

Definition at line 9203 of file window.h.

◆ GetSystemBitmapEx2()

const BITMAP *GUIAPI GetSystemBitmapEx2 ( HDC  hdc,
const char *  rdr_name,
const char *  id 
)

Retrieve the system bitmap object by identifier.

This function retrieves and returns the system bitmap object specified by the renderer name rdr_name and the identifier id. This function returns the BITMAP object which is compliant to the specified device context hdc.

Parameters
hdcThe handle to the device context.
rdr_nameThe renderer name.
idThe identifier of the system bitmap object, can be one of the following values:
  • SYSBMP_RADIOBUTTON
  • SYSBMP_CHECKBUTTON
  • SYSBMP_BGPICTURE
    Returns
    The pointer to the system bitmap object.
    Note
    Since 5.0.0, if you use the compositing schema, a main window may use a private surface which is not compliant to the screen surface. Under this situation, you should use this function to load the system bitmap object instead of using GetSystemBitmapEx.
    See also
    GetSystemBitmapEx
    Since 5.0.0.

◆ LoadSystemIcon()

HICON GUIAPI LoadSystemIcon ( const char *  szItemName,
int  which 
)

Uses default renderer and HDC_SCREEN to load an icon from information defined in MiniGUI.cfg.

This function loads an icon from information defined in MiniGUI.cfg.

Parameters
szItemNameThe key name in the section of renderer name in MiniGUI.cfg.
whichTell the function to load which icon.
Returns
The handle to the loaded icon.
See also
LoadIconFromFile, DestroyIcon

◆ LoadSystemIconEx()

HICON GUIAPI LoadSystemIconEx ( HDC  hdc,
const char *  rdr_name,
const char *  szItemName,
int  which 
)

Loads an icon from information defined in MiniGUI.cfg.

This function loads an icon from information defined in MiniGUI.cfg.

Parameters
hdcThe device context.
rdr_nameThe renderer name.
szItemNameThe key name in the section of renderer name in MiniGUI.cfg.
whichTell the function to load which icon. 0 for the small icon, and 1 for large icon.
Returns
The handle to the loaded icon.
See also
LoadIconFromFile, DestroyIcon

◆ TermSystemBitmap()

void GUIAPI TermSystemBitmap ( HWND  hWnd,
const char *  id,
PBITMAP  bmp 
)

Release the system bitmap object by identifier.

Parameters
hWndThe handle to the window.
idThe identifier of the system bitmap object, can be one of the following values:
 - SYSBMP_RADIOBUTTON\n
 - SYSBMP_CHECKBUTTON\n
 - SYSBMP_BGPICTURE\n
bmpThe pointer to the system bitmap object.
Returns
none.
See also
GetSystemBitmap

◆ TermSystemBitmapEx()

void GUIAPI TermSystemBitmapEx ( const char *  id,
const char *  rdr_name,
PBITMAP  bmp 
)

Release the system bitmap object by identifier.

Parameters
idThe identifier of the system bitmap object, can be one of the following values:
 - SYSBMP_RADIOBUTTON\n
 - SYSBMP_CHECKBUTTON\n
 - SYSBMP_BGPICTURE\n
rdr_nameThe renderer name.
bmpThe pointer to the system bitmap object.
Returns
none.
See also
GetSystemBitmap