[python-win32] CreateFileDialog insufficient buffer size

Mark Hammond mhammond@skippinet.com.au
Mon, 13 Jan 2003 10:09:05 +1100


> The only thing I've been able to so far is to conclude that
> DoModal() returns the value 2 when the buffer is insufficient
> so at least it is possible to detect in the application. But
> it would be great if the win32ui automatically reallocated
> the buffer to the right size as described in
> http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q131462

I would welcome a patch.

> On a side issue:
> 
> Is it possible to use the CreateFileDialog to get a Folder selected
> by the user. That is, can I pass a filter value into 
> CreateFileDialog()
> so that the user is only able to specify his/her folder of interest
> and not a particular file?

Use win32com.shell.shell.SHBrowseForFolder()

Mark.