Button_SetBMPEx() function does not work

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

  • Button_SetBMPEx() function does not work

    I try to use the Button_SetBMPEx() function but it does not work. On the handbook it is written that this function allows to Set a bitmap from external memory to be displayed on a button widget but using it I do not see anything on the button. This is my code:


    hWIN4 = BUTTON_CreateEx(68,225,100,44,WM_HBKWIN,WM_CF_SHOW,0,0);
    NOR_flash_INIM_command(NOR_INIM_COMM_READ,SF_ADD_BMP_SABOT_CENTRALE,1124,(U8 *)&dram_file[0],USA_MUTEX); (This function reads from serial flash the .bmp file and save it on U8 dram_file[2000] buffer)
    BUTTON_SetBMPEx(hWIN4,BUTTON_BI_UNPRESSED,&dram_file[0],0,0);





    Any suggestion? am I doing something wrong?
  • Hi,

    On the first look it seems that this should work.

    I'm not sure how big the BMP is, but 2000 bytes seems a bit small.

    What kind of BMP file is this?

    Please take a look into chapter 9.1.1 'Supported formats' of the emWin user manual. There are all supported formats listed.

    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.