Jump to content
Fivewin Brasil

TPrinter - Erro em 32 Bits - RESOLVIDO


oziel

Recommended Posts

Estou convertendo meus programas para 32 bits. e apareceu um problema quando tento imprimir um relatório - Classe TPrinter. (Esse prog. funciona perfeitamente em 16 bits)

Vejam:

.....

Application

===========

Path and name: C:\Proj_FWH\GRHATE\GRHATE.EXE (32 bits)

Size: 1,737,728 bytes

Time from start: 0 hours 0 mins 5 secs

Error occurred at: 07/07/11, 18:16:03

Error description: Error BASE/1004 Message not found: TPRINTER:GETTEXTWIDHT

Stack Calls

===========

Called from: => TPRINTER:ERROR(179)

Called from: tobject.prg => (b)HBOBJECT:HBOBJECT(105)

Called from: => TPRINTER:MSGNOTFOUND(0)

Called from: PRINTER.PRG => TPRINTER:GETTEXTWIDHT(167)

Called from: ATENDATE.PRG => PRNASO(2766)

Called from: ATENDATE.PRG => (b)ATENDATE(118)

Called from: BTNBMP.PRG => TBTNBMP:CLICK(0)

.........

FUNCTION PrnASO()

LOCAL nTam, nLen, nTamPag, nTamRel, nLin, oFont,;

oPrn, oRad, bBloco

PRINT oPrn NAME "Atestado de Saude Ocupacional" RPREVIEW

nPag := 0

nTam := 36

nTamRel := 85

nTamPag := 60

nTipo := 1

DO WHILE .t.

DEFINE FONT oFont NAME "ARIAL" SIZE nTam,-12 OF oPrn

oPrn:SetFont(oFont)

nLen := oPrn:GetTextWidht("B",oPrn:oFont)

IF oPrn:nHorzRes()/nLen < nTamRel

nTam-= 0.05

oFont:End()

ELSE

EXIT

ENDIF

ENDDO

.............

OZIEL LOPES

FW 22c - Clipper 5.3b - Workshop 4.0

FWH 6.12 Free - xHarbour 0.99.71 Simplex - BCC55 - Pelles C - xDev.

Editado por - OZIEL on 08/07/2011 10:36:26

Link to comment
Share on other sites

Estou convertendo meus programas para 32 bits. e apareceu um problema quando tento imprimir um relatório - Classe TPrinter. (Esse prog. funciona perfeitamente em 16 bits)

Vejam:

.....

Application

===========

Path and name: C:\Proj_FWH\GRHATE\GRHATE.EXE (32 bits)

Size: 1,737,728 bytes

Time from start: 0 hours 0 mins 5 secs

Error occurred at: 07/07/11, 18:16:03

Error description: Error BASE/1004 Message not found: TPRINTER:GETTEXTWIDHT

Stack Calls

===========

Called from: => TPRINTER:ERROR(179)

Called from: tobject.prg => (b)HBOBJECT:HBOBJECT(105)

Called from: => TPRINTER:MSGNOTFOUND(0)

Called from: PRINTER.PRG => TPRINTER:GETTEXTWIDHT(167)

Called from: ATENDATE.PRG => PRNASO(2766)

Called from: ATENDATE.PRG => (b)ATENDATE(118)

Called from: BTNBMP.PRG => TBTNBMP:CLICK(0)

.........

FUNCTION PrnASO()

LOCAL nTam, nLen, nTamPag, nTamRel, nLin, oFont,;

oPrn, oRad, bBloco

PRINT oPrn NAME "Atestado de Saude Ocupacional" RPREVIEW

nPag := 0

nTam := 36

nTamRel := 85

nTamPag := 60

nTipo := 1

DO WHILE .t.

DEFINE FONT oFont NAME "ARIAL" SIZE nTam,-12 OF oPrn

oPrn:SetFont(oFont)

nLen := oPrn:GetTextWidht("B",oPrn:oFont)

IF oPrn:nHorzRes()/nLen < nTamRel

nTam-= 0.05

oFont:End()

ELSE

EXIT

ENDIF

ENDDO

.............

OZIEL LOPES

FW 22c - Clipper 5.3b - Workshop 4.0

FWH 6.12 Free - xHarbour 0.99.71 Simplex - BCC55 - Pelles C - xDev.

Editado por - OZIEL on 08/07/2011 10:36:26

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...