Unicode Controls & Classes for VB6 - Version 4

ctlUniMDITabs.DrawingCaptionText Event

Raised before writing the form caption on the Tab; by managing this event and changing the passed "sWindowText" string you can return Unicode captions for your forms (see the Sample 1)

Syntax
Public Event DrawingCaptionText (ByVal hWnd As Long,
ByRef sWindowText As String)
Parameters
Parameter Description
ByVal hWnd As Long The window handle
ByRef sWindowText As String The window caption
Remarks
Private Sub m_cMDITabs_DrawingCaptionText(ByVal hWnd As Long, sWindowText As String)
Dim oFrm As Form
Set oFrm = formByHwnd(hWnd)

If Not oFrm Is Nothing Then
If TypeOf oFrm Is frmEditor Then
sWindowText = oFrm.UniCaption
End If
End If
End Sub
Public Function formByHwnd(ByVal hWnd As Long) As Form
Dim frmChild As Form
For Each frmChild In Forms
If (frmChild.hWnd = hWnd) Then
Set formByHwnd = frmChild
Exit For
End If
Next
End Function