2017-06-14 12:24 AM
I had created a image icon menu and want to change bitmap when some one make a click on any icon.
Which function should i use for this, below is the code for reference.
void vGeneralFunction_StartTest(void){
WM_HWIN hWin;
MenuFlag = StartTest;
LCD_Clear(LCD_COLOR_WHITE);
hProg = PROGBAR_CreateEx(0, 480, 725+4, 19, WM_HBKWIN, WM_CF_SHOW, PROGBAR_CF_HORIZONTAL, 0);
PROGBAR_SetMinMax(hProg, Min, Max);
PROGBAR_SetBarColor(hProg, 0, GUI_YELLOW);
PROGBAR_SetText(hProg, ' ');
/*
* Create iconview widget
*/
hWin = ICONVIEW_CreateEx(LCD_X_SIZE-350+10, LCD_Y_SIZE-85, 1000, 400,
WM_HBKWIN, WM_CF_SHOW | GUI_WRAPMODE_NONE,
ICONVIEW_SF_AUTOSCROLLBAR_V, GUI_ID_ICONVIEW0, 80, 80);
/*
* Add icons to the widget
*/
for (lp=0; lp<GUI_COUNTOF(_aBitmapItemStartMenu); lp++) {
ICONVIEW_AddBitmapItem(hWin, _aBitmapItemStartMenu[lp].pBitmap, _aBitmapItemStartMenu[lp].pText);
}
ICONVIEW_SetBkColor(hWin, ICONVIEW_CI_SEL, GUI_LIGHTGRAY);
ICONVIEW_SetFont(hWin, &GUI_Font20_ASCII);
ICONVIEW_SetTextColor(hWin, ICONVIEW_CI_SEL, GUI_GRAY);
ICONVIEW_SetTextColor(hWin, ICONVIEW_CI_UNSEL, GUI_GRAY);
WM_HasFocus(hWin);
GUI_Exec();
while (1){
if (ts_event.key_status == touch_key_down){
}
GUI_Delay(5);
}
}
#iconview #stemwin #icon #bitmap-change2017-06-17 01:26 AM
anyone on this??
2017-06-19 02:38 AM
Hi,
T
ried calling ICONVIEW_SetBitmapItem() and y
ou should make sure to enable the CRC before calling GUI library, if not STemWin will be not function. This is mentioned in the page 6 of AN4323 : 'The CRC module (in RCC peripheral clock enable register) should be enabled before using the library.'