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,
    Mathew
  • 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.

    Regards
    Sven
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi,

    of course, I forgot to attach the example.

    Here you go.

    Regards
    Sven
    Files
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.