Our app allows multiple files to be selected in a file selection dialog which is shown via the GetOpenFileName function (this question also applies to folks using CFileDialog, etc...)
There appears to be a limit to the number of characters that can be typed into the filename field (259 seems to be the magic number - not sure why).
We have tried changing the following members of the OPENFILENAME structure:
lpstrFile - point to our own buffer, sized at 4K bytes nMaxFile - set to the size of lpstrFile (we are compiling ANSI, so this is effectively 4000
But these values appear to not increase the input width of the filename field in the dialog.
I am going to experiment with sending a EM_SETLIMITTEXT message to the control, but wanted to know if anyone else has a solution.
EDIT - solved this myself: solution I can't accept out my own answer, but here it is for posterity. If anyone else has a better solution, please post it - or feel free to mod up my solution so future searchers will find it at the top.