why CPaintDC(this) can't make effect in OnInitDialog?

Discussion in 'MFC' started by Wood, Sep 15, 2006.

  1. Wood

    Wood New Member

    Joined:
    Sep 15, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    dear all,i write a program based on MFC Dialog i put code as below in OnInitdialog:

    Code:
    CPaintDC dc(this);
    dc.MoveTo(..);
    dc.LineTo(..);
    but it seems that nothing happened when dialog initiate.

    and when i put these code into OnPaint,it make effect, i don't know why and i guessed that maybe the dialog refresh its window after its init, Could anyone help me?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice