CbTranslateMsg Function

Microchip Graphics Library

Microchip Graphics Library
CbTranslateMsg Function
C
WORD CbTranslateMsg(
    void * pObj, 
    GOL_MSG * pMsg
);
Overview

This function evaluates the message from a user if the message will affect the object or not. The table below enumerates the translated messages for each event of the touch screen and keyboard inputs. 

 

Translated Message 
Input Source 
Events 
Description 
CB_MSG_CHECKED 
Touch Screen 
EVENT_PRESS 
If events occurs and the x,y position falls in the area of the check box while the check box is unchecked. 
 
Keyboard 
EVENT_KEYSCAN 
If event occurs and parameter1 passed matches the object’s ID and parameter 2 passed matches SCAN_CR_PRESSED or SCAN_SPACE_PRESSED while the check box is unchecked. 
CB_MSG_UNCHECKED 
Touch Screen 
EVENT_PRESS 
If events occurs and the x,y position falls in the area of the check box while the check box is checked. 
 
Keyboard 
EVENT_KEYSCAN 
If event occurs and parameter1 passed matches the object’s ID and parameter 2 passed matches SCAN_CR_PRESSED or SCAN_SPACE_PRESSED while the check box is checked. 
OBJ_MSG_INVALID 
Any 
Any 
If the message did not affect the object. 
Input Parameters
Input Parameters 
Description 
GOL_MSG * pMsg 
pointer to the message struct containing the message the user 
pCb 
the pointer to the object where the message will be evaluated to check if the message will affect the object 
Returns

Returns the translated message depending on the received GOL message:

  • CB_MSG_CHECKED – Check Box is checked.
  • CB_MSG_UNCHECKED – Check Box is unchecked.
  • OBJ_MSG_INVALID – Check Box is not affected.

Preconditions

none

Side Effects

none

Example

Usage is similar to BtnTranslateMsg() example.

Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved