ICONVIEW Widget and External Memory

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • ICONVIEW Widget and External Memory

    Good Afternoon,

    I am attempting to use the ICONVIEW_AddStreamedBitmapItem API to add a bitmap from external memory (a SPI-Flash). I am just wondering if there is a way to accomplish this in a way that will just call to a GUI_GET_DATA_FUNC callback. Is this capability available? I'm assuming that it would be something that GUI_BMP_DrawScaledEx?

    Is this possible/a valid usage of the function?

    Thank you,
  • Hi,

    Unfortunately, this is not directly possible when using the ICONVIEW API.

    But you can set a custom owner draw function and react on WIDGET_ITEM_DRAW_BITMAP. When reacting on this command you can simply draw a streamed bitmap.

    I have attached an example on how this could be done. It uses the windows API for opening a file handle. Simply adapt the paths in _GetImageById() to point to your dta-files.