DoAddToFavDlg function

Displays the standard Windows Internet Explorer Add Favorite dialog box.

Syntax

BOOL DoAddToFavDlg(
  _In_ HWND         hwnd,
  _In_ __wchar_t    *pszInitDir,
  _In_ UINT         cchInitDir,
  _In_ __wchar_t    *pszFile,
  _In_ UINT         cchInitDir,
  _In_ LPITEMIDLIST pidlBrowse
);

Parameters

  • hwnd [in]
    A handle to the application window.

  • pszInitDir [in]
    A string that contains the initial directory for shortcuts. Set to selected directory upon return.

  • cchInitDir [in]
    An unsigned integer that specifies the length of pszInitDir buffer.

  • pszFile [in]
    A string that contains the initial (default) name for shortcut file. Upon return, set to selected shortcut filename, including extension.

  • cchInitDir [in]
    An unsigned integer that specifies the length of pszFile buffer.

  • pidlBrowse [in]
    Unused. Set to NULL.

Return value

Returns one of the following values:

Return code Description
TRUE

Directory and file name were selected by user.

FALSE

Dialog box canceled by user, or an error occurred.

 

Remarks

This function displays the Add Favorite dialog box, but does not actually create the shortcut file. The user can create new subfolders while the dialog box is in use.

Allow for at least MAX_PATH characters as initial buffer lengths. When returned, the total length of pszInitDir + "\" + pszFile will not exceed MAX_PATH.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

N/A

DLL

Shdocvw.dll