locked
force updating window RRS feed

  • 问题

  • Dear All
    I'm doing an application which need to force the window updating.

    After some operation app window contains 'old' drawings.

    If I Click my window , it need clear 'old' drawings and repaint, just like,if i use setwindowpos and change the window position,then it will clear old drawing and repaint the window. 

    So I consider my window needs only repainting.

    Whatever I try - UpdateWindow, RedrawWindow - nothing happens. How to

    repaint window client region 'right now' ?

    I'm not sure about RedrawWindow - what exactly parameters I should use ?

    thank you


    windows Mobile fans
    2009年8月21日 9:23

答案

  • 用下面两行代码:

                    this.Invalidate();
                    this.Update();
    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    2009年8月26日 9:09