To start explorer with 1 file selected, I successfully use 'explorer /select, <cFile>'.
How to start it with multiple files selected instead? I read here we can use SHOpenFolderAndSelectItems but how to call it from FWH?
TIA
#include "FiveWin.ch"
function Main()
SHOpenFolderAndSelectItems()
return nil
#pragma BEGINDUMP
#include <windows.h>
#include <shlobj.h>
#include <hbapi.h>
HB_FUNC( SHOPENFOLDERANDSELECTITEMS )
{
//Directory to open
ITEMIDLIST *dir = ILCreateFromPath( "C:\\" );
//Items in directory to select
ITEMIDLIST * item1 = ILCreateFromPath( "C:\\Program Files\\" );
ITEMIDLIST * item2 = ILCreateFromPath( "C:\\Windows\\" );
ITEMIDLIST * list[ 3 ];
UINT count = 2;
list[ 0 ] = item1;
list[ 1 ] = item2;
list[ 2 ] = 0;
//Perform selection
SHOpenFolderAndSelectItems( dir, count, ( PCUITEMID_CHILD_ARRAY ) list, 0 );
//Free resources
ILFree( dir );
ILFree( item1 );
ILFree( item2 );
}
#pragma ENDDUMP
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 117 guests