Problem with Printer Status Box
Dear All ,
A strange problem related to Printer Status Box. While printing a page , printer status box showing last two message strings wrong.
The dialog box shows ,
Printing
Test
on the
Samsung CLP-320 series
.................
..................
These last two lines are wrong. They should be
On uSB Port 001
Page 1
I am using Unicode.
PL help at earliest.
Thanking you ,
Manisha
Re: Problem with Printer Status Box
What is "Printer Status Box"?
How do you display it?
Re: Problem with Printer Status Box
While printing a document , after selecting file and printer , MFC displays this dialog box.
It just displays information of processing pages. This is displayed after OnPreparePrinting
and before OnPrint.
Re: Problem with Printer Status Box
Dear Victor ,
After OnPreparePrinting , to show Printing Status Dialog box, MFC is using variable nFormatID.
The code is nFormatID = AFX_IDS_PRINTONPORT . The ID of AFX_IDS_PRINTONPORT is 61504.
and one of my strings in string table is also having ID 61504.
Naturally , instead of port info , the dialog is displaying my string.
Now I dont know what to do ? I reinstalled the printer , didn't help.
Re: Problem with Printer Status Box
Quote:
Originally Posted by
ManishaSantosh
After OnPreparePrinting , to show Printing Status Dialog box, MFC is using variable nFormatID.
The code is nFormatID = AFX_IDS_PRINTONPORT . The ID of AFX_IDS_PRINTONPORT is 61504.
and one of my strings in string table is also having ID 61504.
It is not good...
MSDN recommended to use the range 1 -> 0x7FFF for the string resources with IDS_, IDP_ prefix to avoid the conflicts with system resource IDs
Quote:
Originally Posted by
ManishaSantosh
Now I dont know what to do ?
Open your resource.h file and manually chang the ID for your string from 61504 to something < 32767.
Then do Rebuild All
Re: Problem with Printer Status Box
Thankx a lot victor ,
I will try and remember it definately .. I will avoid IDS Tag ..
Re: Problem with Printer Status Box
Problem solved .. Conflict removed ..
But when I created String Table , I just gave ID ..
I used IDS_ tag but the value was generated by MFC ..
Then why was the conflict ?
I will start my strings with ID suggested by you in future.