'text
'   设置指定控件的文本
'   hWndControl: 控件的句柄 (例如  HWND_FORM1_COMMAND1)
'   TheText:     The actual text  
Sub FF_Control_SetText( ByVal hWndControl As HWND, _
                        ByRef TheText As CWSTR  )

    '检查窗口句柄是否有效
    If IsWindow(hWndControl) Then  
       
       ' Set the control's text
       SetWindowTextW hWndControl, TheText.vptr 
    
    End If
End Sub

