Click here to Skip to main content
15,916,416 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralFile IO using Assembly and C Pin
Umer Sheikh27-Jan-08 10:27
Umer Sheikh27-Jan-08 10:27 
GeneralRe: File IO using Assembly and C Pin
Luc Pattyn27-Jan-08 11:51
sitebuilderLuc Pattyn27-Jan-08 11:51 
GeneralRe: File IO using Assembly and C Pin
Umer Sheikh27-Jan-08 12:02
Umer Sheikh27-Jan-08 12:02 
GeneralRe: File IO using Assembly and C Pin
Mark Salsbery27-Jan-08 12:12
Mark Salsbery27-Jan-08 12:12 
GeneralRe: File IO using Assembly and C Pin
Umer Sheikh27-Jan-08 12:20
Umer Sheikh27-Jan-08 12:20 
GeneralRe: File IO using Assembly and C Pin
Umer Sheikh27-Jan-08 12:42
Umer Sheikh27-Jan-08 12:42 
GeneralRe: File IO using Assembly and C Pin
Luc Pattyn27-Jan-08 12:47
sitebuilderLuc Pattyn27-Jan-08 12:47 
GeneralMFC: printing a document through drawing on a CScrollView Pin
Sternocera27-Jan-08 4:41
Sternocera27-Jan-08 4:41 
Hello,

I'm writing an MFC application that produces printed documents. I am using MFC's native printing support to draw to a CScrollView, through my own implementation of OnDraw(CDC* pDC) .

This works nicely. I can see what I've drawn in the ScrollView, and can scroll by compensating for the offset in co-ordinates in my OnDraw ( I haven't forgotten to *not* compensate when printing; pDC->IsPrinting() is called).

However, I cannot figure out why (through inference from an example app, and reading the documentation available) my "drawing" won't print or appear in print preview.

void CReportView::OnPrint(CDC *pDC, CPrintInfo *pInfo)
{

UNREFERENCED_PARAMETER(pInfo);
CReportView::OnDraw(pDC); // my own implementation of OnDraw
CScrollView::OnPrint(pDC,pInfo);
}

I would have thought that by passing the device context that the framework provides to OnPrint to OnDraw, that the printing device context would have been drawn to, but this doesn't work.

What should I do?

Thanks,
Sternocera
GeneralRe: MFC: printing a document through drawing on a CScrollView Pin
bob1697227-Jan-08 6:42
bob1697227-Jan-08 6:42 
QuestionHow to Implent Browser/Server Architecture under Linux Pin
cy163@hotmail.com27-Jan-08 4:11
cy163@hotmail.com27-Jan-08 4:11 
Generalignore: cross-post Pin
Luc Pattyn27-Jan-08 4:42
sitebuilderLuc Pattyn27-Jan-08 4:42 
GeneralRe: How to Implent Browser/Server Architecture under Linux Pin
Paul Conrad27-Jan-08 10:24
professionalPaul Conrad27-Jan-08 10:24 
GeneralChanging the exe icon Pin
Stan the man27-Jan-08 3:25
Stan the man27-Jan-08 3:25 
GeneralRe: Changing the exe icon Pin
Mark Salsbery27-Jan-08 7:21
Mark Salsbery27-Jan-08 7:21 
GeneralRe: Changing the exe icon Pin
Hamid_RT27-Jan-08 20:42
Hamid_RT27-Jan-08 20:42 
Generalplus arrays Pin
gentleguy27-Jan-08 2:25
gentleguy27-Jan-08 2:25 
GeneralRe: plus arrays Pin
Joan M27-Jan-08 2:43
professionalJoan M27-Jan-08 2:43 
GeneralRe: plus arrays Pin
fd012900227-Jan-08 17:06
fd012900227-Jan-08 17:06 
GeneralFlick problem caused by Invalidate in OnMouseMove Pin
followait27-Jan-08 1:39
followait27-Jan-08 1:39 
QuestionRe: Flick problem caused by Invalidate in OnMouseMove Pin
Mark Salsbery27-Jan-08 7:30
Mark Salsbery27-Jan-08 7:30 
GeneralRe: Flick problem caused by Invalidate in OnMouseMove Pin
followait27-Jan-08 16:51
followait27-Jan-08 16:51 
GeneralRe: Flick problem caused by Invalidate in OnMouseMove Pin
Mark Salsbery27-Jan-08 19:15
Mark Salsbery27-Jan-08 19:15 
Generalabout exception specification Pin
George_George26-Jan-08 22:33
George_George26-Jan-08 22:33 
GeneralRe: about exception specification Pin
Maxwell Chen27-Jan-08 18:33
Maxwell Chen27-Jan-08 18:33 
GeneralRe: about exception specification Pin
George_George27-Jan-08 18:41
George_George27-Jan-08 18:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.