Framewin has a default 1 pixel external border?

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

  • Framewin has a default 1 pixel external border?

    Hi,

    Does the FRAMEWIN widget have 1 pixel external border by default ?

    I set the border size of FRAMEWIN to 0 using SkinFlexProps setting, yet it seems there is still 1 pixel border reserved
    You can see the black external border from the following screenshot




    Source Code

    1. FRAMEWIN_SKINFLEX_PROPS pPropsActive;
    2. FRAMEWIN_SKINFLEX_PROPS pPropsInActive;
    3. FRAMEWIN_GetSkinFlexProps(&pPropsActive, FRAMEWIN_SKINFLEX_PI_ACTIVE)
    4. pPropsActive.Radius = 0
    5. pPropsActive.BorderSizeT = 0;
    6. pPropsActive.BorderSizeB = 0;
    7. pPropsActive.BorderSizeL = 0;
    8. pPropsActive.BorderSizeR = 0;
    9. pPropsActive.aColorTitle[0] = 0xF7F2F0;
    10. pPropsActive.aColorTitle[1] = 0xF7F2F0;
    11. pPropsActive.SpaceX = 0;
    12. FRAMEWIN_SetSkinFlexProps(&pPropsActive, FRAMEWIN_SKINFLEX_PI_ACTIVE);
    13. FRAMEWIN_SetSkinFlexProps(&pPropsActive, FRAMEWIN_SKINFLEX_PI_INACTIVE);
    Display All


    And I also jumped over the message WIDGET_ITEM_DRAW_FRAME.
  • Thanks, I switched to WINDOW and the border is gone.

    And one more question, I found that the FRAMEWIN or WINDOW widget CAN get WM_KEY message in Simulation mode. But in real environment (Embedded environment), they CAN NOT.

    What's the reason that causes this difference ?
  • Hello,

    Actually they can receive key messages, but please note that generating a key message is hardware dependent and needs to be implement by the user. Please use the function GUI_StoreKeyMsg() in order to place a key event in the emWin keyboard buffer.

    For detailed information on how to set up emWin in order to use a keyboard, please refer to the chapter 24 "Keyboard Input" in the emWin user manual.

    Best regards,
    Adrian