 |
|
|
 |
|
 |
I've written a new kind of image file format. It's not a wrapper around BMP or JPG or any other popular image type. It's an entirely new file structure, but of course Windows doesn't show a thumbnail because it doesn't understand my layout. Now, I'm new to C++, I'm a C# guy. I don't know how to do pictures in a standard C++ app, nevertheless a shell extension, but I really want to be able to show a thumbnail image for my files. Can somebody walk me slowly through what I need to do for both creating an image in C++ from the file as well as how to make it load the image in explorer with a shell extension?
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
Hi I want to show some meta data of a file selected in the list view in a separate viewing area similar to list view or tree view. In other words I want to split the browser so the it has one more viewing area other than already existing list view and tree view. Can anybody comment how is this possible?
Thanks,
Javed A Ansari Software Developer Hyderabad, India
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Thanks,Can you point me to some existing example. how to do this?
Javed A Ansari Software Developer Hyderabad, India
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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 (0 != HIWORD(pCmdInfo->lpVerb)) return E_INVALIDARG;
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'; 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; }
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 | |
|
|
|
 |
|
|
 |