+ Reply to Thread
Results 1 to 3 of 3

Thread: How to open explorer with specified file as selected?

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    46

    How to open explorer with specified file as selected?

    I am in need to open a explorer instance with the specified file selected.

    How to do this?

  2. #2
    Use SHOpenFolderAndSelectItems API.

    Example:

    Code:
    void OpenExplorer(TCHAR *pszFileName)
    {
        ITEMIDLIST *pIDL = ILCreateFromPath(pszFileName) ;
        if(NULL != pIDL)
    	{
            SHOpenFolderAndSelectItems(pIDL, 0, 0, 0) ;
            ILFree(pIDL) ;
        }
    }

  3. #3
    Junior Member
    Join Date
    Apr 2012
    Posts
    46
    Thank You.

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts