STemWin - Background image on layer 0

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

  • STemWin - Background image on layer 0

    Hello,
    I would like to use layer 0 to set background image but it doesn't work.
    On the WM_INIT_DIALOG messages of each WINDOW dialog I execute this code:

    Source Code

    1. GUI_SelectLayer(0);
    2. GUI_SetLayerVisEx (0, 0);
    3. GUI_DrawBitmap(&bmHandle, 0,0);
    4. GUI_SetLayerVisEx (0, 1);
    5. GUI_SelectLayer(1);
    6. GUI_Clear();


    What is wrong?

    Dario
  • Hello Adrian,
    I tried your solution but drawing background picture together with live data on WM_PAINT increase a lot the CPU load (+40%).
    Are there other solutions more efficient? I have 5 rolling windows each one with it's custom background.

    thanks,
    Dario
  • Hello Dario,

    Of course CPU load increases with the number of moving windows. I would suggest you to perform most of the moving actions using hardware layers. Further effects can also be performed using Memory Devices. For details, please refer to the chapters "Memory Devices" and "MultiLayer"

    Best regards,
    Adrian