Hi all.
I have an issue regarding the creation of a page with emWin that is using LISTVIEW_SetItemBitmap.
I want to put all bitmap on flash filesystem and load them one by one with LISTVIEW_SetItemBitma.
The fact is that the function require a (const GUI_BITMAP *) so I create a SRAM buffer with this structure that I use as temporary storage.
So the code looks like:
guiGenData = GUIResourceLoadBitmap( image1 ) ;
LISTVIEW_SetItemBitmap( hListId, 0, row, 0, 0, (const GUI_BITMAP *)&guiGenData );
guiGenData = GUIResourceLoadBitmap( image2 ) ;
LISTVIEW_SetItemBitmap( hListId, 0, row, 0, 0, (const GUI_BITMAP *)&guiGenData );
guiGenData = GUIResourceLoadBitmap( image3 ) ;
LISTVIEW_SetItemBitmap( hListId, 0, row, 0, 0, (const GUI_BITMAP *)&guiGenData );
When the page is create I see that all images are equal to image3. What's the matter?
Thanks in advance,
Marco Crivellari
I have an issue regarding the creation of a page with emWin that is using LISTVIEW_SetItemBitmap.
I want to put all bitmap on flash filesystem and load them one by one with LISTVIEW_SetItemBitma.
The fact is that the function require a (const GUI_BITMAP *) so I create a SRAM buffer with this structure that I use as temporary storage.
So the code looks like:
guiGenData = GUIResourceLoadBitmap( image1 ) ;
LISTVIEW_SetItemBitmap( hListId, 0, row, 0, 0, (const GUI_BITMAP *)&guiGenData );
guiGenData = GUIResourceLoadBitmap( image2 ) ;
LISTVIEW_SetItemBitmap( hListId, 0, row, 0, 0, (const GUI_BITMAP *)&guiGenData );
guiGenData = GUIResourceLoadBitmap( image3 ) ;
LISTVIEW_SetItemBitmap( hListId, 0, row, 0, 0, (const GUI_BITMAP *)&guiGenData );
When the page is create I see that all images are equal to image3. What's the matter?
Thanks in advance,
Marco Crivellari