icon printing problems
Rob Gue -- rob.gue@gtri.gatech.edu Thursday, August 29, 1996 Environment: VC++ 4.2, NT 3.51 I am having trouble printing icons in my CView-derived class's OnPrint method. The application draws some icons over a bitmap background. When I do print preview, everything appears OK. However, when something is actually printed, the icons appear on the printout as solid black. Does anyone have any hints for what I might be doing wrong? Here's some more information: The mapping mode is MM_ISOTROPIC. The icons are loaded with CWinApp::LoadIcon. The docs for CDC::DrawIcon state that the mapping mode must be MM_TEXT to use it, so it obviously won't work correctly in this case. The docs for ::DrawIcon and ::DrawIconEx mention no such limitation. I have experimented with both ::DrawIcon and ::DrawIconEx to no avail. Does the device driver need to support a certain type of operation for this to work? Any hints would be appreciated. Thanks in advance (except to Mike B., whom i shall thank afterwards in the event of a response :-) rob.gue@gtri.gatech.edu
LeRoy Baxter -- lbaxter@transport.com Sunday, September 01, 1996 I got bit on this long ago. The problem is that the printer Device Context does not know how to translate colors into grey scale. As I recall (without digging into my archives, you have to first load the bitmap into a memory DC and then map it to the printer DC ---------- From: rob gue[SMTP:rob.gue@gtri.gatech.edu] Sent: Thursday, August 29, 1996 2:19 PM To: mfc-l@netcom.com Subject: icon printing problems Environment: VC++ 4.2, NT 3.51 I am having trouble printing icons in my CView-derived class's OnPrint method. The application draws some icons over a bitmap background. When I do print preview, everything appears OK. However, when something is actually printed, the icons appear on the printout as solid black. Does anyone have any hints for what I might be doing wrong? Here's some more information: The mapping mode is MM_ISOTROPIC. The icons are loaded with CWinApp::LoadIcon. The docs for CDC::DrawIcon state that the mapping mode must be MM_TEXT to use it, so it obviously won't work correctly in this case. The docs for ::DrawIcon and ::DrawIconEx mention no such limitation. I have experimented with both ::DrawIcon and ::DrawIconEx to no avail. Does the device driver need to support a certain type of operation for this to work? Any hints would be appreciated. Thanks in advance (except to Mike B., whom i shall thank afterwards in the event of a response :-) rob.gue@gtri.gatech.edu
Steini -- stein@itn.is Monday, September 02, 1996 At 17:19 29.8.1996 -0400, you wrote: >Environment: VC++ 4.2, NT 3.51 > >I am having trouble printing icons in my CView-derived class's OnPrint method. >The application draws some icons over a bitmap background. When I do print >preview, everything appears OK. However, when something is actually >printed, the icons appear on the printout as solid black. Does anyone have >any hints for what I might be doing wrong? Here's some more information: > >The mapping mode is MM_ISOTROPIC. The icons are loaded with >CWinApp::LoadIcon. The docs for CDC::DrawIcon state that the mapping mode >must be MM_TEXT to use it, so it obviously won't work correctly in this >case. The docs for ::DrawIcon and ::DrawIconEx mention no such limitation. >I have experimented with both ::DrawIcon and ::DrawIconEx to no avail. Does >the device driver need to support a certain type of operation for this to >work? Any hints would be appreciated. > >Thanks in advance (except to Mike B., whom i shall thank afterwards in the >event of a response :-) > >rob.gue@gtri.gatech.edu > I had simular problem with text on some printers. The solution was to set the background to transparent ( CDC::SetBkMode ( TRANSPARENT ) ). Hope this helps. Steini stein@itn.is http://www.itn.is/~stein Steingrimur Jonsson, Software Engineer Home phone (354)553 1006 Work phone (354)569 2500 Direct line (354)569 2510 Fax (354)568 9507
| Вернуться в корень Архива |