Is there any way to draw polygon/line on Window without using callback functions ?

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

  • Is there any way to draw polygon/line on Window without using callback functions ?

    I want to draw a polygon/line on a window. I'm unable to draw those without calling in/using callback functions. Is there any way to do that?
    Thank you. ?(

    The post was edited 1 time, last by rahul ().

  • Dear Rahul,

    Of course you can draw polygons on a window, but as soon as the window is redrawn by the window manager you will have to redraw it by yourself. This is not recommended.

    I would suggest you to use a custom callback function for just reacting on the WM_POST_PAINT message. This would let the Window Manager draw the window as is and your additional stuff would be automatically drawn right after the WM_PAINT message was processed.

    Best regards,
    Adrian