Microsoft KB Archive/85174

-

{| The information in this article applies to:
 * width="100%"|
 * Microsoft Windows Software Development Kit (SDK) for Windows version 3.1

SYMPTOMS
If an application uses the IDABORT value to end the GetOpenFileName or GetSaveFileName dialog boxex provided by the common dialog box library (COMMDLG), the application does not receive the proper value.

RESOLUTION
Set the lCustData member of the OPENFILENAME structure to the desired return value. If lCustData is used to transfer some other data, use a global variable to pass the return value.

MORE INFORMATION
The IDABORT value is documented on page 157 of the &quot;Microsoft Windows Software Development Kit: Programmer's Reference Volume 1: Overview&quot; manual as follows:

When a hook function posts the IDABORT value, the common dialog box function returns the value contained in the low word of the lParam parameter. For example, if the hook function for GetOpenFileName called the PostMessage function with (LONG) 100 as the last parameter, GetOpenFileName would return 100. This information is not correct for the GetOpenFileName and GetSaveFileName dialog boxes mentioned above. The information is correct for all other modal dialog boxes provided by the common dialog boxes DLL. Specifying IDOK in the low-order word of lParam causes GetOpenFileName and GetSaveFileName to return TRUE. Any other value causes these functions to return FALSE.
 * }

-

Last reviewed: March 2, 1995

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.