Título: [Resuelto] Chinese - Japanese
Publicado por: Miseryk en 26 Diciembre 2010, 12:08 pm
Hola a to2, una vez, como me suele pasar, encontré un código que me mostraba un mensaje (MsgBox) con Kanjis (simbolos chinos / japoneses) no me acuerdo donde está, vale oro, alguno de ustedes sabe como hacer éso? Desde ya muchas gracias.
Título: Re: [Resuelto] Chinese
Publicado por: Miseryk en 26 Diciembre 2010, 12:21 pm
Weno encontré el código, es super largo, hace controles propios, acá pongo algo muy útil. Option Explicit Private Declare Function GetModuleHandleW Lib "kernel32" (ByVal lpModuleName As Long) As Long Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long Private Declare Function GetWindowLongA Lib "user32" (ByVal hWnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetWindowLongA Lib "user32" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function SetWindowLongW Lib "user32" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function SetWindowTextW Lib "user32" (ByVal hWnd As Long, ByVal lpString As Long) As Long Private Const GWL_WNDPROC = -4 Private m_Caption As String Public Property Get CaptionW() As String CaptionW = m_Caption End Property Public Property Let CaptionW(ByRef NewValue As String) Static WndProc As Long, VBWndProc As Long m_Caption = NewValue ' get window procedures if we don't have them If WndProc = 0 Then ' the default Unicode window procedure WndProc = GetProcAddress(GetModuleHandleW(StrPtr("user32")), "DefWindowProcW") ' window procedure of this form VBWndProc = GetWindowLongA(hWnd, GWL_WNDPROC) End If ' ensure we got them If WndProc <> 0 Then ' replace form's window procedure with the default Unicode one SetWindowLongW hWnd, GWL_WNDPROC, WndProc ' change form's caption SetWindowTextW hWnd, StrPtr(m_Caption) ' restore the original window procedure SetWindowLongA hWnd, GWL_WNDPROC, VBWndProc Else ' no Unicode for us Caption = m_Caption End If End Property Private Sub Form_Load() Me.CaptionW = "UniControls sample: " & ChrW$(&H3042) & ChrW$(&H3044) & ChrW$(&H3046) & ChrW$(&H3048) & ChrW$(&H304A) End Sub
El archivo se llama UniControl2117366192008.rar, por si lo encuentrar en internet,, debe ser de Planet Source Code (Y), no sé como subirlo acá y x lo q ví, creo q no se puede. (Y)
Título: Re: [Resuelto] Chinese
Publicado por: Psyke1 en 26 Diciembre 2010, 16:52 pm
Muy interesante ;) Voy a buscar más al respecto... :)
DoEvents! :P
|