初级会员
- 积分
- 113
- 金钱
- 113
- 注册时间
- 2018-3-5
- 在线时间
- 4 小时
|
发表于 2018-3-5 14:30:18
|
显示全部楼层
您好!请问您的这个PNG图片是否是能够在控件Framewin或者Window里面显示呢,我这边遇到的问题就是PNG只能在默认背景下显示,不能在控件中显示。能不能给下参考代码呢?
static void _dialog1cbk(WM_MESSAGE * pMsg)
{
WM_HWIN hWin,hWindow;
int NCode;
char BUF[20];
GUI_RECT Rect = {0,0,800,480};
hWin = pMsg->hWin;
switch (pMsg->MsgId) {
case WM_TIMER:
hWin = pMsg->hWin;
WM_RestartTimer(pMsg->Data.v,100);
break;
case WM_PAINT:
hWindow = WM_GetDialogItem(hWin,ID_WINDOW_1);
GUI_SetColor(GUI_BLUE);
GUI_FillRoundedRect(5, 5, 790, 417, 4);
GUI_SetColor(GUI_BLACK);
GUI_DrawRoundedRect(5, 5, 790, 417, 4);
displaypngex("0:/1.png",0,0,0);//显示PNG###出错,黑屏,死机
hWin = pMsg->hWin;
break;
case WM_INIT_DIALOG:
break;
case WM_NOTIFY_PARENT:
break;
break;
default:
WM_DefaultProc(pMsg);
break;
}
}
|
|