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
    121
    Rep Power
    21

    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,128
    Rep Power
    732
    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
    121
    Rep Power
    21
    @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
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,525
    Rep Power
    170
    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
    I think there are missing some Forum-sections as beta-testing and support

  5. #5
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    121
    Rep Power
    21
    @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

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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