Select the product you need help with
PRB: SHBrowseForFolder() Fails When Entering an Invalid Folder NameArticle ID: 224342 - View products that this article applies to. This article was previously published under Q224342 On This PageSYMPTOMS
When a folder name is typed into the optional edit control in the Browse Folders dialog box and OK is clicked, the SHBrowseForFolder() function returns NULL and the pszDisplayName buffer is not set.
CAUSE
The SHBrowseForFolder() function returns NULL if an invalid folder name is typed into the optional edit control.
RESOLUTION
To allow only a valid folder to be returned from the SHBrowseForFolder() function, use an application-defined callback function and the BIF_VALIDATE flag.
STATUS
This behavior is by design.
MORE INFORMATIONSteps to Reproduce BehaviorThe following Win32 application demonstrates how to use the BrowseCallbackProc() function to validate a folder name that is typed into the optional edit box in a Browse Folder dialog box.To demonstrate the problem that occurs when an invalid folder name is entered, remove the comment characters from the #define SHOW_PROBLEM line: PropertiesArticle ID: 224342 - Last Review: July 11, 2005 - Revision: 1.2
|


Back to the top








