CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 1999
    Posts
    4

    Problem in drawing dialog box



    Hai there,

    i have a have problem in drawing a line in dialog bx,

    Oninitdialog i have written code like

    CDialog::OnInitDialog();

    // line drawing

    CDC *pDC = GetDC();

    pDC->SetBkMode(OPAQUE);

    pDC->GetBkColor();

    pDC->SetBkColor(RGB(255,0,0));

    pDC->MoveTo(0,0);

    pDC->LineTo(200,200);

    // TODO: Add extra initialization here

    return TRUE; // return

    it is not drawing the line , even i created a new dialog to test this , it is not working

    nothing it is drawing

    plz help me thanx

    Thanx in advance

    Asha

  2. #2
    Join Date
    Apr 1999
    Location
    Sussex, England
    Posts
    49

    Re: Problem in drawing dialog box



    Do this stuff in OnPaint and not in OnInitDialog.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured