如题:
我的代码如下,测试了两种方法,全部没有显示,但是窗口正常,求指教
方法1,创建完再绘制:
WM_HWIN CreateFramewin_kerboard(void)
{
WM_HWIN hWin,hWinOld;
hWin = GUI_CreateDialogBox(_aDialogCreate_kerboard, GUI_COUNTOF(_aDialogCreate_kerboard), _cbDialog_kerboard, WM_HBKWIN, 0, 0);
GUI_Exec();
hWinOld= WM_SelectWindow(WM_GetClientWindow(hWin));
GUI_DrawGradientRoundedV(160, 200, 960, 160, 25, 0x0000FF, 0x00FFFF);//绘制一个垂直梯度圆角矩形
GUI_SetColor(GUI_RED);
GUI_DrawRoundedRect(0, 360, 1280, 320, 25);//绘制圆角矩形
WM_SelectWindow(hWinOld);
return hWin;
}
方法2,直接在回调里边绘制:
case WM_PAINT:
GUI_SetBkColor(GUI_WHITE);
GUI_Clear();
GUI_DrawGradientRoundedV(160, 200, 960, 160, 25, 0x0000FF, 0x00FFFF);//绘制一个垂直梯度圆角矩形
GUI_SetColor(GUI_RED);
GUI_DrawRoundedRect(0, 360, 1280, 320, 25);//绘制圆角矩形
break;
|