NTK and The NTK Project
are properties of Jn Dechereux
Home | Documentation | FAQ.

Vanilla 1.1.8 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorthanos
    • CommentTimeDec 28th 2022 edited
     
    Hello to all.
    Just found the project and registered to the forum.
    Congratulations to the developers!
    The amazing Clipper is alive and modern :)
    I run the GuiForm.exe in C:\WNTK4HRB\NTKRAD\DOS2WIN directory and tried to write greek characters in the fields.
    In the first field i type:
    ΔΟΚΙΜΗ-TEST
    The field did not display the greek characters.
    With the NTK_AnsiToOem(mName) function i took the entered characters correctly.
    Is there any way to display the non latin characters in the field?
    Best regards,

    Thanos

    P.S. As I saw the alert for the free version does not display correctly the extended characters as you can see in the attachment.
    Please note that the language for non unicode language in my system is Greek.
    •  
      CommentAuthorAbbougaga
    • CommentTimeDec 30th 2022 edited
     
    Hi Thanos,

    Welcome on board!

    >ΔΟΚΙΜΗ-TEST
    >The field did not display the greek characters.
    >With the NTK_AnsiToOem(mName) function i took the entered characters correctly.
    >Is there any way to display the non latin characters in the field?

    I'm not an expert in non latin charsets but according to my own experience with Windows, when you experiment displaying chars issues it is often due to usage of a bad font, wrong charset or both.

    so after giving a quick try to GUIFORM.PRG/EXE - just wondering if the OEM_FIXED_FONT set as default font for SAY/GET instructions
    ...
    // -- Define default font for SAYs and GETs objects
    SET DEFAULT SAY FONT TO NTK_GetStockObject(OEM_FIXED_FONT)
    ...
    may not enter in conflict or simply does not contain any greek chars at all?

    What if you replace the above line by one of the following:
    - SET DEFAULT SAY FONT TO NTK_GetStockObject(ANSI_FIXED_FONT)
    - SET DEFAULT SAY FONT TO NTK_GetStockObject(ANSI_VAR_FONT)
    - SET DEFAULT SAY FONT TO NTK_GetStockObject(SYSTEM_FONT)

    Or even, if you don't use it at all / put it in comments?
    (As far as i remember, when this command is not specified, NTKRAD use the COURRIER NEW as default font for say/get)

    Cheers,
    Ab
    •  
      CommentAuthorthanos
    • CommentTimeDec 31st 2022 edited
     
    Hi Abbougaga and thank you for your response!
    I tried what you suggest and the Guiform displays everything correctly.
    It is working with any of the following fonts:
    ANSI_FIXED_FONT, ANSI_VAR_FONT, SYSTEM_FONT.
    It is also working when the line //SET DEFAULT SAY FONT TO NTK_GetStockObject(OEM_FIXED_FONT) is commented as you suggest.
    I also tried something "desperate. I gave a value to OEM_FIXED_FONT.
    So, with the follwing lines the characters displayed correctly:
    #define OEM_FIXED_FONT 12
    SET DEFAULT SAY FONT TO NTK_GetStockObject(OEM_FIXED_FONT)
    I suppose the due to incorrect OEM_FIXED_FONT value the compiler ignores the SET DEFAULT SAY FONT TO NTK_GetStockObject(OEM_FIXED_FONT) command.
    Thank you very much for the solution.
    I wish you a Happy New Year!