|
发表于 2016-4-29 15:42:14
|
显示全部楼层
/*
*********************************************************************************************************
* 函 数 名: _cbButton
* 功能说明: Button小工具的回调函数
* 形 参:无
* 返 回 值: 无
*********************************************************************************************************
*/
static void _cbButton(WM_MESSAGE * pMsg) {
switch (pMsg->MsgId) {
case WM_PID_STATE_CHANGED:
if (((const WM_PID_STATE_CHANGED_INFO*)pMsg->Data.p)->State) {
return; // Do not call edit callback
}
break;
case WM_SET_FOCUS:
if (pMsg->Data.v == 1) {
BUTTON_SetBkColor(pMsg->hWin, BUTTON_CI_UNPRESSED, GUI_DARKRED);
BUTTON_SetTextColor(pMsg->hWin, BUTTON_CI_UNPRESSED, GUI_WHITE);
}
if (pMsg->Data.v == 0) {
BUTTON_SetBkColor(pMsg->hWin, BUTTON_CI_UNPRESSED, 0xC0C0C0);
BUTTON_SetTextColor(pMsg->hWin, BUTTON_CI_UNPRESSED, 0);
}
}
if (_pButtonCallback) {
_pButtonCallback(pMsg);
}
} |
|