another important thing that i saw, when i debug this code in OnPaint() after initiliaze properly!!! CPaintDC dc(this); // de Gdiplus::Graphics graphic(dc.m_hDC); Pen aPen(RGB(0,255,0)); graphic.DrawLine(&aPen,0,0,100,100); //CDialog::OnPaint(); when i insert breakpoint at graphic.DrawLine(&aPen,0,0,100,100) when run into this function debugger did not go to gdiplus library ! these mean can not work properly. but when i compile my previous code , in breakpoint, ask me where gdiplusgraphics.h that i think it is in SDK platform. Best Regards. MJM