[API]
ModifyMenuA
ModifyMenuW
GetMenuState

[CODE]
Public Sub LoadResEx_Menu_SetCaption(ByVal hMenu As Long, ByVal MenuID As Long, ByVal Caption As String, Optional ByVal NewMenuID As Long = -1&)
  Dim xLong1 As Long
    
  If NewMenuID = -1& Then NewMenuID = MenuID
    
  xLong1 = GetMenuState(hMenu, MenuID, 0&)
  If Not xLong1 = -1& Then
    If IsUnicode Then
      Call ModifyMenuW(hMenu, MenuID, xLong1, NewMenuID, StrPtr(Caption))
      Else
      Call ModifyMenuA(hMenu, MenuID, xLong1, NewMenuID, Caption)
      End If
    End If
  End Sub
