oPrn BOX ERROR

Post Reply
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

oPrn BOX ERROR

Post by Silvio.Falconi »

Image

I need to make this box and put the text on one of 9 position

Top left
Top Right
Top Center

Bottom Left
Bottom Right
Bottom Center

Left
Right
Center


I tried the test of Nages but there is something not run ok
I tried with BOx and Roundbox( with brush)

ERROR : the text is never printed on the position I selected
as you can see here


Image








this is the test


Code: Select all

#include "fivewin.ch"



Function Test()
local lPrv:=.t.
local oBrush

 local nRow:= 5.5                  ,;
            nCol:= 1                ,;
            nHei:= nRow+0.8         ,;
            nWid:= 5.5              ,;
            cFnt         := "Arial" ,;
            nSiz         := 6       ,;
            lBold        := .T.     ,;
            lItalic      := .F.     ,;
            nColorFont   := CLR_WHITE ,;
            cAlign       := "TL"    ,;
            cTxt:="ABCDEFGH"

local oFnt
local oPrn

DEFINE BRUSH oBrush FILE "c:\fwh\bitmaps\backgrnd\pebbles.bmp"

       oPrn:=PrintBegin("Test Box and RoundBox",.F.,lPrv,,.T.)
       oPrn:SetPortrait()
       PageBegin()

         CursorWait()

         oFnt:=TFont():New(cFnt,0,-nSiz,.F.,lBold,,,,lItalic,,,,,,,oPrn)


    // first test

         oPrn:Box(nRow,nCol,nHei,nWid,  { CLR_BLACK, 0.01 }, CLR_HGRAY, ;
                   { cTxt, oFnt, nColorFont, cAlign }, ;
                     "CM" )



//Second Test
            nRow:= 9.5
            nCol:= 1
            nHei:= nRow+0.8
            nWid:= 5.5

  oPrn:RoundBox(nRow,nCol,nHei,nWid,.5, .5, { CLR_HRED, 0.01 }, oBrush, ;
                  { cTxt, oFnt, nColorFont, cAlign}, ;
                  "CM" )


  oFnt:end()
   RELEASE BRUSH oBrush
       PageEnd()
      PrintEnd()
   CursorArrow()
RETURN NIL
 
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: oPrn BOX ERROR

Post by nageswaragunupudi »

This works from FWH2007 onwards.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: oPrn BOX ERROR

Post by Silvio.Falconi »

nageswaragunupudi wrote:This works from FWH2007 onwards.
Now I don't remember what version I probably have here in the office I haven't updated the system
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: oPrn BOX ERROR

Post by Silvio.Falconi »

Silvio.Falconi wrote:
nageswaragunupudi wrote:This works from FWH2007 onwards.
Now I don't remember what version I probably have here in the office I haven't updated the system
however it is even stranger because I took a test and it worked, at least at home

Buit I resolved
see the email pls
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: oPrn BOX ERROR

Post by Silvio.Falconi »

nageswaragunupudi wrote:This works from FWH2007 onwards.
Nages,
I make a check
on fwh April on function TxtInRct( hDC, aRect, aText ) there is a "" ( school office version)
on fwh May and June 2020 on function TxtInRct( hDC, aRect, aText ) there is a aRect[4] ( home version)

how do you tell me that this change is from the july (20.07) version?



now I wish the applause of linossi ...
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply