ShellExecute
Performs an operation on a specified file. HINSTANCE ShellExecute(
    HWND hwnd, 
    LPCTSTR lpOperation,
    LPCTSTR lpFile, 
    LPCTSTR lpParameters, 
    LPCTSTR lpDirectory,
    INT nShowCmd
);

解决方案 »

  1.   

    HINSTANCE ShellExecute(
        HWND hwnd, 
        LPCTSTR lpVerb,
        LPCTSTR lpFile, 
        LPCTSTR lpParameters, 
        LPCTSTR lpDirectory,
        INT nShowCmd
    );This method allows you to execute any commands in a folder's context menu or stored in the registry. To open a folder, use either of the following calls: ShellExecute(handle, NULL, path_to_folder, NULL, NULL, SW_SHOWNORMAL);or ShellExecute(handle, "open", path_to_folder, NULL, NULL, SW_SHOWNORMAL);To explore a folder, use: ShellExecute(handle, "explore", path_to_folder, NULL, NULL, SW_SHOWNORMAL);To launch the shell's Find utility for a directory, use:ShellExecute(handle, "find", path_to_folder, NULL, NULL, 0);If lpOperation is NULL, the function opens the file specified by lpFile. If lpOperation is "open" or "explore", the function will attempt to open or explore the folder. With multiple monitors, if you specify the window handle and set lpOperation to "Properties", any windows created by ShellExecute may not appear in the correct position. To obtain information about the application that is launched as a result of calling 
      

  2.   

    Anyway, thanx you very much !
      

  3.   

    HINSTANCE ShellExecute(
        HWND hwnd, 
        LPCTSTR lpOperation,
        LPCTSTR lpFile, 
        LPCTSTR lpParameters, 
        LPCTSTR lpDirectory,
        INT nShowCmd
    );
    hwnd 
    Handle to a parent window. This window receives any message boxes that an application produces, such as error reporting. 
    lpVerb 
    A string, referred to as a verb, that specifies the action to be performed. The set of available verbs depends on the particular file or folder. Generally, the actions available from an object's shortcut menu are available verbs. For more information about verbs and their availability, see Object Verbs. See Extending Shortcut Menus for further discussion of shortcut menus. The following verbs are commonly used: 
    lpFile 
    Address of a null-terminated string that specifies the file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully-qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. 
    lpParameters 
    If the lpFile parameter specifies an executable file, lpParameters is an address to a null-terminated string that specifies the parameters to be passed to the application.The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL. 
    lpDirectory 
    Address of a null-terminated string that specifies the default directory. 
    nShowCmd 
    Flags that specify how an application is to be displayed when it is opened. If lpFile specifies a document file, the flag is simply passed to the associated application. It is up to the application to decide how to handle it.
      

  4.   

    ShellExecute(0, 
             "open", 
     "D:\\HEROSOFT\\HERO2001\\Mmxado.exe",
     "c:\\偷天换日.dat", 
     "c:\\", 
     SW_SHOWNORMAL);