CPaintDC in dialoge

This is a discussion on CPaintDC in dialoge within the Windows Programming forums, part of the Platform Specific Boards category; I want some portion of my CDialog to be CPaintDC how?...

  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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21