How do I embed my GUI in Windows explorer? - c++

I want to add an option to explorer (in windows) like the 'preview pane' but only an 'edit pane'. The idea is that I have text files that I want to edit, but I dont want to open an application to edit the file. I want to just click over in the edit pane and make the edits. Any suggestions what API's I can use to extend explorer in this way? (More than just 'look at the shell api: I have and I dont know which will allow me to accomplish this).

You have to implement PropertyHandler.
See Windows SDK \Samples\winui\Shell\AppShellIntegration\PropertyHandlers.
Each property is described by property schema XML file. This property schema must be registered with PSRegisterPropertySchema(). Property handler implements IInitializeWithXXX, IPropertyStore and optionally IPropertyStoreCapabilities. You have to register CLSID of your implementation for each file extension you want to handle (.txt in your case).

Related

How to switch from controller to html code?

I would like to know if there is a shortcut that allows me in WebStorm to switch from the controller page directly to the html page associated with it and vice versa.
WebStorm 2019.1
You can try using Related Symbol… popup for this. When you’re in one of the Angular component files, press Ctrl+Cmd+Up on MacOS or Ctrl+Alt+Home on Windows/Linux to see the list of related files. Then you can use the arrow keys to select the file you need and then press Enter to open it.
See https://blog.jetbrains.com/webstorm/2019/01/webstorm-2019-1-early-access-preview/#easier_navigation_in_angular_projects

change file name when filter changes in Windows file save dialog from c++

In a Windows Save File dialog, I would like to automatically change the extension part of the filename in the edit box when the user changes the filter. That is, if the user is saving an image file, and changes the type to JPEG, the file name automatically changes to .jpg.
IIRC this used to be possible via hooks but that approach is no longer supported. Is there a way to accomplish it now? I'm using C++ (C++Builder if it makes any difference).
Thanks.

Changing file's details tab(when right click) using the IShellDispatch interface?

As the title says, is it possible, by using the IShellDispatch interface to change some of the fields shown in the details tab when we right click on a certain file and then choose the properties option?
Thanks!
On Vista/7 use the Shell property store to update the details fields in the shell property page. See http://blogs.msdn.com/b/benkaras/archive/2006/11/21/writing-properties-9-summary.aspx for an example.
For 2000/XP you need to use compound file APIs as the metadata is stored in NTFS alternative stream or the file itself, see http://msdn.microsoft.com/en-us/library/aa379964.aspx

Contextual Menu to a Specific Folder

I have read how to add a contextual menu though registry to all files or files according the extension.
But how can I add a contextual menu that will work ONLY on files of a specific folder (for example on files of folder C:\contmenu)?
Can this be done?
Thanks a lot.
If you're implementing a context menu shell extension, you get the path of the item in your IShellExtInit::Initialize() method. Then you can decide depending on the path whether to add your entries to the context menu or not.
It's not possible to register an extension just for a specific path though.

Launching OpenOffice filters from a menu/toolbar button

I have packaged an XSLT export filter for OpenOffice as per the instructions on this page:
http://wiki.services.openoffice.org/wiki/Filter_extensions
It works fine; but in order to be used, the user has to select the command 'File/Save as' then choose the correct file extension that triggers the use of the filter, and a target file name.
I would like to let the users launch the filter by using either a menu item or a toolbar button, without asking them for anything (the target file name is defined within the transformation).
What is the best way to do that and packaging it in the same extension as the filter?
Well after much fruitless searching and asking, it turns out the best trick is to write a macro that launches the filter, and associate that macro with a button; the macro and the button can be packaged in the same extension as the filter.