我想让emwin中的图标显示位图,但怎么改他都是显示在左上角,不知道咋回事,又大神指导指导一下吗,
这个是GUIbuiler创建的,
static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
{ WINDOW_CreateIndirect, "Window", ID_WINDOW_0, 0, 0, 240, 320, 0, 0x0, 0 },
{ ICONVIEW_CreateIndirect, "Iconview", ID_ICONVIEW_0, 35, 30, 64, 64, 0, 0x0, 0 },
{ ICONVIEW_CreateIndirect, "Iconview", ID_ICONVIEW_1, 135, 30, 64, 64, 0, 0x0, 0 },
{ ICONVIEW_CreateIndirect, "Iconview", ID_ICONVIEW_2, 35, 125, 64, 64, 0, 0x0, 0 },
{ ICONVIEW_CreateIndirect, "Iconview", ID_ICONVIEW_3, 135, 220, 64, 64, 0, 0x0, 0 },
{ ICONVIEW_CreateIndirect, "Iconview", ID_ICONVIEW_4, 135, 125, 64, 64, 0, 0x0, 0 },
{ ICONVIEW_CreateIndirect, "Iconview", ID_ICONVIEW_5, 35, 220, 64, 64, 0, 0x0, 0 },
// USER START (Optionally insert additional widgets)
// USER END
};
这个是主程序
WM_HWIN CreateWindow(void)
{
WM_HWIN hWin,hItem;
hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
hItem= WM_GetDialogItem(hWin,ID_ICONVIEW_0 ); //获得图标的句柄
ICONVIEW_AddBitmapItem(hItem,&bmLED_ICONVIEW,"LED"); //为图标添加位图
return hWin;
}
|