|
UCGUI button 从25Q32读图片可以显示,但是所有的button只显示最后一张图片。
[复制链接]
//GUI_ID_BUTTON1
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON1),&GUI_Font24B_ASCII);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON1),BUTTON_CI_UNPRESSED,GUI_DARKBLUE);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON1),BUTTON_CI_UNPRESSED,GUI_WHITE);
//BUTTON_SetBitmap(WM_GetDialogItem(hWin,GUI_ID_BUTTON1),0,&bmsjsz);
xxx1=mymalloc(4096);
SPI_Flash_Read(xxx1, 2058447, 4096);//??????
BUTTON_SetBMP(WM_GetDialogItem(hWin,GUI_ID_BUTTON1), 0, (unsigned char*)xxx1);
myfree(xxx1);
//GUI_ID_BUTTON2
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON2),&GUI_Font24B_ASCII);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON2),BUTTON_CI_UNPRESSED,GUI_DARKBLUE);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON2),BUTTON_CI_UNPRESSED,GUI_WHITE);
xxx=mymalloc(4096);
SPI_Flash_Read(xxx, 2054247, 4096);//??????
BUTTON_SetBMP(WM_GetDialogItem(hWin,GUI_ID_BUTTON2), 0, (unsigned char*)xxx);
myfree(xxx);
|
|