Thread: CPaintDC in dialoge

  1. #1
    Registered User cfrost's Avatar
    Join Date
    Apr 2004
    Posts
    119

    Smile CPaintDC in dialoge

    I want some portion of my CDialog to be CPaintDC how?

  2. #2
    Registered User
    Join Date
    Jul 2003
    Posts
    59
    What do you mean by "to be CPaintDC", do you want only a part of the dialog to be repainted? CPaintDC is used in OnPaint to get a handle to the CDC. Please clarify =)

  3. #3
    Registered User cfrost's Avatar
    Join Date
    Apr 2004
    Posts
    119
    i want to draw lines in some portions using move to and line to in dialogue box how can i do this drawing

  4. #4
    Registered User
    Join Date
    Jul 2003
    Posts
    59
    You must only use CPaintDC inside OnPaint. If you want to draw in another function use CClientDC.

    CClientDC dc(this);

    dc.MoveTo(0,0);
    dc.LineTo(100, 100);

Popular pages Recent additions subscribe to a feed