初级会员
- 积分
- 96
- 金钱
- 96
- 注册时间
- 2013-11-1
- 在线时间
- 8 小时
|
楼主 |
发表于 2014-8-6 16:18:16
|
显示全部楼层
回复【3楼】5498折戟沉沙:
---------------------------------
我按照你的方法测试了填充液晶,感觉速度是很快的。已经把LCD_L0_FillRect函数直接改成填充的。但是如果不用DIALOG的话刷新还是很快的。用上之后就刷新dialog会很慢。跟踪GUI_CreateDialogBox函数里面调用了WM_ShowWindow函数显示,但是WM_ShowWindow函数怎样调用底层液晶程序就不知道在哪条语句了。请大哥给我解释下吧。
WM_HWIN GUI_CreateDialogBox(const GUI_WIDGET_CREATE_INFO* paWidget, int NumWidgets, WM_CALLBACK* cb, WM_HWIN hParent,
int x0, int y0)
{
WM_HWIN hDialog = paWidget->pfCreateIndirect(paWidget, hParent, x0, y0, cb); /* Create parent window */
WM_HWIN hDialogClient = WM_GetClientWindow(hDialog);
WIDGET_OrState(hDialog, paWidget->Flags);
WM_ShowWindow(hDialog);
WM_ShowWindow(hDialogClient);
while (--NumWidgets > 0) {
WM_HWIN hChild;
paWidget++;
hChild = paWidget->pfCreateIndirect(paWidget, hDialogClient, 0, 0, 0); /* Create child window */
WM_ShowWindow(hChild);
}
WM_SetFocusOnNextChild(hDialog); /* Set the focus to the first child */
WM_SendMessageNoPara(hDialogClient, WM_INIT_DIALOG);
return hDialog;
}
void WM_ShowWindow(WM_HWIN hWin) {
if (hWin) {
WM_Obj *pWin;
WM_LOCK();
pWin = WM_H2P(hWin);
if ((pWin->Status & WM_SF_ISVIS) == 0) { /* First check if this is necessary at all */
pWin->Status |= WM_SF_ISVIS; /* Set Visibility flag */
WM_InvalidateWindowDescs(hWin); /* Mark content as invalid */
#if WM_SUPPORT_NOTIFY_VIS_CHANGED
WM__NotifyVisChanged(hWin, &pWin->Rect);
#endif
}
WM_UNLOCK();
}
} |
|