|
|
Comments and Discussions
|
|
 |
|

|
I use this Printer class successfully in my application. There one thing I need add and I don't know how. Sometimes when I start printing from the application the network printer is not configured or is disconnected. Looks like the printing code does not see it and goes through without errors. Is there any way to detect in code that printer is unavailable and inform the user.
Thanks.
|
|
|
|

|
hi all
In SDI application i am drawing graphics
by using lines the problem is that print
preview and print output is small image
not actuall image size. can any one provide
code to fx the problem.
|
|
|
|

|
tnx for your work....
quistiun
|
|
|
|

|
One of the info fields (cbSize) is not initialized.
BOOL CPrinter::StartPrinting()
{
DOCINFO info;
::ZeroMemory(&info, sizeof(info));
info.cbSize = sizeof(DOCINFO); //<---ADD THIS LINE!
info.lpszDocName = AfxGetAppName();
SetPrinterFont();
dc->StartDoc(&info);
docStarted = TRUE;
TEXTMETRIC tm;
dc->GetTextMetrics(&tm);
lineHeight = tm.tmHeight + tm.tmInternalLeading;
pageVMargin = dc->GetDeviceCaps(LOGPIXELSY) / 2;
pageHMargin = dc->GetDeviceCaps(LOGPIXELSX) / 2;
pageHeight = dc->GetDeviceCaps(VERTRES);
pageWidth = dc->GetDeviceCaps(HORZRES);
Y = pageVMargin;
return TRUE;
} // CPrinter::StartPrinting
|
|
|
|

|
When I use arabic font in Visual C++, it appear correct in view but in printpreview window arabic characters overlaped to each other. I use This statement
CFont ffont;
ffont.CreateFont(-18,0,0,0,700,0,0,0,178,3,2,1,2,"Arial");
mapmode is MM_LOENGLISH
I need help. Any body have the solution pleas send to my email
thanks
|
|
|
|

|
I can understand -18, 0, 0, 0, but what is 700? Oh, you meant FW_BOLD. 0, 0, 0 you probably meant FALSE, FALSE, FALSE. What the hell is 178? 3? 2? 1? 2? Those numbers are completely meaningless! Perhaps by 178 you meant ARABIC_CHARSET? If so, why didn't you write that? And I haven't a clue as to what those other numbers could possibly mean. The code may or may not be correct, but I have no idea if it is or not.
When the code is written intelligibly, I might have a fraction of chance of guessing what is wrong. Or maybe not. But something this unintelligible is not something I would even offer an opinion on. Note that once it is rewritten, I may not see anything wrong, but I can't tell anything from such a piece of incorrect code.
|
|
|
|

|
From : Bushka
to : Mr.Joseph M. Newcomer
Very Thanks to email me and I'm sorry for numbers in function CreateFont this mean the number
CreateFont( int nHeight, int nWidth, int nEscapement, int nOrientation, int nWeight, BYTE bItalic, BYTE bUnderline, BYTE cStrikeOut, BYTE nCharSet, BYTE nOutPrecision, BYTE nClipPrecision, BYTE nQuality, BYTE nPitchAndFamily, LPCTSTR lpszFacename );
You can find more detail in MSDN and for the number 178 this ARABIC_CHARSET
My problem in PrintView with arabic only, English no problem with it. printing like view with no any problem.
Also I use only function OnDraw
thanks again and i hope to find answer
I can send the source code but where ???
I use number
|
|
|
|

|
Hi,
I need some help in doing my current task involving printing. The requirement is to listen in a paricular folder and ANY files coming to that folder has be sent to a default network printer, after taking note of the pagecount of that file.I tried with a dummy printer connection. It worked.But,when taking it to a real printer, the "GetPrinter" function is not returning the actual job count.
The simple function i used to print is "ShellExecute" with "print" as the operation parameter.
Regards,
Franklin
|
|
|
|

|
I've never used GetPrinter; so I have no experience to suggest what might be happening.
joe
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
Learn how to implement print support in your applications.
| Type | Article |
| Licence | |
| First Posted | 16 May 2000 |
| Views | 180,638 |
| Bookmarked | 46 times |
|
|