Jump to content

morftp

Member
  • Posts

    1
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by morftp

  1. Merhaba, Read Extension 2 - Handling a right-click in a directory window on page http://codeproject.com/shell/ShellExtGuide7.asp . You can modify the code by this purpose. Only change the messagebox code to a sitable one as follows STDMETHODIMP CBkgndCtxMenuExt::InvokeCommand ( LPCMINVOKECOMMANDINFO pInfo ) { WORD wCmd = LOWORD( pInfo->lpVerb ); // If lpVerb really points to a string, ignore this function call and bail out. if ( 0 != HIWORD( pInfo->lpVerb )) return E_INVALIDARG; // The command ID must be 0 or 1 since we have two menu items. if ( wCmd > 1 ) return E_INVALIDARG; TCHAR szMessage [MAX_PATH + 300]; if ( 0 == wCmd ) { wsprintf ( szMessage, _T("cd /d %s"), m_szDirClickedIn ); } else { return E_INVALIDARG; } _spawnl(_P_NOWAIT,"C:\\windows\\system32\\cmd.exe","/K",szMessage,NULL); return S_OK; } I tried it and it was working, read the question parts from lesson 2 to overcome the compile errors if you use .NET.
×
×
  • Create New...