why can't I print an icon?
-
I want to print some icons. Here is my code:
CDC* m_PrintDC;
// attach m_PrintDC with printer success .....CPoint point(10, 10);
HICON aIcon = AfxGetApp()->LoadIcon(IDI_ICON_CHECKEDBOX);
m_PrintDC->DrawIcon(point, aIcon);//m_PrintDC->DrawText("xxxxxxxxx", &aRect,DT_SINGLELINE | DT_LEFT);
Here IDI_ICON_CHECKEDBOX is a icon ID that I draw. But it doesn't work, I don't know why?? I can print some text with DrawText(...). Anyone know what's wrong here? Thank you in advance.
-
I want to print some icons. Here is my code:
CDC* m_PrintDC;
// attach m_PrintDC with printer success .....CPoint point(10, 10);
HICON aIcon = AfxGetApp()->LoadIcon(IDI_ICON_CHECKEDBOX);
m_PrintDC->DrawIcon(point, aIcon);//m_PrintDC->DrawText("xxxxxxxxx", &aRect,DT_SINGLELINE | DT_LEFT);
Here IDI_ICON_CHECKEDBOX is a icon ID that I draw. But it doesn't work, I don't know why?? I can print some text with DrawText(...). Anyone know what's wrong here? Thank you in advance.
What's the dpi on the printer DC? A 32x32 icon will be pretty small on a 1400dpi printer :)
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
What's the dpi on the printer DC? A 32x32 icon will be pretty small on a 1400dpi printer :)
Mark Salsbery Microsoft MVP - Visual C++ :java:
Yes, without other mapping, about 0.023 inch per side.The final rendering software may pass that off as noise and decide to print a blank page. :) Regards :)
Bram van Kampen
-
Yes, without other mapping, about 0.023 inch per side.The final rendering software may pass that off as noise and decide to print a blank page. :) Regards :)
Bram van Kampen
-
thank you for your reply! my printer is HP LaserJet 3052, with 1200dpi. So do you have any idea what I should do in this case?
Create a New Bitmap of fixed dimensions of your choice, Bitbuild your Icon in it, using stretch mode, and then print this new bitmap. Regards, :)
Bram van Kampen