displaying pictures
-
hi everyone im developing a program that among other things draws images on a form; but im having this little problem when i draw a large image and move the window several times it doesn't display the image or sometimes it displays part of it is there anyway to fix this ?
-
hi everyone im developing a program that among other things draws images on a form; but im having this little problem when i draw a large image and move the window several times it doesn't display the image or sometimes it displays part of it is there anyway to fix this ?
You need to draw the image in your OnPaint handler, then it will be drawn whenever your form needs to refresh itself. Christian Graus - Microsoft MVP - C++
-
You need to draw the image in your OnPaint handler, then it will be drawn whenever your form needs to refresh itself. Christian Graus - Microsoft MVP - C++
Also check that you are deleting all your GDI objects correctly. If your app runs out of them it can cause unusual display problems. A good way to check for GDI leaks is watching the GDI object count in the Task Manager, finding them is another problem altogether.
-
hi everyone im developing a program that among other things draws images on a form; but im having this little problem when i draw a large image and move the window several times it doesn't display the image or sometimes it displays part of it is there anyway to fix this ?
maybe it is some helpful to you CImage m_Image; m_Image.Load(Filename); In funtion Onpaint(WM_PAINT) OnPaint() { CPaint DC(this) m_Image.BitBlt(dc.m_hDC,CRect(0,0,800,600),CPoint(0,0)); // m_Image.StretchBlt(GetDC()->m_hDC,CRect(0,0,200,200)/*Dest*/,CRect(0,0,800,600)); }