Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Windows-CPP-und-C ► ««« »»»

ShellExecuteEx function, search in LPCITEMIDLIST!


The solution is very easy to start with the ShellExecuteEx function, search for File in in LPCITEMIDLIST!




The provided code defines a function called SearchCmdLPCITEMIDLIST, which is used to execute a Windows search query based on an LPCITEMIDLIST (a list of directory/file IDs). Here is an explanation of the code:


 
 
BOOL SearchCmdLPCITEMIDLIST(LPCITEMIDLIST item, HWND m_hWnd = NULL)
{
    // Create a SHELLEXECUTEINFO structure and initialize it with zeros.
    SHELLEXECUTEINFO sei;
    ZeroMemory(&sei, sizeof(sei));
    sei.cbSize = sizeof(sei);
    // Use SEE_MASK_IDLIST to pass an ID-list object (item).
    sei.fMask = SEE_MASK_IDLIST;
    // The provided ID list.
    sei.lpIDList = (LPITEMIDLIST)(LPCITEMIDLIST)item;
    // Pointer to the document class, not set here.
    sei.lpClass = NULL;
    // The handle of the main window that initiates the search.
    sei.hwnd = m_hWnd;
    // Display behavior (SW_SHOWNORMAL displays a normal window).
    sei.nShow = SW_SHOWNORMAL;
    // The shell verb, "find," initiates the Windows search.
    sei.lpVerb = TEXT("find");
 
    // Use ShellExecuteEx to execute the search.
    return ShellExecuteEx(&sei);
}
 

This function uses the ShellExecuteEx function from the Windows API to initiate a Windows search using the provided LPCITEMIDLIST object. The LPCITEMIDLIST object represents a list of directory or file IDs used as search parameters. The main window initiating the search can be optionally set through the m_hWnd parameter.

The SHELLEXECUTEINFO structure is used to configure the search request, including the search behavior and the shell verb (here, "find" for Windows search). If the search is successfully initiated, the function returns TRUE; otherwise, it returns FALSE.

Please note that using this function triggers the Windows search with the provided parameters, but the search results are typically displayed in a separate search window or Explorer window.
(Image-1) ShellExecuteEx function, search in LPCITEMIDLIST!
ShellExecuteEx function, search in LPCITEMIDLIST!

-
▲ Back to the top ▲




FAQ 7: Updated on: 1 November 2023 14:02 Windows
Windows-CPP-und-C

ListView_GetItemImage, ListView_GetISubtemImage!


The solution is very simple to find out in ListView Get Item Image and List View GetI Subtem Image ////////////////////////////////////////////////// //////////////////////
Windows-CPP-und-C

Listview set thumbnails size!


You can quickly set the size of the thumbnails in the list view, and there are no restrictions on the size   This example demonstrates using the CreateNewImageList
Windows-CPP-und-C

Reserve virtual memory C++, Windows?


The solution is very simple if you want to reserve virtual memory with C++ under Windows  Contents: 1. The program command to reserve virtual memory
Windows-CPP-und-C

What is the difference between float and double?


There are key differences between float and double, even though both are floating point numbers Contents: 1. The difference between float and double
Windows-CPP-und-C

Difference between IExtractImage2 and IExtractImage?


You want to implement IExtractImage or IExtractImage2 and register it as a Windows Shell extension Simply implement IExtractImage2, this is required to
Windows-CPP-und-C

Defender slows down the development of applications, programs and APPs!


It is in fact the case that the Defender greatly hinders the development of applications, programs and APPs, slows it down and is no fun to work with  
Windows-CPP-und-C

C++ query whether a string or char ends with a specific character?


The Solution is Simple: Checking if a String or Character Array Ends with a Certain Substring in C++ The provided C++ functions are designed to perform operations

»»

  My question is not there in the FAQ
Asked questions on this answer:
Keywords: windows, shellexecuteex, function, search, lpcitemidlist, solution, very, easy, start, with, file, provided, code, defines, called, searchcmdlpcitemidlist, Questions, Answers, Software




  

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks
  + Security

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + OpenCloseDriveEject
  + ColorConsole
  + IsMyLcdOK
  + DesktopDigitalClock
  + ClassicDesktopClock
  + PreventTurnOff
  + QuickMemoryTestOK
  + IsMyHdOK
  + AutoPowerOptionsOK
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Settings | Windows 10 | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2025 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu


► Backup and restoring a specific registry entries via regedit.exe! ◄
► Difference Individual photos and images from folders? ◄
► Difference Between Laptop and Notebook? ◄
► What is the difference between keyboard numbers and numeric keys? ◄


This website does not store personal data. However, third-party providers are used to display ads,
which are managed by Google and comply with the IAB Transparency and Consent Framework (IAB-TCF).
The CMP ID is 300 and can be individually customized at the bottom of the page.
more Infos & Privacy Policy

....