quote:
Originally posted by J-Thread
Public Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Long
change that to
code:
Public Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageW" (ByVal lpString As String) As Long
or better, change
quote:
Originally posted by J-Thread
Public Function Sendmsg(strMessage As String) As Boolean
nMsg = RegisterWindowMessage(strMessage)
Sendmsg = PostMessage(HWND_BROADCAST, nMsg, 0, 0)
End Function
to
code:
Public Function Sendmsg(strMessage As String) As Boolean
nMsg = RegisterWindowMessage(StrConv(strMessage, vbFromUnicode))
Sendmsg = PostMessage(HWND_BROADCAST, nMsg, 0, 0)
End Function
and do only 1 fo those 2 changes
quote:
Originally posted by J-Thread
The text() function is a function to display the text. The function is not totally done, after copying there has to be more, but that isn't done yet. And this is where it ends...
i don't get that dodgy function. you really don't need that function.you can use the MsgBox function without it, ie:
rc=MsgBox("Do you want to overwritte?", vbYesNo + .... etc...
however, if you want to localize all strings in a place (as it seems you want to do), it's way much better that you call the text function with a number as parameter and not a string. It'd execute very much faster. Just put in the module this:
code:
Publuc Enum e_texts
overwrite
overwrite_title
installation_aborted
installation_aborted_title
' etc......
' etc......
' etc......
End Enum
and call the function text like this:
code:
text(overwrite)
' or
text(overwrite_title)
and declare that function like this:
code:
Public Function text(ByVal what as e_texts) as String
Select Case what
Case overwrite
text = "Do you want to overwrite?"
Case overwrite_title
text = "Confirm overwrite"
' etc....
' etc....
' etc....
End Select
End Function