Results 1 to 4 of 4

Thread: put unicode chars on a button

  1. #1

    put unicode chars on a button

    while reading a thread about "Insert image in a Button" in powerbasic forum, i got an idea about using unicode characters in buttons whatever that language is hard to "unicodizing" for some programming language.
    it is by getting a picture for the word you want to put on your button, edit the picture and save it with irfanview utility to ico file, then use the example XPButton in thinbasic distribution as a template
    here is again the thinbasic official example with the russian (ico). just save the russian1.ico to the same folder as the code
    uses "UI"
    Uses "UIAdv"
    
    Begin ControlID
      %IDC_BUTTON1 
    End ControlID
    
    ' ========================================================================================
    ' Main
    ' ========================================================================================
    FUNCTION TBMAIN() as long
    
       LOCAL hDlg AS LONG
    
      DIALOG NEW 0, "XP Button Demo", 0, 0, 125, 115, %DS_CENTER OR %WS_OVERLAPPED OR %WS_THICKFRAME OR %WS_SYSMENU TO hDlg
      ' Set the icons (change the names for the ones of your own icons)
      Control Add XPBUTTON, hDlg, %IDC_BUTTON1, "", 10, 5, 105, 85, %WS_TABSTOP Or %WS_VISIBLE Or %WS_CHILD
       
      XPButton_SetImagePos   hDlg, %IDC_BUTTON1, %XPBUTTON_CENTERCENTER
      XPButton_SetIcon       hDlg, %IDC_BUTTON1, APP_SourcePath & "russian1.ico", %XPBUTTON_NORMAL
      XPButton_SetImageSize  hDlg, %IDC_BUTTON1, 128, 64, %TRUE
      
    	'XPButton_DisableTheming hDlg, %IDC_BUTTON1
    	
       DIALOG SHOW MODAL hDlg, CALL DlgProc
    
    END FUNCTION
    ' ========================================================================================
    
    ' ========================================================================================
    ' Main Dialog procedure
    ' ========================================================================================
    CALLBACK FUNCTION DlgProc() AS LONG
    
       SELECT CASE CBMSG
    
          CASE %WM_COMMAND
             SELECT CASE CBCTL
                CASE %IDCANCEL
                   IF CBCTLMSG = %BN_CLICKED THEN DIALOG END CBHNDL
                CASE %IDC_BUTTON1
                   IF CBCTLMSG = %BN_CLICKED THEN
                      MSGBOX 0, "Button clicked"
                   END IF
             END SELECT
    
       END SELECT
    
    END FUNCTION
    ' ========================================================================================
    
    the russian word in the attached ico is юникода which means unicode
    Attached Files Attached Files
    Last edited by primo; 14-08-2017 at 07:53.

  2. #2
    No Primo,

    The correct Russian translation of an isolated word "unicode" would be "юникод" rather than "юникода". The former is the noun's initial Nominative Case while the latter is its Genetive Case. We are a little cooler grammatically than Brits and Yanks.
    Last edited by mike lobanovsky; 20-08-2017 at 02:07.
    Mike
    (3.6GHz i5 Core Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, x64 Windows 7 Ultimate Sp1)

  3. #3
    Thank you mike for the info. i have reported to the google translator anonymously in the feedback section your exact sentence: (The correct Russian translation of an isolated word "unicode" would be "юникод" rather than "юникода". The former is the noun's initial Nominative Case while the latter is its Genetive Case. )
    so they should evaluate it.
    regards

  4. #4
    Thank you Primo. Let's make this world a little better.
    Mike
    (3.6GHz i5 Core Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, x64 Windows 7 Ultimate Sp1)

Similar Threads

  1. File names in a unicode world
    By harsh in forum File
    Replies: 0
    Last Post: 01-02-2017, 03:27
  2. Does ThinAir supports Unicode ?
    By kcvinu in forum thinAir General
    Replies: 19
    Last Post: 29-08-2016, 14:57
  3. console-bug? swallows/casts chars?
    By ReneMiner in forum Console
    Replies: 2
    Last Post: 30-01-2015, 15:54
  4. HELP FILE : Unicode information swapped
    By Michael Clease in forum Fixed or cleared errors in help material
    Replies: 1
    Last Post: 09-03-2011, 12:19
  5. Is this ASCII, ANSI, UNICODE or something else?
    By martin in forum thinAir General
    Replies: 12
    Last Post: 29-04-2009, 09:56

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
  •