dimension of backround window

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

    • dimension of backround window

      I tried to get the size of the background window:

      C Source Code

      1. GUI_Init();
      2. GUI_EnableAlpha(1);
      3. GUI_UC_SetEncodeUTF8();
      4. GUI_SetBkColor(GUI_BLACK);
      5. GUI_Clear();
      6. WM_SetCallback(WM_HBKWIN, _cbBkWin);
      7. WM_SetCreateFlags(WM_CF_MEMDEV);
      8. WM_EnableMemdev(WM_HBKWIN);
      9. int xSize, ySize;
      10. GUI_RECT Rect;
      11. xSize = WM_GetWindowSizeX(WM_HBKWIN);
      12. ySize = WM_GetWindowSizeY(WM_HBKWIN);
      13. WM_GetInsideRectEx(WM_HBKWIN, &Rect);
      Display All

      and size il 16383 for both x and y, whether I use the WM_GetWindowSize*() or WM_GetInsideRectEx() functions.
      I expected the size of the background window to be the same as the size of the LCD.
      Am I making a mistake?

      best regards
    • Hi,

      No, this not a mistake from your side.

      The desktop window gets created with a size of 16383 pixels in each direction as default.

      Just call add the code below right after GUI_Init() to get a desktop window with the size of the screen.

      C Source Code

      1. WM_SetSize(WM_HBKWIN, LCD_GetXSize(), LCD_GetYSize());

      The reason behind this is that if using virtual screens it has to be large enough, that is why we decided to make it that large.

      So if you are using virtual screens be careful when reducing the size.