大学生
最后登录1970-1-1
在线时间 小时
注册时间2015-1-21
|
楼主 |
发表于 2015-7-17 15:52:53
|
显示全部楼层
在App中的
void Task_GUI(void *p_arg)
{
OS_ERR err;
WM_HWIN hWin;
WM_HWIN hItem;
(void)p_arg;
WM_SetDesktopColor(GUI_WHITE);
WM_SetCreateFlags(WM_CF_MEMDEV);
printf("\r\n 背景窗口的句柄=%d \r\n",WM_HBKWIN);
CreateMidWin(); //创建中间的窗口
while(1)
{
GUI_Delay(100);
printf("\r\n 在这 \r\n");
}
}
在CreateMidWin()函数中
void CreateMidWin(void)
{
WM_HWIN MIDWIN;
uint8_t i;
printf("\r\n 将要创建中间用户窗口 \r\n");
hMidWin=WM_CreateWindowAsChild(0,20,320,200,
WM_HBKWIN,
WM_CF_SHOW|WM_CF_MEMDEV,
_cbMidWin,
0);
printf("\r\n 中间部件窗口的句柄=%d \r\n",hMidWin);
MIDWIN=ICONVIEW_CreateEx(4, 0, 320-4, 3*(80+10),
hMidWin,
WM_CF_SHOW| WM_CF_HASTRANS,
0,
GUI_ID_ICONVIEW0,
75, 75);
for(i=0;i<GUI_COUNTOF(_aBitmapItem1);i++)
{
ICONVIEW_AddBitmapItem(MIDWIN,_aBitmapItem1[i].pBitmap,_aBitmapItem1[i].pText);
ICONVIEW_SetTextColor(MIDWIN,i,GUI_BLUE );
}
ICONVIEW_SetBkColor(MIDWIN, ICONVIEW_CI_SEL, GUI_WHITE | 0x80000000);
ICONVIEW_SetSel(MIDWIN,-1); //设置最开始的pMsg->Data.v=-1 ,
ICONVIEW_SetSpace(MIDWIN, GUI_COORD_X, 5);
ICONVIEW_SetSpace(MIDWIN, GUI_COORD_Y, 5);
ICONVIEW_SetIconAlign(MIDWIN, ICONVIEW_IA_HCENTER|ICONVIEW_IA_TOP);
}
|
|