Results 1 to 5 of 5

Thread: How to display unicode string in ThinBasic controls

  1. #1
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    120
    Rep Power
    19

    How to display unicode string in ThinBasic controls

    Hi all,
    I am practicing some ui scripts. I can easily display unicode strings with MsgBoxW function. But I am not able to display unicode text in a Button created by this code.
    Control Add Button, hDlg, %bClose, "മലയാളം", %MAIN_WIDTH-105, %MAIN_HEIGHT-30, 100, 25, Call
    
    When running, the button displays some weird signs. How to fix this ?

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,090
    Blog Entries
    5
    Rep Power
    727
    Hi,

    thanks a lot for your question.

    I don't think you do anything wrong - thinBASIC is sadly not 100% ready for unicode. It is quite complex topic and more we dive into it, more we learn, but also bigger the task appears.

    It can take significant amount of time before unicode works in all the expected cases in thinBasic, my apologies.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    120
    Rep Power
    19
    @Petr,
    Thanks for the reply. I am planning to create my own gui library in thinBasic.
    All i need is a complete list of data types for each win api data type. So far, i 've learned that i can use "Long" data type for LPCSTR.
    Last edited by kcvinu; 02-04-2021 at 21:26.

  4. #4
    thinBasic MVPs ReneMiner's Avatar
    Join Date
    Oct 2012
    Location
    Germany
    Age
    51
    Posts
    1,444
    Blog Entries
    2
    Rep Power
    160
    Quote Originally Posted by kcvinu View Post
    @Petr,
    Thanks for the reply. I am planning to create my own gui library in thinBasic.
    All i need is a complete list of data types for each win api data type. So far, i 've learned that i can use "Long" data type for LPCSTR.

    then you might have a use for this: (i fear the site is not much longer available) so i saved it on my pc....
    click dah link


    Converting C declarations to visual basic


    just found its still there. hurry before they drop it out
    running thinBasic in HP Pavillon Desktop 590 a0xxx 8GB Ram AMD A6-9225 Radeon R4 5Compute Cores 2C+3G @2.6GHz

    OS: Windows 11 Enterprise x64 Build 22065 (21H2 pre-release)
    (says the systeminfo. anything else says it were Windows 10 - more or less insider - a lot of the system settings do not function - i could imagine it will not send feedback to microsoft since it always says i need a new app to open that feedback-hub-link. But hey: thinbasic runs well )

  5. #5
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    120
    Rep Power
    19
    @ReneMiner,
    Thanks. MSDN changes links frequently. MSDN links are often found in many different forums like C Board. Clicking on them will get you nowhere.
    Currently, I am struck with "IDC_ARROW MAKEINTRESOURCE(32512)".
    And this is MAKEINTRESOURCE - "MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i))))"
    How to translate this into thinbasic ?
    Last edited by kcvinu; 03-04-2021 at 02:55.

Similar Threads

  1. #Resource controls recognized at runtime by thinBasic
    By DirectuX in forum UI (User Interface)
    Replies: 6
    Last Post: 07-01-2020, 23:29
  2. Fast string handling in thinBasic 1.10.5
    By ErosOlmi in forum Do you know ...
    Replies: 0
    Last Post: 15-10-2018, 22:45
  3. Unicode text is not appearing correctly in controls.
    By kcvinu in forum thinBasic General
    Replies: 4
    Last Post: 18-07-2017, 09:45
  4. Replies: 6
    Last Post: 15-03-2014, 21:32
  5. Proposed Wide String (Unicode) support in OxygenBasic
    By Charles Pegge in forum O2h Compiler
    Replies: 2
    Last Post: 27-02-2011, 04:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •