初级会员
- 积分
- 54
- 金钱
- 54
- 注册时间
- 2014-1-11
- 在线时间
- 0 小时
|
5金钱
请问哪位高手指点一下,设置按钮位图函数BUTTON_SetBitmap(WM_GetDialogItem(hWin,GUI_ID_PROGBAR0), 0, &bmphone);应该放在那个位置执行呢?我放在回调函数中,直接就卡死了,请问有哪位高手指点一下。谢谢
下面是我的回调函数:
static void _cbCallback(WM_MESSAGE * pMsg)
{
int NCode, Id;
WM_HWIN hWin = pMsg->hWin;
switch (pMsg->MsgId)
{
case WM_PAINT:
PaintDialog(pMsg);
break;
case WM_INIT_DIALOG:
InitDialog(pMsg);
break;
case WM_KEY:
switch (((WM_KEY_INFO*)(pMsg->Data.p))->Key)
{
case GUI_KEY_ESCAPE:
GUI_EndDialog(hWin, 1);
break;
case GUI_KEY_ENTER:
GUI_EndDialog(hWin, 0);
break;
}
break;
case WM_NOTIFY_PARENT:
Id = WM_GetId(pMsg->hWinSrc);
NCode = pMsg->Data.v;
switch (Id)
{
case GUI_ID_OK:
if(NCode==WM_NOTIFICATION_RELEASED)
GUI_EndDialog(hWin, 0);
break;
case GUI_ID_CANCEL:
if(NCode==WM_NOTIFICATION_RELEASED)
GUI_EndDialog(hWin, 0);
break;
case GUI_ID_BUTTON0:
switch(NCode)
{
case WM_NOTIFICATION_CLICKED:
{
k++;
if(k>99)k=0;
PROGBAR_SetValue(WM_GetDialogItem(hWin,GUI_ID_PROGBAR0),k);
break;
}
// OnxxxClicked(pMsg);
}
break;
}
break;
default:
WM_DefaultProc(pMsg);
}
}
|
|