September 13th, 2013, 08:07 AM
CFileDialog doesn't display the file name correctly
I haven't seen this before but on Windows 7 Home Professional and VC 2012 in one particular app, a CFileDialog displays only the rightmost 11 characters plus the extension of the default file name. The rest of the name is there and you can scroll left in the file name edit to display it all, but initially the text is shifted left so it doesn't all display. Hope that makes sense.
This is the code.
strFileName can contain anything and it will do it. Even a string literal will do it.
CFileDialog dlg(TRUE, "csv", strFileName, OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY, "Comma Seperated Values Files (*.csv)|*.csv|All Files (*.*)|*.*||");
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.