dimension of backround window

  • I tried to get the size of the background window:


    and size il 16383 for both x and y, whether I use the WM_GetWindowSize*() or WM_GetInsideRectEx() functions.
    Why?
    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
    Max

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

    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: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!