|
Since the Idiot's Guide series has become quite large, here is an index of all the articles that gives a quick
blurb about each one, so you can quickly find the articles that interest you.
Some other dedicated folks are writing translations of the Guide. Here are the published translations:
- Alexander Shargin's Russian translation: Part
1, Part 2, Part
3, Part 4, Part
5, Part 6, Part
7, Part 8, Part
9.
- Maurice Montgenie's Win32 assembler
version.
- Gengis Dave's Italian translation.
Once at the site, click on Programmazione, then Libri. HTML and PDF versions available.
Part I - A step-by-step tutorial on writing shell extensions
![[Part 1 screen shot - 9K]](ShellExtGuideIndex/ShellExtGuideIndex1.jpg)
Part I is a simple overview of shell extensions,
and discusses how to debug them. The sample extension illustrates adding items to the context menu for text files.
Part II - A tutorial on writing a shell extension that operates on multiple files at once
![[Part 2 screen shot - 5K]](ShellExtGuideIndex/ShellExtGuideIndex2.jpg)
Part II demonstrates how to write a context
menu extension that operates on all of the selected files at once. The sample project is a utility that adds registration
and unregistration commands to the context menus for DLLs.
Part III - A tutorial on writing a shell extension that shows pop-up info for files
![[Part 3 screen shot - 6K]](ShellExtGuideIndex/ShellExtGuideIndex3.jpg)
Part III demonstrates the QueryInfo extension
that customizes the infotip for text files. It also explains how to use MFC in a shell extension.
Part IV - A tutorial on writing a shell extension that provides custom drag and drop functionality
![[Part 4 screen shot - 12K]](ShellExtGuideIndex/ShellExtGuideIndex4.jpg)
Part IV shows how to add items to the menu
displayed when the user drags and drops with the right mouse button in Explorer. The sample project is a utility
that makes hard links for files. (Note: the extension is functional only on Windows 2000, but you can still compile
and run the extension on previous versions of Windows. See the article for instructions.)
Part V - A tutorial on writing a shell extension that adds pages to the properties dialog of files
![[Part 5 screen shot - 23K]](ShellExtGuideIndex/ShellExtGuideIndex5.jpg)
Part V demonstrates how to add new pages to
Explorer's Properties dialog. The sample project adds a page on which you can edit the created, modified, and last
accessed times of files.
Part VI - A tutorial on writing a shell extension that can be used on the Send To menu
![[Part 6 screen shot - 9K]](ShellExtGuideIndex/ShellExtGuideIndex6.jpg)
Part VI discusses a drop handler extension
that gets added to the SendTo menu. The sample project is a clone of the Send To Any Folder power toy.
Part VII - A tutorial on using owner-drawn menus in a context menu shell extensions, and on making a context
menu extension that responds to a right-click in a directory background
![[Part 7 screen shot - 6K]](ShellExtGuideIndex/ShellExtGuideIndex7.gif)
Part VII tackles two topics suggested by readers:
owner-drawn menu items and the context menu for the background of directory windows. The sample project contains
two extensions: a bitmap viewer (pictured above) that puts a thumbnail of BMP files in the context menu, and a
simple extension that adds items to the context menu of directory backgrounds.
Part VIII - A tutorial on adding columns to Explorer's details view via a column handler shell extension
![[Part 8 screen shot - 6K]](ShellExtGuideIndex/ShellExtGuideIndex8.gif)
Part VIII demonstrates how to add columns
to the details view of Explorer on Windows 2000. The sample project adds a few columns that show ID3v1 tag data
in MP3 files.. (This extension works only on Windows 2000.)
Part IX - A tutorial on writing an extension to customize the icons displayed for a file type.
![[Part 9 screen shot - 24K]](ShellExtGuideIndex/ShellExtGuideIndex9.gif)
Part IX shows how to customize file icons
on a file-by-file basis. The demo project is an extension that shows 4 different icons for text files, depending
on the size of the file.
| You must Sign In to use this message board. |
|
| | Msgs 1 to 25 of 115 (Total in Forum: 115) (Refresh) | FirstPrevNext |
|
|
 |
