// JP opened flex table

Click to See Complete Forum and Search --> : DC for quick redraw problem


jigen3
November 16th, 2003, 09:28 AM
hi,
i am trying to store the output of OnDraw()'s pDC into another CDC for quick redrawing. but when i try to store its output using


RedrawDC.BitBlt(0, 0, 2350, 1200, pDC, 0, 0, SRCCOPY);


i get basically a screen shot, with the origin at my windows client origin extending past my screen to blackness. also, when i scroll the window, the dc is compressed. how do i correctly copy on dc to another accurately? thx.

jigen3

Apoch
November 17th, 2003, 10:27 AM
You need to be getting the DC's window coordinates using GetWindowRect() and using them instead of 0,0,2350,1200. 2350,1200 is why you are reading outside the boundaries of the initial DC.

As for the scrolling problem, I'm not real sure what you mean; could you explain it in more detail?

jigen3
November 18th, 2003, 12:22 AM
thanks for the reply, i solved the problem tho, i did it a different way. the reason the boundaries are so big is because i wanted the entire bitmap stored into the RedrawDC, not just what was visible on the screen, so i used gdi+'s DrawImage() function (since it was a gif from a file).

jigen3

//JP added flex table