Click here to Skip to main content
15,921,382 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDriver or User Application Pin
phoenix1825-Apr-05 18:23
phoenix1825-Apr-05 18:23 
GeneralRe: Driver or User Application Pin
Blake Miller26-Apr-05 13:17
Blake Miller26-Apr-05 13:17 
GeneralGlobal Windows Message Problem Pin
outoolcoe25-Apr-05 17:49
outoolcoe25-Apr-05 17:49 
GeneralRe: Global Windows Message Problem Pin
PJ Arends25-Apr-05 18:23
professionalPJ Arends25-Apr-05 18:23 
GeneralRe: Global Windows Message Problem Pin
outoolcoe25-Apr-05 18:59
outoolcoe25-Apr-05 18:59 
GeneralRe: Global Windows Message Problem Pin
PJ Arends25-Apr-05 21:42
professionalPJ Arends25-Apr-05 21:42 
GeneralRe: Global Windows Message Problem Pin
outoolcoe26-Apr-05 0:08
outoolcoe26-Apr-05 0:08 
GeneralPrint the CHtmlView content Pin
Fernando A. Gomez F.25-Apr-05 17:12
Fernando A. Gomez F.25-Apr-05 17:12 
Hello folks.

I have this application which holds in its MainFrame a splitter window with two views. One of these views is an instance of CHtmlView (I didn't derive a class). This view only displays some HTML.

My problem is that I want to print the HTML content, as I can do it with my IE6. I tried using the Print function, inherited from CWnd, but it happened nothing:

<br />
void CMainFrame::OnReportPrint()<br />
{<br />
	int iRet = 0;<br />
	CPrintDialog wndPrint(TRUE, PD_ALLPAGES | PD_USEDEVMODECOPIES | <br />
                PD_NOPAGENUMS | PD_HIDEPRINTTOFILE | PD_NOSELECTION | <br />
                PD_RETURNDC, m_pReportView);<br />
	CDC* pPrintDC;<br />
<br />
	iRet = wndPrint.DoModal();<br />
	if (iRet == IDOK)<br />
	{<br />
		pPrintDC = CDC::FromHandle(wndPrint.GetPrinterDC());<br />
		m_pReportView->Print(pPrintDC, PRF_CLIENT);<br />
	}<br />
}<br />


The handles seems to be OK, and neither exceptions nor asserts are thrown.

When I click with the right button of the mouse on the CHtmlView, it displays me a popup menu -the same that will display your IE browser- and if I select the "Print" option, it prints the content quite well. However, I'd rather to have an option from my menu, as shown in the above code. By the way, variable m_pReportView is a pointer to the CHtmlView instance.

Any thoughts will be very much appreciated.

Regards,
KK.

When the pork tacos are over, you continue with the chicken tacos.
- Mexican popular proverbe.
GeneralRe: Print the CHtmlView content Pin
Jason Henderson26-Apr-05 3:21
Jason Henderson26-Apr-05 3:21 
GeneralTable in CRichEditCtrl Pin
Carc25-Apr-05 15:32
Carc25-Apr-05 15:32 
GeneralRe: Table in CRichEditCtrl Pin
Ravi Bhavnani25-Apr-05 16:59
professionalRavi Bhavnani25-Apr-05 16:59 
GeneralRe: Table in CRichEditCtrl Pin
Carc25-Apr-05 17:23
Carc25-Apr-05 17:23 
GeneralRe: Table in CRichEditCtrl Pin
Ravi Bhavnani25-Apr-05 17:30
professionalRavi Bhavnani25-Apr-05 17:30 
GeneralRe: Table in CRichEditCtrl Pin
Carc25-Apr-05 17:41
Carc25-Apr-05 17:41 
GeneralRe: Table in CRichEditCtrl Pin
Ryan Binns25-Apr-05 18:50
Ryan Binns25-Apr-05 18:50 
GeneralPlaying audio Pin
Anonymous25-Apr-05 15:30
Anonymous25-Apr-05 15:30 
GeneralRe: Playing audio Pin
Ravi Bhavnani25-Apr-05 16:57
professionalRavi Bhavnani25-Apr-05 16:57 
GeneralRe: Cstring comparision problem Pin
Ravi Bhavnani25-Apr-05 16:55
professionalRavi Bhavnani25-Apr-05 16:55 
Questionhow to use WINCAP functions Pin
sarmed25-Apr-05 11:35
sarmed25-Apr-05 11:35 
AnswerRe: how to use WINCAP functions Pin
David Crow26-Apr-05 4:02
David Crow26-Apr-05 4:02 
GeneralModeless PropertySheet in Modal PropertySheet Pin
Anonymous25-Apr-05 11:03
Anonymous25-Apr-05 11:03 
GeneralFor big and fast programs Pin
Luckyware25-Apr-05 10:34
Luckyware25-Apr-05 10:34 
GeneralRe: For big and fast programs Pin
alex.barylski25-Apr-05 15:05
alex.barylski25-Apr-05 15:05 
GeneralRe: For big and fast programs Pin
Michael Dunn25-Apr-05 16:28
sitebuilderMichael Dunn25-Apr-05 16:28 
GeneralRe: For big and fast programs Pin
ThatsAlok25-Apr-05 19:56
ThatsAlok25-Apr-05 19:56 

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.