Results 1 to 2 of 2

Thread: api msgbox Buttons

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Location
    Ukraine
    Posts
    1

    Unhappy

    Hello!
    How can I put a Hebrew yes/no instead of native English characters on api msgbox Buttons?
    Thank you beforehand,
    Alfred.

  2. #2
    Guest
    Try looking into the MessageBoxEx and MessageBoxIndirect functions. Also, to use a different language, I believe you have to have it installed on your system.

    Try this example. Make a Form with a CommandButton and put the following code into your Form. (I do not have other languages installed on my system, so I'm unsure if this will work or not)

    Code:
    Private Declare Function MessageBoxEx Lib "user32" Alias "MessageBoxExA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal uType As Long, ByVal wLanguageId As Long) As Long
    Const MB_YESNO = &H4&
    Const MB_ICONEXCLAMATION = &H30&
    Const SUBLANG_NEUTRAL = &H0
    Const LANG_HEBREW = &HD
    
    Private Function MAKELANGID(ByVal usPrimaryLanguage As Integer, ByVal usSubLanguage As Integer) As Long
            MAKELANGID = (usSubLanguage * 1024) Or usPrimaryLanguage
    End Function
    
    Private Sub Command1_Click()
    
        Dim LangID
        LangID = MAKELANGID(LANG_HEBREW, SUBLANG_NEUTRAL)
        Retval = MessageBoxEx(Me.hwnd, "Hello World", "Hello", MB_YESNO Or MB_ICONEXCLAMATION, LangID)
    
    End Sub

Posting Permissions

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



Click Here to Expand Forum to Full Width