本文整理汇总了C++中BUTTON_Callback函数的典型用法代码示例。如果您正苦于以下问题:C++ BUTTON_Callback函数的具体用法?C++ BUTTON_Callback怎么用?C++ BUTTON_Callback使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了BUTTON_Callback函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: myButton
static void myButton (WM_MESSAGE *pMsg)
{
int index = 0;
const WM_KEY_INFO* pInfo;
switch(pMsg->MsgId)
{
case WM_SET_FOCUS:
index = WM_GetId(pMsg->hWin) - GUI_ID_BUTTON0;
if(pMsg->Data.v == 0)
{
BUTTON_SetBkColor(buttons[index], BUTTON_CI_UNPRESSED, pColors->btBkColor);
//TEXT_SetBkColor(Texts[index], pSkin->MntSetWin_bkNOFOCUS);
}
else
{
BUTTON_SetBkColor(buttons[index], BUTTON_CI_UNPRESSED, pColors->btFocusBkColor);
//TEXT_SetBkColor(Texts[index], GUI_DARKMAGENTA);
}
BUTTON_Callback(pMsg);
break;
case WM_KEY:
pInfo = (WM_KEY_INFO*)pMsg->Data.p;
switch(pInfo->Key)
{
case GUI_KEY_ENTER:
case GUI_KEY_LEFT:
case GUI_KEY_RIGHT:
BUTTON_Callback(pMsg);
break;
default:
break;
}
break;
default:
BUTTON_Callback(pMsg);
break;
}
}
示例2: _cbButton_fullscreen
/**
* @brief callback for full screen button
* @param pMsg: pointer to a data structure of type WM_MESSAGE
* @retval None
*/
static void _cbButton_fullscreen(WM_MESSAGE * pMsg) {
switch (pMsg->MsgId) {
case WM_PAINT:
_OnPaint_fullscreen(pMsg->hWin);
break;
default:
/* The original callback */
BUTTON_Callback(pMsg);
break;
}
}
示例3: _cbButton_repeat
/**
* @brief callback for repeat button
* @param pMsg: pointer to data structure of type WM_MESSAGE
* @retval None
*/
static void _cbButton_repeat(WM_MESSAGE * pMsg) {
switch (pMsg->MsgId) {
case WM_PAINT:
_OnPaint_repeat(PlayerSettings.b.repeat);
break;
default:
/* The original callback */
BUTTON_Callback(pMsg);
break;
}
}
示例4: _cbButton_cam5_1
/**
* @brief callback for cam5_1 button
* @param pMsg: pointer to data structure of type WM_MESSAGE
* @retval None
*/
static void _cbButton_cam5_1(WM_MESSAGE * pMsg) {
switch (pMsg->MsgId) {
case WM_PAINT:
_OnPaint_cam5_1(pMsg->hWin, HomeSettings.b.alarm, HomeSettings.b.camera);
break;
default:
/* The original callback */
BUTTON_Callback(pMsg);
break;
}
}
示例5: _cbMax
/*********************************************************************
*
* Callback
*
* This is the overwritten callback routine for the button.
* The primary reason for overwriting it is that we define the default
* action of the Framewindow here.
* It works as follows:
* - User clicks and releases the button
* -> BUTTON sends WM_NOTIFY_PARENT to FRAMEWIN
* -> FRAMEWIN either a) reacts or b)sends WM_NOTIFY_PARENT_REFLECTION back
* In case of a) This module reacts !
*/
static void _cbMax(WM_MESSAGE* pMsg) {
if (pMsg->MsgId == WM_NOTIFY_PARENT_REFLECTION) {
WM_HWIN hWin = pMsg->hWinSrc;
FRAMEWIN_Obj* pObj = FRAMEWIN_H2P(hWin);
if (pObj->Flags & FRAMEWIN_SF_MAXIMIZED) {
FRAMEWIN_Restore(hWin);
} else {
FRAMEWIN_Maximize(hWin);
}
return; /* We are done ! */
}
BUTTON_Callback(pMsg);
}
示例6: _cbButton
void _cbButton(WM_MESSAGE *pMsg) {
switch (pMsg->MsgId) {
case WM_PID_STATE_CHANGED:;
WM_PID_STATE_CHANGED_INFO* info = pMsg->Data.p;
printf("Button state change - (%d, %d) %d\r\n", info->x, info->y, (int)info->State);
break;
case WM_NOTIFICATION_CLICKED:
printf("Clicked \r\n");
break;
default:
BUTTON_Callback(pMsg);
break;
}
}
示例7: _cbButton
/*********************************************************************
*
* _cbButton
*
* Purpose:
* 1. Calls the owner draw function if the WM_PAINT message has been send
* 2. Calls the original callback for further messages
* 3. After processing the messages the function evaluates the pressed-state
* if the WM_TOUCH message has been send
*/
static void _cbButton(WM_MESSAGE * pMsg) {
switch (pMsg->MsgId) {
case WM_PAINT:
_OnPaint(pMsg->hWin);
break;
default:
BUTTON_Callback(pMsg); // The original callback
break;
}
if (pMsg->MsgId == WM_TOUCH) {
if (BUTTON_IsPressed(pMsg->hWin)) {
if (!_Pressed) {
_Pressed = 1;
}
} else {
_Pressed = 0;
}
}
}
示例8: mybutton
//
// Buttoncallback;
//
void mybutton (WM_MESSAGE *pMsg)
{
WM_HWIN hWin;
WM_KEY_INFO *pInfo;
int column,row,row_index,del_row;
int i;
hWin = pMsg->hWin;
switch (pMsg->MsgId)
{
case USER_MSG_LANGUAGE: //更改语言
pLanguage = &Lgumainwin[Language];
if (Language == 0)
{
BUTTON_SetFont(hButton,&GUI_Font30);
TEXT_SetFont(mainwinText[5],&GUI_Font30);
HEADER_SetFont(hListhead,&GUI_Font24);
}
else
{
BUTTON_SetFont(hButton,&GUI_Font20_1);
TEXT_SetFont(mainwinText[5],&GUI_Font24_1);
HEADER_SetFont(hListhead,&GUI_Font16_1);
LISTVIEW_SetHeaderHeight(hListview,29);
}
DisPage();
BUTTON_SetText(hButton,pLanguage->ButtonInfo[0]);
for(i = 0; i<7; i++)
HEADER_SetItemText(hListhead,i,pLanguage->ListHead[i]);
break;
case WM_SET_FOCUS:
if (pMsg->Data.v)
{
BUTTON_SetBkColor(hButton,BUTTON_CI_UNPRESSED,GUI_GRAY);
BUTTON_SetTextColor(hButton,BUTTON_CI_UNPRESSED,GUI_WHITE);
BUTTON_SetFocusColor(hButton,GUI_GRAY);
}
else
{
BUTTON_SetBkColor(hButton,BUTTON_CI_UNPRESSED,GUI_WHITE);//BUTTON_SetTextColor (hButton,BUTTON_CI_UNPRESSED,GUI_BLACK);
BUTTON_SetTextColor(hButton,BUTTON_CI_UNPRESSED,GUI_BLACK);
BUTTON_SetFocusColor(hButton,GUI_WHITE);
}
BUTTON_Callback(pMsg);
break;
case WM_KEY:
pInfo = (WM_KEY_INFO*)pMsg->Data.p;
switch (pInfo->Key)
{
case GUI_KEY_ENTER:
break;
case GUI_KEY_PRINT:
WM_BringToTop(PrintWin);
WM_SetFocus(WM_GetDialogItem(PrintWin,ID_PrintMenu));
break;
case GUI_KEY_MENU:
WM_BringToTop(Menuwin);
WM_SetFocus (WM_GetDialogItem(Menuwin,ID_MENU));
MENU_SetSel (WM_GetDialogItem(Menuwin,ID_MENU),0);
MenuSel = 0;
break;
case GUI_KEY_LOC1:
pCannel = " 490 横";
WM_InvalidateWindow(WM_GetDialogItem(mainwin,ID_TEXT_1));
break;
case GUI_KEY_LOC2:
pCannel = "4209.5横";
WM_InvalidateWindow(WM_GetDialogItem(mainwin,ID_TEXT_1));
break;
case GUI_KEY_CHS:
pCannel = " 486 横";
WM_InvalidateWindow(WM_GetDialogItem(mainwin,ID_TEXT_1));
break;
case GUI_KEY_UP:
break;
case GUI_KEY_DOWN:
if (LISTVIEW_GetNumRows(hListview))
{
thispage = 1;
WM_SetFocus(hListview);
LISTVIEW_SetSel(hListview,0);
DisPage();
//WM_InvalidateRect(mainwin,&PageRect); //刷新页数提示
}
break;
case GUI_KEY_LEFT:
if(InfoType > 0)
//.........这里部分代码省略.........