Accelerator operations
[Window creating/destroying]

Functions


Function Documentation

int GUIAPI AddAccelerators ( HACCEL  hacc,
int  key,
DWORD  keymask,
WPARAM  wParam,
LPARAM  lParam 
)

Adds an accelerator to the accelerator table.

This function adds an accelerator to the accelerator table. It's called after you call CreateAcceleratorTable function.

Parameters:
hacc The handle to the accelerator table.
key The key value of the accelerator. Note that you can define the key value by either scancode or ASCII code. If you define the key with scancode, the key value should be equal to (scancode + 256).
keymask The shift key state, can be OR'ed value of the following values:

  • KS_SHIFT
    Shift key should be pressed.
  • KS_ALT
    Alt key should be pressed.
  • KS_CTRL
    Ctrl key should be pressed.
wParam The first parameter of the MSG_COMMAND when receiving such a accelerator key.
lParam The second parameter of the MSG_COMMAND when receiving such a accelerator key.
Returns:
The function returns 0 for success, non-zero for failure.
See also:
CreateAcceleratorTable, DeleteAccelerators
HACCEL GUIAPI CopyAcceleratorTable ( HACCEL  hacc  ) 

Copies the specified accelerator table.

This function copies the specified accelerator table. The function is used to obtain the accelerator table data that corresponds to an accelerator table handle.

Parameters:
hacc The handle to the accelerator table.
Returns:
The handle to the copied new accelerator table.
HACCEL GUIAPI CreateAcceleratorTable ( HWND  hWnd  ) 

Creates an empty accelerator table.

This function creates an empty accelerator table.

Parameters:
hWnd The handle to the main window.
Returns:
The handle to the new accelerator table, zero when error.
See also:
AddAccelerators, DestroyAcceleratorTable
int GUIAPI DeleteAccelerators ( HACCEL  hacc,
int  key,
DWORD  keymask 
)

Deletes an accelerator from the accelerator table.

This function deletes an accelerator from the accelerator table.

Parameters:
hacc The handle to the accelerator table.
key The key value of the accelerator.
keymask The shift key state.
Returns:
The function returns 0 for success, non-zero for failure.
See also:
AddAccelerators, DestroyAcceleratorTable
int GUIAPI DestroyAcceleratorTable ( HACCEL  hacc  ) 

Destroys an accelerator table.

This function destroys the specified accelerator table hacc. Before closing a window, you must call this function to destroy each accelerator table that is created by using CreateAcceleratorTable function.

Parameters:
hacc The handle to the accelerator table.
Returns:
The function returns 0 for success, non-zero for failure.
See also:
CreateAcceleratorTable
int GUIAPI TranslateAccelerator ( HACCEL  hAccel,
PMSG  pMsg 
)

Translates an accelerator key message to MSG_COMMAND messge and sends it to the window procedure.

Parameters:
hAccel The handle to the accelerator table.
pMsg The pointer to the MSG structure to be translated.
Returns:
The function returns 0 for success, non-zero for failure.
See also:
TranslateMessage
Generated on Thu Apr 7 15:58:41 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3