Using special characters

Using special characters

Postby driessen » Fri Feb 07, 2020 4:47 pm

Hello,
I want to use special characters to draw rectangles.
For instance :
Alt-186 results into ║
Alt-201 results into ╔
Alt-202 results into ╩
Alt-205 results into ═
...

You can use Alt-179 until Alt-209 to draw all kinds of rectangles.

If I use it in my application, I got some signs like "+" or "è", etc.

Anyone any idea how to use these characters?

Thanks a lot for any help.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Using special characters

Postby karinha » Fri Feb 07, 2020 5:12 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7811
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Using special characters

Postby driessen » Fri Feb 07, 2020 5:33 pm

Thanks, but unfortunately it is not working.

I use this code :
Code: Select all  Expand view
SPOOLLINE("╔" + REPLICATE("═",75) + "╗",oMarge)
If I save my PRG-file, it results into
Code: Select all  Expand view
SPOOLLINE("+" + REPLICATE("-",75) + "+",oMarge)

And I don't understand why.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Using special characters

Postby karinha » Fri Feb 07, 2020 5:44 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7811
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Using special characters

Postby driessen » Fri Feb 07, 2020 5:56 pm

Thanks a lot once again.

I already tried using the CHR()-function.
But the results is just the same.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Using special characters

Postby karinha » Fri Feb 07, 2020 7:24 pm

Very strange.

Code: Select all  Expand view

// \samples\DRIESSEN.PRG

#include "FiveWin.ch"

FUNCTION Main()

   LOCAL oPrn, oFont
   LOCAL nRowStep, nColStep
   LOCAL nRow := 0, nCol := 0, n, m

   PRINT oPrn NAME "Testing the CHR in printer" PREVIEW

   DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 0, - 12 OF oPrn

   nRowStep = oPrn:nVertRes() / 20
   nColStep = oPrn:nHorzRes() / 15

   PAGE

   oPrn:SayBitmap( 1, 1, "..\bitmaps\fivewin.bmp" )

   FOR n = 1 TO 20  // rows

      nCol = 0

      oPrn:Say( nRow, nCol, Str( n, 2 ), oFont )

      nCol += nColStep

      FOR m = 1 TO 15


         // oPrn:Say( nRow, nCol, CHR(174), oFont )  // yes
         // oPrn:Say( nRow, nCol, CHR(184), oFont )  // yes
         // oPrn:Say( nRow, nCol, CHR(190), oFont )  // yes
         // oPrn:Say( nRow, nCol, CHR(191), oFont )  // yes

         oPrn:Say( nRow, nCol, CHR(172), oFont )  // yes

         // oPrn:Say( nRow, nCol, CHR(212), oFont )  // no

         nCol += nColStep

      NEXT

      nRow += nRowStep

   NEXT

   oPrn:Line( 0, 0, nRow, nCol )

   ENDPAGE

   ENDPRINT

   oFont:End()

RETURN nil
 


Regards.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7811
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Using special characters

Postby Cgallegoa » Fri Feb 07, 2020 8:39 pm

I think you should use AnsiToOem(). This is because the editor you use is in ANSI or Unicode, and the characters you want to write are CP850.
Regards
Saludos,

Carlos Gallego

*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Cgallegoa
 
Posts: 492
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 68 guests