Share via


Functions Getting List and Combo Box Contents

The Win32 API contains two new functions, shown in the following table, that provide an improved means of extracting list and combo box contents. In each case, you use the portable version of the function to specify a buffer size for a string that receives the information.

Windows 3.x function Portable version of the function
DlgDirSelect DlgDirSelectEx
DlgDirSelectComboBox DlgDirSelectComboBoxEx

For example, Windows 3.x code might contain the following function call:

DlgDirSelect( hDlg, lpString, nIDListBox );

This line of code should be replaced by the following call to DlgDirSelectEx:

DlgDirSelectEx( hDlg, lpString, strlen(lpString), nIDListBox );