how to know a window is created completely

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

    • how to know a window is created completely

      hi,
      I am creating a child window, and in call back function i am setting the background color for that.

      WM_PAINT is getting called twice in that case(I am assuming that it is because of default early clipping )
      but i want to know when the last WM_PAINT will get called to draw on that particular window.
      is there any API to know that. Please let me know.
    • Hi,

      Yes, this is related to early clipping.

      Unfortunately, you can't really know how often a WM_PAINT occurs, beacuse it can have several reasons like the number of child windows or if the child windows transparent or not.

      But, you can set the WM_CF_LATE_CLIP flag for a specific window. This causes the clipping to be done while inside WM_PAINT and the this message will occur only once. Unfortunately, this will have an impact on the performance.

      You can also react on WM_POST_PAINT which will be send to a window right after the last WM_PAINT.

      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.