CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: shellexecuteex

  1. #1
    Join Date
    Dec 2007
    Posts
    17

    Question shellexecuteex

    i am using ShellExecuteEx to call the properties wizard of a zip file from a floatmenu but the program always reports errors

    when i change the file into a txt file or a bin folder, it works

    PHP Code:
    switch(LOWORD(pMsg->wParam))
            {
            case 
    IDC_FMENUPROPERTY:
                const 
    TCHARverb=_T("properties");

                if(-
    1!=index)
                {
                    
                    
    SHELLEXECUTEINFO shellExInfo;
                    
                    
    shellExInfo.cbSize=sizeof(SHELLEXECUTEINFO);
                    
    shellExInfo.fMask=NULL;
                    
    shellExInfo.hwnd=NULL;

                    
    CString fn=_T("keinnie05.zip")

                    
    shellExInfo.lpVerb=verb;
                    
    shellExInfo.lpFile=fn;            

                    
    shellExInfo.hIcon=NULL;
                    
    shellExInfo.lpParameters=NULL;
                    
    shellExInfo.lpDirectory=NULL;
                    
    shellExInfo.lpIDList=NULL;

                    
    shellExInfo.nShow=SW_SHOWNORMAL;            
                    
                    
    ShellExecuteEx(&shellExInfo);
                
                }

    Thanks for any help

  2. #2
    Join Date
    Jun 2008
    Location
    Blagoevgrad, Bulgaria
    Posts
    17

    Re: shellexecuteex

    So if you want to display file or folder's properties I don't unterstand why you declare const TCHAR verb variable. You shoud use
    Code:
    ShellExInfo.lpVerb = properties;

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured