EnableExplicit

Procedure.s LoadResEx_Menu_GetCaption(hMenu.i, MenuID.i)
  Define.s xResult
  
  If hMenu
    MenuID = GetMenuString_(hMenu, MenuID, *ptrTemp, #ptrTempSizeXAW, 0)
    If MenuID
      xResult = PeekS(*ptrTemp, MenuID)
      EndIf
    EndIf
  ProcedureReturn xResult
  EndProcedure

; IDE Options = PureBasic 5.21 LTS (Windows - x86)
; CursorPosition = 13
; Folding = -
; EnableUnicode
; EnableXP