-es0 -gc3 -m -a -mt -kd
I recompiled the whole system but saw no error messages regarding DMPAPER_LETTER either at compile or at run time. I use win32prn.ch file in my system. I tested with formType := 1, but that didn't help either.
To xHarbour, until a solution is found.
Regards.
Ash
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
2015-01-08 16:56 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com) * contrib/xhb/xhwinprn.prg ! Win32Prn() fixed xhb compatibility See: https://groups.google.com/d/msg/harbour-users/1XLc_vPEUhw/XKtb9ibFkLMJ |
| Best regards, Itamar M. Lins Jr. |
From xHarbour's Language Reference the desciption of XTOC() is:
XtoC()
Converts values of data type C, D, L, M, N to a string.
Now if XTOC() works differently in Harbour, I wasn't aware of the change. My later tests didn't use this function for displaying the contents of the variables in question.
I have since changed my source code to as shown below and everything works.
From:
oPrinter := Win32Prn():new( cPrinter )
To:
#ifdef __XHARBOUR__
oPrinter := Win32Prn():new( cPrinter )
#else
oPrinter := Win_Prn():new( cPrinter )
#endif
What would your assessment be in this situation?
Regards.
Ash
hello Ash,
I confirm that your program works here as you stated - F/1/1. But when I change the function name from Win_prn to win32prn (my application is using win32prn()), I get F/256/1. 256 is defined as DMPAPER_USER in both win32prn.ch and hbwin.ch header files. I was wrong in assuming that the printer was asking for A4 paper. The printer must have been asking for user defined paper via its manual feeder.
METHOD Create() CLASS WIN32PRN
IF ::PaperLength > 0 .AND. ::PaperWidth > 0
::FormType := WIN_DMPAPER_USER
ENDIF
RETURN ::win_Prn:Create()
so maybe this is your case, check ::FormType before and after ::create()
---
BTW, related to a former post:
with switch '-a' you never will see any possible missing '#define' during compile,
as such will be IMHO assigned in that case as a MEMVAR ...
best regards
Rolf
To clarify. XTOC() in CT3, Harbour and xHarbour works in exactly the
same way. It converts numbers to 8 bytes strings with IEEE758 double
values so it's binary data. Harbour does not work differently then
original CT3. It was the reason why your result looked strangely.
There is one important difference between Harbour and xHarbour
Win32Prn/Win_Prn objects.
In Harbour at startup printer settings are read from the system
so the object is initialized in the same way as default setting
in your printer configuration.
What you see in your corrected test is what system returned for us.
In xHarbour printer settings are ignored and Win32Prn() object is
always initialized with fixed values regardless of system settings
and printer capabilities.
Now (when this is clear I hope ;)) can you tell me why it creates
problem for you?
What is your expected behavior?