windows-shell

How can I immediately reload a folder icon when desktop.ini is changed

為{幸葍}努か 提交于 2019-12-01 16:42:46
I'm trying to change folder icon programmatically using changing desktop.ini on the folder. I can set a icon, but can't change it immediately through changing "IconIndex". The icon is also changed in several seconds later. Is there anybody know how to change the icon immediately? I already answered by commenting a reply at my question before. For more convenience, I will write an answer again. If you want to make any change at an appearance of any folder using Desktop.ini, use some of win32 shell functions. You shouldn't try to edit a Desktop.ini directly. It doesn't get to make any change at

Assigning keyboard shortcut to get path of selected item in windows explorer

空扰寡人 提交于 2019-12-01 13:47:13
I don't know if this is even possible, but how can I bind some key combination to a (C#)program, so that when that keyboard shortcut is pressed with some file selected in windows explorer, it calls specific function with path of that file as a parameter. Or can I assign some keyboard shortcut so that windows explorer opens selected file in my program(that way I could pass the path to already running instance) thanks BenV You could modify your program to run as a shell extension which would add an item for your program to the right-click menu in windows explorer, but apparently coding shell

Get a list of files/directories in an open Explorer window in C#

无人久伴 提交于 2019-12-01 12:24:07
问题 I'm trying to pull out the list of files and directories listed in an open Explorer window (in the same order as they're displayed) so that I can look through it, then set focus to a particular item. I found this code here that allows me to get the selected items, however I'm not sure if it's possible to use this approach to get all items: List<string> SelectedFiles() { string filename; List<string> selected = new List<string>(); var shell = new Shell32.Shell(); foreach (SHDocVw

Creating a Windows explorer like directory tree

无人久伴 提交于 2019-12-01 10:59:38
Currently, I am using wxWidgets' wxGenericDirCtrl, which gives me a user interface to the directory tree. It looks like this: However, I would prefer it to look like this: Talking with the wxWidgets developers, they suggest that one good way to proceed is to modify the wxGenericDirCtrl class to use the native Windows directory control. I would like to contribute this functionality to wxWidgets myself, but I'm not sure where to start, and could use some suggestions to get me started. Questions: What's the correct native way to create such a control in C++. Do I use MFC, .NET, or something else?

Creating a Windows explorer like directory tree

纵饮孤独 提交于 2019-12-01 08:03:09
问题 Currently, I am using wxWidgets' wxGenericDirCtrl, which gives me a user interface to the directory tree. It looks like this: However, I would prefer it to look like this: Talking with the wxWidgets developers, they suggest that one good way to proceed is to modify the wxGenericDirCtrl class to use the native Windows directory control. I would like to contribute this functionality to wxWidgets myself, but I'm not sure where to start, and could use some suggestions to get me started. Questions

Application Verifier reports access violation in call to ShellExecuteEx

我与影子孤独终老i 提交于 2019-12-01 07:27:59
问题 Short Version Application Verifier says there is an access violation when running the code: var shi: TShellExecuteInfo; begin shi := Default(TShellExecuteInfo); shi.cbSize := SizeOf(TShellExecuteInfo); shi.lpFile := PChar('C:\Windows'); ShellExecuteEx(@shi); end; What's wrong with it? Long Version I'm running my application under the Application Verifier, with the option to detect heap corruption enabled: Heaps : Checks the heap errors. During the call to ShellExecuteEx , an exception comes

Why are icons in property sheets rendered with so few colors?

感情迁移 提交于 2019-12-01 05:54:48
问题 I am creating a property sheet shell extension and want to have a little icon to set off my property tab from the standard system tabs. Unfortunately, my icon is being rendered almost entirely in grey. Original image: In the property sheet tab: At first I thought this was somehow my problem, but then I saw that TortoiseSVN appears to have the same problem: This happens in both Windows 7 and Windows 8. Does anyone know why these images are appearing so muted? Also, does anyone have any hints

How to get the IPreviewHandler for a file extension?

半城伤御伤魂 提交于 2019-12-01 03:57:31
How do i get the shell IPreviewHandler for a particular file extension? Background Windows allows developers to create a preview handler for their custom file types: Preview handlers are called when an item is selected to show a lightweight, rich, read-only preview of the file's contents in the view's reading pane. This is done without launching the file's associated application. A preview handler is a hosted application. Hosts include the Windows Explorer in Windows Vista or Microsoft Outlook 2007. I want to leverage the existing IPreviewHandler infrasturcture to get a thumbnail for a file.

Get the Windows Download folder's path

戏子无情 提交于 2019-12-01 03:53:18
I have some Excel VBA code that requires knowing the Downloads folder path. How could I do it? Since you can move around the Downloads folder (and also Documents and most of those folders, via the folder properties), the environmental variables like %USERPROFILE% are useless to construct a path like %USERPROFILE%\Downloads , and WScript.Shell.SpecialFolders doesn't list the Downloads folder. I guess it has to be done reading the registry , but I'm clueless about that. Thanks! Found the answer google a little more... The way to read the registry is, as per http://vba-corner.livejournal.com/3054

How to get the IPreviewHandler for a file extension?

你离开我真会死。 提交于 2019-12-01 00:30:14
问题 How do i get the shell IPreviewHandler for a particular file extension? Background Windows allows developers to create a preview handler for their custom file types: Preview handlers are called when an item is selected to show a lightweight, rich, read-only preview of the file's contents in the view's reading pane. This is done without launching the file's associated application. A preview handler is a hosted application. Hosts include the Windows Explorer in Windows Vista or Microsoft