CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Drawing

  1. #1
    Join Date
    Aug 2003
    Posts
    7

    Drawing

    ..
    Last edited by mea3581; August 8th, 2016 at 10:40 PM.

  2. #2
    Join Date
    Apr 2003
    Posts
    1,755

    Smile

    I don't think dialog has OnDraw member. Try to override OnPaint instead.

    Hope it will help you

  3. #3
    Join Date
    Apr 2002
    Location
    New -york ny
    Posts
    22
    Hi !
    To draw a graphic on a dialog box you need to add an event handler for t he WM_PAINT message on the dialog .you cthen choose to add your drawing code directly using the CPaintDC pointer or calling your OnDraw function with the CPaintDC pointer as argument .the code should look like this :

    void CMyClass::OnPaint()
    {
    CPaintDC dc(this); //framework generated code for painting

    OnDraw(&dc);
    }

    Please let me know if this code works

  4. #4
    Join Date
    Jul 2003
    Location
    China
    Posts
    39

    OK

    Using this in the Onpaint works well!
    Fulu Tao

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