点击创建的子菜单求教,谢谢!!!模块中:
 Public Function WindowProc(ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
      
          Dim ret     As Long
          Dim menuCaption     As String
            
   If Msg = WM_COMMAND Then           ''响应其他菜单
                  ''   Get   the   menu   caption
                  menuCaption = Space$(256)
                  ret = GetMenuString(hMenu, wParam, menuCaption, Len(menuCaption), 0)
                  menuCaption = Left$(menuCaption, ret)
                  MsgBox menuCaption‘每次都正确
                  NEWMEUN = menuCaption
                                 
                  
    End If
     
    
    WindowProc = CallWindowProc(lpPrevWndProc, hWnd, Msg, wParam, lParam)
    End Function
    
里面的MsgBox menuCaption每次都正确
窗体中:
    
Private Sub Picture2_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim Pt     As POINTAPI
  Call CreateMenu(Me, App.Path & "\CA.TXT")
          GetCursorPos Pt
          If Button = 2 Then
                TrackPopupMenu hMenu, TPM_LEFTALIGN, Pt.x, Pt.y, 0, Me.hWnd, ByVal 0&
                MsgBox NEWMEUN‘总是不对
          End IfEnd SubMsgBox NEWMEUN总是不对,还请高手帮助,谢谢!!!