Print preview doesn't work, but print ok 
Author Message
 Print preview doesn't work, but print ok

Hi all!

I don't understand. I try to implement print/print preview into my MDI
app. I'm able to print correctly what I see on screen, but unable to
print preview.

I set my CDC like that in the PrepareDC function:

        pDC->SetWindowExt(windowExt.Width(), windowExt.Height());
        pDC->SetViewportExt(rc.Width(), -rc.Height());      
        pDC->SetViewportOrg(0, rc.Height());

I draw into a memory DC created this way:

        pMemDC = new CDC();
        memBitmap.CreateCompatibleBitmap(pDC, bitmapWidth, bitmapHeight);
        pMemDC->SelectObject(&brush);  // Select the brush
        pMemDC->ExtFloodFill(0, 0, 0x00, FLOODFILLSURFACE);

and into the OnDraw function, I do a bitblt like that:

pDC->BitBlt(mScrollRect.left, mScrollRect.bottom, mScrollRect.Width(),
abs(mScrollRect.Height()), pMemDC, mScrollRect.left,
mScrollRect.bottom, SRCCOPY);

Any help would be appreciate!


Fri, 29 Jul 2005 21:20:37 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Why I can't print directly after Print Preview

2. Why I can't print directly in Print Preview

3. Print Preview Control and Print Preview Dialog - need some help ASAP

4. Print-preview: SelectObject isn't working

5. Print Range Doesn't Work On Win2000

6. Print Range Doesn't Work On Win2000

7. sample print programs in Charles Petzold doesn't work on Windows2000

8. Adding Print and Print Preview to Richedit Control

9. Printing/Print preview problem with CRichEditView.

10. Print Preview and Printing a Document?

11. Printing / Print Preview problem?

12. Print / Print Preview Commands


Powered by phpBB® Forum Software