|
|
How can i make a call to execute sort.exe such as:-
"sort.exe input.txt > output.txt"
SO far ShellExec is very restrictive - only accepts certain type of file operations.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi Michael,
Sorry to beat a dead horse. I'm down to a base case which demonstrates the problem: Create 2 different menu Dlls which do nothing other than implements the minimum:
* IShellExtInit::Initialize(LPCITEMIDLIST, LPDATAOBJECT, HKEY); * IContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO); * IContextMenu::GetCommandString(UINT, UINT, UINT*, LPSTR, UINT); * IContextMenu::QueryContextMenu(HMENU, UINT, UINT, UINT, UINT);
InsertMenu always return TRUE, and GetLastError() always returns ERROR_SUCCESS.
Only one of the Dlls will be present in the Context Menu. However, both will respond to GetCommandString() (per SysInternal's DbgView).
The problem exists on Windows XP and Windows Vista. However, it is not present on Windows 2000. I did not test on Windows 2003 Server since I know I can duplicate on XP and Vista.
At this point, I have not been able to debug further - WinDbg locks my machine when I attach to Explorer.exe. Hindsight being 20/20, this makes sense...
Jeff
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi - first off thanks for the series of articles they have been very useful.
However, I have a context menu item showing a dialog from which I want to access the Windows File Open common dialog.
I can;t work out how to do this or if indeed it is possible. I started looking at CfileDialog but cannot include afxwin.h into the project becasue Windows.h is already included (via atlbase.h)
any ideas how I could achieve this?
thasnk in advance.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
When you use the AppWizard to start an ATL project, there's a checkbox for adding MFC support. If you make a dummy ATL+MFC project, you can see what changes are necessary to add MFC support, then make those changes in your current project. You can call also just GetOpenFileName() directly.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hello, I was wondering if anybody knows how to replace the action performed by the items in the "System Task" of the "My Computer". More specifically I would like to replace the windows Eject with my own eject for the CD/DVD. I know how to this for the right click Eject, but not from the system task.
Thanks for your help
pada
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
1. I want to change icon for drives which meet a specific condition (such as which contains a specified file). Until now I know there are 2 ways:
a. Operate with "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons" key in Registry. (refer to http://msdn.microsoft.com/library/d...ending/icon.asp) But: After calling SHUpdateImage function, the icon was not refreshed automatically. I had to press F5 button to refresh manually. Could we overcome this disadvantage?
b. Operate with "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" key in Registry. (refer to http://web6.codeproject.com/win32/n....asp?print=true) But: This method updates icon of all drives which have the same type (hard disk, removable disk...) and it can not change icon of a specific drive.
2. When I insert a USB, floppy disk, CD…I want to change it’s icon. If I use Autorun.inf file to change icon, only WinXP support this feature. Could we solve this problem by Shell Extension?
Thanks in advance
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Is there a way to customize F2 renaming or menu rename function by shell extensions. I actually want to hide extension of files except renaming. I also try to select only filename but not the extension while renaming.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Hi I used your code to make a shell estension that adds two items to the context menu (for all files and folders). When any of these two items are selected, a temp file is created (in %APPDATA%). Then an exe file should run given this temp file as its command line argument. The code compiles and has no problem and anything goes fine, except for when I use the ShellExecute API. When I use this API, the desired files runs with the correct commandline sent to it, but soon the explorer crashes and the file stops running. Could you please explain Why? This is my code, the code that I have added is in Bold and the code that makes the explorer crash is in Italic Bold. (if I comment this code, everything runs fine...)
HRESULT CMyShellExtention::InvokeCommand(LPCMINVOKECOMMANDINFO pCmdInfo) { USES_CONVERSION; // If lpVerb really points to a string, ignore this function call and bail out if (0 != HIWORD(pCmdInfo->lpVerb)) return E_INVALIDARG;
// Get the command index - the only valid commands are 0 and 1 WORD wCmd = LOWORD(pCmdInfo->lpVerb); if (wCmd > 1) return E_INVALIDARG;
string_list::const_iterator it, itEnd; tchar_string clipBuffer; tchar_string name;
it = m_lsFiles.begin(); itEnd = m_lsFiles.end();
clipBuffer = it->c_str(); while (++it != itEnd) { clipBuffer += '\n';//"\n"; clipBuffer += it->c_str(); } TCHAR a[MAX_PATH]; SHGetSpecialFolderPath(NULL, (LPTSTR) a,CSIDL_APPDATA,false); wsprintf(a, _T("%s\\MyFileTemp.tmp"), a);
FILE *f; f= fopen(T2CA(a),"w"); fprintf(f, (char *) T2CA( clipBuffer.c_str() )); fclose(f);
TCHAR* ss; switch (wCmd) { case 0: wsprintf(ss, _T("/s \"%s\""), a); break; case 1: wsprintf(ss, _T("/m /s \"%s\""), a); break; } //MessageBox(NULL, ss ,NULL,MB_OK);
ShellExecuteW(pCmdInfo->hwnd,_T("Open"), _T("F:\\EasyPC Source\\MyFile.exe"), ss, _T("F:\\EasyPC Source"), 1);
return S_OK; }
-- modified at 7:30 Friday 2nd September, 2005
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Thank you for your great tutorial and quick reply.
and sorry for asking such a stupid question! Yes you were right! and my compiler also generated a warning that I didn't care to. By the way, could you please introduce some documents on string conversions in C++! I found that there are a bunch of string types and structures that they were hard for me (as a VB programmer that also has a limitted knowledge of C++) to convert to each other. Thanks again
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
 | Win_32 |  | Anonymous | 15:04 6 Jul '05 |
|
|
Why does evrything has to be writen in MFC i guess most are to laizy to write. Could you do a tutorial in win32 without the mfc wraper clasess.
I'm trying to figure out how to do this in non-MFC classes. It is just to anoying trying to strip it down.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Is it possible? I found many tutorials about Shell extensions, but each of them requere restart when uninstall. Is it possible to uninstall and delete my shell extension dll without restart? What do WinRar and WinZip? They doesn't requere restart duaring the uninstall.
Thanks. KalliMan
a
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
That is what many installers do automatically as soon as they fail to remove the files in question (cause they were "in use").
It seems however that the recent Microsoft installer (MSI) has a way to uninstall a dumb (non self-un/registering) shell extension dll without restarting the system/explorer. Upon deinstallation, the Microsoft System will not ask to restart the explorer even if it has linked the shell extension at that moment. It will however ask for shutting down other applications that may have linked it (e.g. Outlook cause you had file attachments visible that where supported by the extension). I still am wondering how MSI is doing that as i need to remodel that exact behaviour using a different installer system.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
mmsguru wrote: I still am wondering how MSI is doing that as i need to remodel that exact behaviour using a different installer system.
I know zilch about MSI, ask around on the MS newsgroups, you'll have a better chance of getting an answer there.
--Mike-- Visual C++ MVP  LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I am new to this forum and am trying to learn a context menu extension that I already have. I found this com dll at a site and it provides just what I need except now there is an issue. I don't think the problem is with this but an explorer issue.
If I select a group of files and execute my process, as expected my registry key is populated with the list of files and my executable called.
If I select a group of .lnk items my registry key is not populated because each .lnk points to the same file with different parameters and my executable is launched with the real file name once. This is not what I want because I need to process the actual shortcuts.
Here is the kicker, If I put a folder in the same parent as the .lnk files and select a group of .lnk files and the folder, as expected my registry key is populated with the list of .lnk files plus the folder and my executable called.
In the source provided with the dll I can see DragQueryFile is called to get the list of files. Has anyone ever encountered this behavior?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Right you are. Thanks.
Also, I enjoyed reading the articles you authored. They are elegantly done and full of information.
I have always been a big fan of context menus and until recently not coded my own utilities. Someone passed me a link to a dll that lets you make your own custom utility without having to create the dll. The creating company gave up on a project and set the code free in the wild. It has proven to be very helpful to “roll your own”.
Thanks again
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
General News Question Answer Joke Rant Admin
|