Our application allows you to select multiple files in the file selection dialog box, which is displayed through the GetOpenFileName function (this question also applies to people using CFileDialog, etc.)
It seems that the number of characters that can be entered in the file name field (the limit of 259 seems to be a magic number - it is not clear why).
We tried to modify the following elements of the OPENFILENAME structure:
lpstrFile - specify our own 4 kb buffer nMaxFile - set the size of lpstrFile (we compile ANSI, so this is actually 4000
But these values ββdo not increase the input width of the file name field in the dialog box.
I'm going to experiment with sending EM_SETLIMITTEXT messages to the control, but would like to know if anyone has a solution.
EDIT - I decided it myself: a decision I canβt take my own answer, but here it is for posterity. If someone else has a better solution, send it or feel free to modify my solution so that future search engines find it at the top.
source share