初级会员
- 积分
- 50
- 金钱
- 50
- 注册时间
- 2017-8-20
- 在线时间
- 13 小时
|
楼主 |
发表于 2017-10-14 13:31:07
|
显示全部楼层
本帖最后由 你不会懂我 于 2017-10-14 13:35 编辑
[mw_shl_code=c,true]static void _MoveWindow(const char* pText)
{
WM_HWIN hWnd;
int i;
hWnd = WM_CreateWindow(10,50,150,100,WM_CF_SHOW,_cbWindow,0);
HAL_Delay(500);
for(i=0;i<40;i++)
{
WM_MoveWindow(hWnd,2,2);
HAL_Delay(10);
}
if(pText)
{
GUI_DispStringAt(pText,5,50);
HAL_Delay(2500);
}
WM_DeleteWindow(hWnd);
WM_Invalidate(WM_HBKWIN);
GUI_Exec();
}[/mw_shl_code]
[mw_shl_code=c,true]//窗口回调函数
static void _cbWindow(WM_MESSAGE *pMsg)
{
GUI_RECT Rect;
switch(pMsg->MsgId)
{
case WM_PAINT:
WM_GetInsideRect(&Rect);
GUI_SetBkColor(GUI_RED);
GUI_SetColor(GUI_YELLOW);
GUI_ClearRectEx(&Rect);
GUI_DrawRectEx(&Rect);
GUI_SetColor(GUI_BLACK);
GUI_SetFont(&GUI_Font16_ASCII);
GUI_DispStringHCenterAt("Foreground Window",75,40);
break;
default:
WM_DefaultProc(pMsg);
}
}[/mw_shl_code] |
|