thanks
ReplyOriginally posted by: manson
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
Test.cpp
TestDlg.cpp
PrintStatus.cpp
PrinterJob.cpp
C:\Doglist\PrinterJob.cpp(208) : warning C4552: '!=' : operator has no effect; expected operator with side-effect
PrintManagerDlg.cpp
ListPrintPage1.cpp
ListCtrlPrint.cpp
ListPrintSetup.cpp
ListPrintPage2.cpp
PrintManager.cpp
Generating Code...
Linking...
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/subsystem:windows /incremental:yes "/pdb:Debug/Test.pdb" /debug /machine:I386 "/out:Debug/Test.exe" /pdbtype:sept
.\Debug\StdAfx.obj
.\Debug\Test.obj
.\Debug\TestDlg.obj
.\Debug\Test.res
.\Debug\PrintStatus.obj
.\Debug\PrinterJob.obj
.\Debug\PrintManagerDlg.obj
.\Debug\ListPrintPage1.obj
.\Debug\ListCtrlPrint.obj
.\Debug\ListPrintSetup.obj
.\Debug\ListPrintPage2.obj
.\Debug\PrintManager.obj
ListPrintPage1.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CFontCombo::~CFontCombo(void)" (??1CFontCombo@@UAE@XZ)
ListCtrlPrint.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CFontCombo::~CFontCombo(void)" (??1CFontCombo@@UAE@XZ)
ListPrintSetup.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CFontCombo::~CFontCombo(void)" (??1CFontCombo@@UAE@XZ)
ListPrintPage1.obj : error LNK2001: unresolved external symbol "public: __thiscall CFontCombo::CFontCombo(void)" (??0CFontCombo@@QAE@XZ)
ListPrintPage1.obj : error LNK2001: unresolved external symbol "public: void __thiscall CFontCombo::InitFonts(void)" (?InitFonts@CFontCombo@@QAEXXZ)
ListCtrlPrint.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CCoolButton::~CCoolButton(void)" (??1CCoolButton@@UAE@XZ)
ListPrintSetup.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CCoolButton::~CCoolButton(void)" (??1CCoolButton@@UAE@XZ)
ListPrintSetup.obj : error LNK2001: unresolved external symbol "public: __thiscall CCoolButton::CCoolButton(void)" (??0CCoolButton@@QAE@XZ)
Debug/Test.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.
You must add the following line to your ResourceIncludes: #include "afxprint.rc" Greetz, DX05
ReplyOriginally posted by: bobo
rcPage.top += nMaxHeight;
}else
return CSize(0, szFtPrint.cy);
CSize
CListCtrlPrint::PrintListHead(CDC * pDC, CRect & rcPage, bool bCalc)
{
if (!bCalc)
{
CFont * oft = pDC->SelectObject(&ftPrint);
int box = 0;
CRect rc1;
int y = rcPage.top;
int nMaxHeight = szFtPrint.cy;
//draw header text first
for (int t = 0; t < iNumCol; t++)
{
rc1.SetRect(rcPage.left + pDx[t], y, rcPage.left + pDx[t+1], y + szFtPrint.cy);
CString cs = pColTitle[t] ? pColTitle[t] : "";
UINT ftm = DT_CENTER;
//if (pFormat[t]&HDF_CENTER) ftm = DT_CENTER;
//else if (pFormat[t]&HDF_RIGHT) ftm = DT_RIGHT;
CRect tmpRect = rc1;
pDC->DrawText(cs, tmpRect, ftm | DT_VCENTER | DT_WORDBREAK | DT_CALCRECT);
nMaxHeight = max(nMaxHeight, tmpRect.Height());
rc1.bottom = tmpRect.bottom;
pDC->DrawText(cs, rc1, ftm | DT_VCENTER | DT_WORDBREAK);
}
//draw header column lines
for (int jj = 0; jj < iNumCol; jj++)
{
pDC->MoveTo(rcPage.left + pDx[jj], rcPage.top);
pDC->LineTo(rcPage.left + pDx[jj], rcPage.top + nMaxHeight);
}
//draw header rectangle around
CRect rcc(rcPage.left, rcPage.top, rcPage.right, rcPage.top + nMaxHeight);
pDC->MoveTo(rcc.left, rcc.top);
pDC->LineTo(rcc.right, rcc.top);
pDC->LineTo(rcc.right, rcc.bottom);
pDC->LineTo(rcc.left, rcc.bottom);
pDC->LineTo(rcc.left, rcc.top);
pDC->SelectObject(oft);
rcPage.top += szFtPrint.cy;
}
Originally posted by: Ken
Current code will print all the items of list box and add several empty lines to complete the page. I added 2 lines of code to CListCtrlPrint::OnPrint
if (iLast > pList->GetItemCount ())
iLast = pList->GetItemCount ();
So there are no empty lines
Originally posted by: Kanat
Sir/madam
Could you help me:
I wrote an application which calls database (Access,SQL Server) wich shows at time only information about one person
How to send to Printer/Print Preview the data shown at the given time. The Document is SDI.
thank you furthermore.
Reply
Originally posted by: suduan
i need it
ReplyOriginally posted by: Prad
Koay Kah Hoe has written that print preview was added and he has also given the site for getting the example.But while i am trying to access that site it says that page is not found.From where can i get the Print preview.Please help me .
Thanks in advance
Prad
Print Previewing without the Document/View Framework By Koay Kah Hoe | 26 Nov 1999 : http://web3.codeproject.com/Articles/65/Print-Previewing-without-the-Document-View-Framewo?msg=4316649#xx4316649xx
ReplyOriginally posted by: Jasmin
I'm sorry to poor at english.
I want to print two ListControl in one page.
I have no idea.
Help..
Originally posted by: KyungSu Park
That's a nice class !!
I have used this class, but could not find how to implement print preview.
Is there any source code or demo project that explains the way to provide print preview using this class ??
I need your help...
Thanks in advance.
ReplyOriginally posted by: Gary Hoffer
When I have a network printer as my default printer the Print Setup dialog is bypassed. Setting any local printer as the default printer allows the print setup dialog to be brought up and includes the network printers in the selection list. Does anyone have a fix for this behavior?
I am using Visual C++ v.6.0 SP3 and testing in debug mode.
Thanks
Gary