The open dialog box code: the code red is to get the value of the code
If GetOpenFileNameA (OpenFileName)=1 Then//press ok button
the PathName=LeftA (String (OpenFileName lpstrFile, "address"), OpenFileName. NFileOffSet - 1)
Li_Start=0
Do
Ls_Token=String (OpenFileName. LpstrFile + OpenFileName. NFileOffSet + li_Start, "address")
If ls_Token & lt;> "" Then
FileCount++
Files/FileCount=ls_Token
End the If
Li_Start +=Len (ls_Token) + 1
Loop Until ls_Token=""
FileName=Files [1]
Else
CodePudding user response:
To test whether the garbled OpenFileName lpstrFile, "address"),Estimation is pb11 character set issues, they should have the answer you want
CodePudding user response:
leftCodePudding user response:
OpenFileName lpstrFile, "address"), the content is garbled, get on the Internet, I searched for a long time, but could not find a solutionCodePudding user response:
Left as well as get garbled, here I use leftA the file path, because I file name, file type filter it has Chinese charactersCodePudding user response:
PB itself with common dialog box!Do you have a good look at the common user objects
CodePudding user response:
Now is to upgrade our company system, made of pb65 before, built a public user object, solve the problem of the open dialog box, there is a problem now is that the user object, if use pb itself dialog box, change the momentum is very bigCodePudding user response:
Use this statement to tryThe Function long GetOpenFileName (ref OPENFILENAME pOpenfilename) LIBRARY "comdlg32. DLL" ALIAS FOR "GetOpenFileNameA"