AgentRansack's file list provides right-click file popup menu like Explorer; how can I do this in my own apps? - contextmenu

if I right-click on a file name in the search results, it gives me the usual Explorer popup menu for a file, with options like Open, Edit, Properties, Share With, Send To. Just like what I get in Explorer itself. How did they do this? Can I do this in my own programs?

Check the How to host an IContextMenu series from oldnewthing. The seris not only deal with displaying the menu, but also shows how to handle different use cases such as property dialog, control or shift key down when menu item is selected, deal with context menu shell extensions, etc.

Related

Extend MTF LogFile to a file in desktop

I am new to this simple thing,For my Windows Forensic Course, I extended $mft and $logFile to my folder in Desktop. I can see in the file properties that they are loaded. But when I visit the file, I can't see anything. I opened hidden files options, but it didn't work, what should I do?
I found my answer:
Click on Start
Select Control Panel
Select Folder Options
Select the View tab
Scroll down the Advanced setting
Uncheck Hide protected operating system files
Click OK

How to save multiple files at once through delphi save dialog

I'm not able to save multiple files at a time in delphi save dialog box. Multiple files means I want save files without mentioning anything(or only asterisk) at "filename" field in delphi TsaveDialog. Please let me know how to achieve that.
Of course not, because that is not what it is intended for. You CANNOT obtain multiple filenames from a single save dialog. It only provides one filename at a time. That is by design.
I suspect what you really want is to prompt the user for just a folder path instead. Use the SelectDirectory() function (or the Win32 SHBrowseForFolder() function directly) for that, then you can create whatever files you need in that folder.
The save dialog doesn't save files. It allows the user to select file names. The save dialog doesn't support multiple selection so if you want to have a file dialog that allows multiple selections you need an open dialog. But an open dialog typically is used to select names of existing files, whereas a save dialog can specify a name of a file that does not yet exist.
Wildcards when entered into file dialogs are used to filter the displayed list of files. The file dialog won't return file names containing wildcards.
You imagine using wildcards, but how would you be able to do that and create new files? Wildcards are used to pattern match against existing files.
Maybe what you need is a folder selection dialog. Or perhaps you should ask the user for the name of the "master" file and then you generate the names of the "auxiliary" files using the master file name as a stem. I'm guessing because you've not told us any specifics behind your question.
My advice is to reconsider carefully what you are attempting to achieve. Think of all possible corner cases. Explore what UI idioms are used by other programs. Make sure you understand fully the capability of the file dialog controls. And then design your UI to fit with all of these constraints.

How to view html output in Notepad++?

How do I view my Code output in Notepad++ as a webpage or something similiar?
I have built something but I can't find a button or something like that in Notepad to view it as a webpage or something similiar.
If it is a webpage written in html:
just go where you saved it and click it.
If it is in php:
You will need a web server, save the file in the www directory. and access it like this:
http://localhost/yourfile.php
Simply, save your file with the correct extension in this case html, then click run , in the run menu click launch in, (in whichever is your browser) in my case, chrome.And it should work(:
Add this plugin in Notepad++: Preview HTML but it opens only in IE
To setup Notepad++ for testing your markup or code there are a few things to consider.
When Notepad++ launches do you want a test document opened by default?
What language do you prefer the document to be opened as?
What browser do you wish to test your test file in?
Do we want a shortcut to open test in browser?
If you do not have your local environment setup to run server-side scripts you will be limited to what the browser supports.
In my example setup I will be using .php as my language. There are some variables, but I've chosen what I believe best suit my needs. I'm also using a windows machine.
Create a new file in C:\Program Files (x86)\Notepad++ (or wherever) as php.php (or whatever). This will be the document we keep open and will remain open so long as we never close it.
In Notepad++ go to Settings > Preferences > New Document
In the bottom left there is a drop-down. Select your language (php in my case).
Open php.php in Notepad++.
Go to Run > Modify Shortcut / Delete Command and locate your desired browser (note: this may not work as expected in some browsers i.e. Internet Explorer, go figure).
Create a custom shortcut so your document can be launched to test (unless you are happy with what is already setup).
This will effectively keep your default file open in Notepad++ every time it is launched in your preferred language and allow you to quickly test your markup.
Cntrl + Alt + Shift + I(Alphabet if you want to open in Internet explorer)
I hope this will work.

Open CKEditor with a keyboard shortcut

I use keyboard shortcuts within CKeditor all the time. One of the very useful ones is to save the page (and close the editor) with Ctrl+Shift+s.
However, I just cannot find a keyboard shortcut to open the editor. I wouldn't be a CKEditor shortcut, but one of the browser. Does one exist?
If not, there still may be an alternative; In Mindtouch it is possible to open the editor on any page by adding the argument action=edit to the page URL. What tool could I use to create a keyboard shortcut that reloads the page with the argument added?
I think shift + f10 should do it? Here is the full list of keyboard shortcuts
See this question for an example of how to create your own key binding

Capturing folder path from Windows Explorer

I would like to add to a Delphi application a way for the user to call Windows Explorer (possibly using something like ShellExecute, perhaps).
However, and this is where I need some help, please, the application would need to capture ^H^H^H^H^H^H read the folder path that the user navigates to while within Windows Explorer.
Is it possible to obtain this information from Windows Explorer?
[edit: If not possible, or unrealistic, my fallback plan is to provide a separate "Browse for folder" button, to allow the user to select the folder first, then they can launch the Window explorer afterwards].
Thanks for any advice.
PhilW.
I dont know your exact needs, but most likely, this is not the way to go. For details, Microsoft developer Raymond Chen has written a blog post about this. What you should do, I think, is to embed an explorer browser control in a custom form in your own application.
For letting a user browse to and select a folder, I use TOrtusShellBrowseFolder.
Ortus Shell Components
Can't you just use the TOpenDialog? From Delphi Help:
Description
TOpenDialog displays a modal Windows dialog box for selecting and opening files. The dialog does not appear at runtime until it is activated by a call to the Execute method. When the user clicks Open, the dialog closes and the selected file or files are stored in the Files property.
if OpenDialog1.Execute then
filename := OpenDialog1.FileName;

Resources