Announcement

Collapse
No announcement yet.

Unicode DDT

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unicode DDT

    I have seen the beta code:

    http://www.powerbasic.com/support/pb...unicode+msgbox

    I use XP and PB 8.04.

    Only the Msgbox works on my system with unicode-strings. The dialogue window is not displayed.

    I would like to widen my programs with the Russian language.

    #2
    DDT support - AFAIK - is "ANSI only".

    If you would like Unicode versions of DDT syntax supported in the compiler, you should send a New Feature Suggestion to [email protected]

    If you want "Unicode Now", you can use the Unicode versions of the window creation functions CreateWindowEx, DialogBox and CreateDialog along with the unicode versions of SendMessage, PostMessage and any other functions you need to operate on your screens.

    Doable? Very.

    Quick and Easy? Well, depends. If you put a %UNICODE equate into your Win32API.Inc file, you would have something like...

    Code:
    #IF %DEF(%UNICODE) 
    DECLARE FUNCTION SendMessage LIB "USER32.DLL" ALIAS "SendMessage[B]W[/B]" _ 
        (BYVAL hWnd AS DWORD, BYVAL dwMsg AS DWORD, BYVAL wParam AS DWORD, BYVAL lParam AS LONG) AS LONG
    #ELSE
    DECLARE FUNCTION SendMessage LIB "USER32.DLL" ALIAS "SendMessage[B]A[/B]" _ 
        (BYVAL hWnd AS DWORD, BYVAL dwMsg AS DWORD, BYVAL wParam AS DWORD, BYVAL lParam AS LONG) AS LONG
    #ENDIF
    But the really tedious task will be making sure you convert both string variables and literals to Unicode when %DEF(%UNICODE) is true.


    MCM
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


      #3
      I find the PB functions better than the APIs.
      Therefore I have written everything in PB.

      Do I think a little dully? Do I have to use APIs
      really to make my program multilingual (with Russian)?

      Comment


        #4
        Do I have to use APIs [versus DDT syntax] really to make my program multilingual (with Russian)?
        Today? Yes.
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