IcraW.lib kitaplığı ve IcraW.exp nesnesi oluşturuluyor
ICRA_LB2.obj : error LNK2001: Çözümlenmemiş dış sembol _HB_FUN_TACTIVEX
Yardimci.obj : error LNK2001: Çözümlenmemiş dış sembol _HB_FUN_TACTIVEX
FiveH32.lib(MEMOEDIT.obj) : error LNK2001: Çözümlenmemiş dış sembol _HB_FUN_TACTIVEX
FiveH32.lib(SCINTILA.obj) : error LNK2001: Çözümlenmemiş dış sembol _HB_FUN_TACTIVEX
IcraW.exe : fatal error LNK1120: 1 çözümlenmemiş dışlar
Antonio Linares wrote:Please download it again, thanks
METHOD Say( nRow, nCol, cText, oFont, nWidth, nClrText, nBkMode, nPad ) ;
CLASS TPrinter
local nTemp, nOldColor := GetTextColor()
if ::hDC = 0
return nil
endif
DEFAULT oFont := ::oFont ,;
nBkMode := 1 ,;
nPad := ::nPad
if oFont != nil
oFont:Activate( ::hDCOut )
endif
SetbkMode( ::hDCOut, nBkMode ) // 1,2 transparent or Opaque
if nClrText != nil
SetTextColor( ::hDCOut, nClrText )
endif
if Empty( nWidth )
do case
case nPad == PAD_RIGHT
nCol := Max( 0, nCol - ::GetTextWidth( cText, oFont ) )
case nPad == PAD_CENTER
nCol := Max( 0, nCol - ( ::GetTextWidth( cText, oFont ) / 2 ) )
endcase
SetTextAlign( ::hDCOut, TA_LEFT )
TextOut( ::hDCOut, nRow, nCol, cText )
else
do case
case nPad == PAD_RIGHT
nTemp := nCol + nWidth
SetTextAlign( ::hDCOut, TA_RIGHT )
case nPad == PAD_CENTER
nTemp := nCol + ( nWidth / 2 )
SetTextAlign( ::hDCOut, TA_CENTER )
otherwise
nTemp := nCol
SetTextAlign( ::hDCOut, TA_LEFT )
endcase
ExtTextOut( ::hDCOut, nRow, nTemp,;
{ nRow, nCol, nRow + oFont:nHeight * 1.5, nCol + nWidth },;
cText, ETO_CLIPPED )
endif
if oFont != nil
oFont:DeActivate( ::hDCOut )
endif
SetTextColor( ::hDCOut, nOldColor )
return nil
// Prints FAIL as white on red
oPrn:SayText( nRow, 2 * nCsp, "FAIL",6*nCsp,nRsp, oFbold, , CLR_WHITE, oBrushRed )
// Prints text in White on Red
oPrn:SayText( nRow, 10 * nCsp, MemoLine( oPrintInspect:svcdes, 60, lx,, .T. ),,, oFnorm )
// Required to return text to default of black on white
oPrn:SayText( nRow, 10 * nCsp, MemoLine( oPrintInspect:svcdes, 60, lx,, .T. ),,, oFnorm, , CLR_BLACK, oBrushWhite )
TimStone wrote:Antonio,
Yes, that is exactly what I meant.
Hua,
You will notice the last comment on the thread you referenced. It was TOTALLY WRONG but I decided not to argue about it. In fact, my code for nearly 100 reports/invoices/etc is all object based. And, most importantly, the problem DOES EXIST WITH SAYTEXT( ) which is what I am using after Nages suggested it. But why argue? Based on his assumption of usage, he was not interested in changing this.
- Code: Select all Expand view RUN
// Prints FAIL as white on red
oPrn:SayText( nRow, 2 * nCsp, "FAIL",6*nCsp,nRsp, oFbold, , CLR_WHITE, oBrushRed )
// Prints text in White on Red
oPrn:SayText( nRow, 10 * nCsp, MemoLine( oPrintInspect:svcdes, 60, lx,, .T. ),,, oFnorm )
// Required to return text to default of black on white
oPrn:SayText( nRow, 10 * nCsp, MemoLine( oPrintInspect:svcdes, 60, lx,, .T. ),,, oFnorm, , CLR_BLACK, oBrushWhite )
In this case, I only want the line to change color if it has a "FAIL" indicated. If I do that, all future lines would be white on red unless I change the color back.
#include "fivewin.ch"
function Main()
local oPrn
local oBrushRed, oBrushGrn
local oFont
local nRow := 300
local nCsp := 200
local nRsp := 200
DEFINE BRUSH oBrushRed COLOR CLR_RED
DEFINE BRUSH oBrushGrn COLOR CLR_HGREEN
PRINT oPrn PREVIEW
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-20 OF oPrn
PAGE
oPrn:SayText( nRow, 2 * nCsp, FWVERSION, 6 * nCsp, nRsp, oFont, nil, CLR_YELLOW, oBrushRed )
oPrn:SayText( nRow, 10 * nCsp, "Default: nil,nil", 6 * nCsp, nRsp, oFont )
nRow += nRsp + 100
oPrn:SayText( nRow, 2 * nCsp, FWVERSION, 6 * nCsp, nRsp, oFont, nil, CLR_BLUE, oBrushGrn )
oPrn:SayText( nRow, 10 * nCsp, "Default: nil,nil", 6 * nCsp, nRsp, oFont )
ENDPAGE
ENDPRINT
RELEASE FONT oFont
RELEASE BRUSH oBrushRed, oBrushGrn
return nil
#include "fivewin.ch"
function Main()
local oPrn
local oBrushRed, oBrushGrn
local oFont
DEFINE BRUSH oBrushRed COLOR CLR_RED
DEFINE BRUSH oBrushGrn COLOR CLR_HGREEN
PRINT oPrn PREVIEW
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-20 OF oPrn
PAGE
// Using method directly
// oPrn:SayText( row, col, <text> ,width,Heit, oFont,Align, ClrText,BckClr/Brush, UNITS )
// ----------------------------------------------------------------------------------------------------
oPrn:SayText( 300, 400, "Yellow, RedBrush", 2000, 200, oFont, nil, CLR_YELLOW, oBrushRed, "PIXEL" )
oPrn:SayText( 620, 400, "Default: nil,nil", 2000, 200, oFont, nil, nil, nil, "PIXEL" )
oPrn:SayText( 940, 400, "Red, GreenBrush", 2000, 200, oFont, nil, CLR_HRED, oBrushGrn, "PIXEL" )
oPrn:SayText( 1260, 400, "Default: nil,nil", 2000, 200, oFont, nil, nil, nil, "PIXEL" )
oPrn:SayText( 1580, 400, "Yellow, RedBrush", 2000, 200, oFont, nil, CLR_YELLOW, oBrushRed, "PIXEL" )
oPrn:SayText( 1900, 400, "Default: nil,nil", 2000, 200, oFont, nil, nil, nil, "PIXEL" )
oPrn:SayText( 2220, 400, "Default: nil,nil", 2000, 200, oFont, nil, nil, nil, "PIXEL" )
oPrn:SayText( 2540, 400, FWVERSION, 2000, 200, oFont, nil, CLR_HRED, oBrushGrn, "PIXEL" )
/*
// COMMAND SYNTAX ( Clarity of code, ease of coding, avoids possible mistakes in using method directly )
@ 300,400 PRINT TO oPrn TEXT "Yellow, RedBrush" SIZE 2000,200 PIXEL FONT oFont COLOR CLR_YELLOW,oBrushRed
@ 620,400 PRINT TO oPrn TEXT "Default: nil,nil" SIZE 2000,200 PIXEL FONT oFont
@ 940,400 PRINT TO oPrn TEXT "Red, GreenBrush" SIZE 2000,200 PIXEL FONT oFont COLOR CLR_HRED, oBrushGrn
@ 1260,400 PRINT TO oPrn TEXT "Default: nil,nil" SIZE 2000,200 PIXEL FONT oFont
@ 1580,400 PRINT TO oPrn TEXT "Yellow, RedBrush" SIZE 2000,200 PIXEL FONT oFont COLOR CLR_YELLOW,oBrushRed
@ 1900,400 PRINT TO oPrn TEXT "Default: nil,nil" SIZE 2000,200 PIXEL FONT oFont
@ 2220,400 PRINT TO oPrn TEXT "Default: nil,nil" SIZE 2000,200 PIXEL FONT oFont
@ 2540,400 PRINT TO oPrn TEXT FWVERSION SIZE 2000,200 PIXEL FONT oFont COLOR CLR_HRED, oBrushGrn
*/
ENDPAGE
ENDPRINT
RELEASE FONT oFont
RELEASE BRUSH oBrushRed, oBrushGrn
return nil
#include "fivewin.ch"
function Main()
local oPrn
local oBrushRed, oBrushGrn
local oFont, oFont2, oFont3, oFont4
local cText1, cText2, cText3
local nRow, nRow1, nRow2
cText1 := "On the previous version ( and those before that one ), if " + ;
"you use the Printer class, and your SAY statement includes a color, " + ;
"the program then defaults to that color for all future printing " + ;
"until that is changed." + CRLF + "." + CRLF + ;
"I print most of my document(s) in the default of Black. However, " + ;
"sometimes I want a word, several words, or a section printed in a " + ;
"different color. It seems most efficient to just use a non-default " + ;
"color only when printing the desired text, and otherwise revert to " + ;
"the default."
cText2 := "This can be accomplished with a simple change to the " + ;
"printer.prg code, and then I won't have to modify that class every " + ;
"time you have an update. Here is what I suggested:" + CRLF + ;
"line 614: Add: , nOldColor := GetTextColor( )" + CRLF + ;
"line 659: Add: SetTextColor( ::hDCOut, nOldColor )" + CRLF + ;
"I was surprised this was not considered on this release since the " + ;
"suggestion was provided several weeks ago, and from my perspective, " + ;
"shows a bug in the current implementation."
cText3 := "You will notice the last comment on the thread you referenced. " + ;
"It was TOTALLY WRONG but I decided not to argue about it. In fact, my " + ;
"code for nearly 100 reports/ invoices, etc is all object based. And, most " + ;
"importantly, the problem DOES EXIST WITH SAYTEXT( ) which is what I am " + ;
"using after Nages suggested it. But why argue? Based on his assumption " + ;
"of usage, he was not interested in changing this."
DEFINE BRUSH oBrushRed COLOR CLR_RED
DEFINE BRUSH oBrushGrn COLOR CLR_HGREEN
PRINT oPrn PREVIEW
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14 OF oPrn
DEFINE FONT oFont2 NAME "VERDANA" SIZE 0,-14 OF oPrn
DEFINE FONT oFont3 NAME "Segoe UI" SIZE 0,-16 OF oPrn
DEFINE FONT oFont4 NAME "ARIAL NARROW" SIZE 0,-10 OF oPrn
PAGE
nRow := 1.5
@ nRow, 1.0 PRINT TO oPrn TEXT cText1 SIZE 2.8, nil FONT oFont ;
COLOR { CLR_BLACK, CLR_BLACK, CLR_GREEN } ;
INCHES LASTROW nRow1
@ nRow, 4.2 PRINT TO oPrn TEXT cText2 SIZE 2.8, nil FONT { oFont2, oFont4, oFont4, oFont2 } ;
COLOR { CLR_BLACK, CLR_HRED, CLR_HRED, CLR_BLUE } ;
INCHES LASTROW nRow2
nRow := Max( nRow1, nRow2 ) + 0.5
@ nRow, 1.0 PRINT TO oPrn TEXT cText3 SIZE 6.0, nil FONT oFont3 INCHES
ENDPAGE
ENDPRINT
RELEASE FONT oFont, oFont2, oFont3
RELEASE BRUSH oBrushRed, oBrushGrn
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 47 guests