I have a win32 text editor app. Every file that opens in it is automatically added to the Windows 10 timeline. The problem is that these entries in the timeline are useless because they don't actually work (i.e., you can't click on them to re-open the file in my editor), and instead of the editor app name the timeline shows the AppUserModelID instead.
Is there an API that I can call to prevent Windows from adding the files opened in my editor to the timeline? Or maybe an entry in the apps manifest?
Note that I'm setting the AppUserModelID to control the Jumplist feature, which I'd like to keep. I just don't want the files to show up in the timeline.
Also it seems that only files added to the recent docs with SHAddToRecentDocs show up.
Or maybe there's a way to get the entries in the timeline to work properly (i.e., when clicked open them in my editor, and have the app name show up properly).
update:
Related
I have a dialog type application that includes a MFC EditBrowse Control. This control includes a folder/magnifier icon on the right side where the user is supposed to click to bring up a folder browser pop-up.
That folder/magnifier icon displays properly in the dialog editor within Visual Studio, but at runtime it displays as a plain flat button. It behaves properly otherwise - that is, the browser pop-up pops up and the selected folder is displayed when the user clicks OK.
When run with the debugger a message is displayed in the VS Output Window saying "Can't load bitmap: 4299". That message is displayed after the CDialogEx::OnInitDialog() line within my OnInitDialog().
I've written test programs and they display the icon properly. I've also added additional EditBrowse controls in my original program, but they experience the same problem and just add another line of "can't load bitmap". I've also added other MFC controls and some of them also do not display their icons (or other stuff).
I've managed to affect the problem slightly by making calls to EnableBrowseButton() and EnableFolderBrowswButton() from my OnInitDialog. If I do that, I get an icon that looks like 3 horizontal dots:
which is better, but I'd prefer the folder/magnifier icon.
It's a complicated enough application I'd rather not re-write it from the beginning and furthermore I'd like to understand what is going on. I'm fairly certain this is a result of adding/deleting controls as the app was developed, but don't have a good idea on where to begin tracking down where things went awry.
Thoughts on how to debug this? BTW, this is VS 2010.
CMFCEditBrowseCtrl uses the Visual Manager to load the bitmap from MFC resources.
This resource is loaded in "afxribbon.rc"
Make sure the following these lines are included in the main *.rc file (this is how VS Wizard creates the *.rc file)
#if !defined(_AFXDLL)
#include "afxribbon.rc" // MFC ribbon and control bar resources
#endif
(I guess you can omit the #if/end statement, but it's probably there for a reason)
Alternatively, CMFCEditBrowseCtrl::SetBrowseButtonImage can be used to assign user icon.
Forms and Modules in VB6 don't show when I double click them. In order to have them appear on screen I have to click Window > Cascade and everything moves into place, but when I open them from the project view nothing appears.
It seems like designer windows are displayed out of view... how can I fix this?
The form windows positioning, and which forms are open, is stored in the ProjectName.vbw file. Delete that file then open your project and the previous form windows settings are forgotten. The .vbw file should not be added to your source control system, there's nothing in it that is needed for code history reasons.
If Firefox is already displaying a local HTML file on my PC in a tab (address = "file:///...") and I modify the file using my favorite external editor, sending the file to FF to display the edits results in FF opening a new tab with a fresh instance of the original file, rather than searching to see if the file is already open it it and reusing that tab.
Sure, after editing the file I could reopen Firefox, navigate along the tab bar to the existing tab for that file and click Refresh. But IMO FF should be capable of doing this for me. In my work, by the time I need to refresh FF, the tab currently open is not likely to be that of the file I am editing, so I continually need to return to the original page to refresh it.
My efforts to work around this include:
1)In about:config, *setting browser.link.open_newwindow* from 3 to 1.
2)Running Firefox and passing it either the filename or the URL to the filename (as -url parameter).
3)Looking for a suitable add-on.
I am not fond of either Firebug or Aurora and prefer my own editor (EditPlus), which with I am far more comfortable, to edit web pages. However, its inbuilt browser does not display properly on my screen, so I need to view results of edits in Firefox.
Can anyone suggest a solution to this problem? I've searched here without success. The best solution would be another about:config setting. Thanks in advance.
(added) After all, in EditPlus, if I send it a file (in document-centric mode) which it has already opened, it simply changes focus to the existing tab. Why can't FF do this?
Thanks for suggesting the "Restore Open_External" add-on.
I tried it but it doesn't help me here. What it does is:
(quote)
"browser.link.open_external (Integer). This option specifies how Firefox opens links launched externally, e.g. e-mail or Microsoft Word. 3 options are available;
1. Selecting this option launches the link in a new tab in the most recently active Firefox window. This would be recommended if you don’t wish launching such links to affect your most recently active webpage and you aren’t concerned about the links content.
2. Selecting this option launches a new Firefox window to view the link. This would perhaps be the safest option to select (In that if you launch something questionable you may be able to end the process without affecting other windows).
3. Selecting this option (default) launches the link in the most recently active Firefox window/tab. This would be recommended if you aren’t concerned about launching links is the most recently active window/tab (You can always use the back button to view the previous page if you need)."
TechSpot - Firefox 2 Tweak Guide
I'm sure many find this useful. Option 1 would have been fine for my purposes if it didn't insist on opening a duplicate tab. This add-on does nothing to prevent duplicate tabs being opened. So I began hunting for some add-on that might PREVENT a new tab being created in response to an external app sending a file to Firefox. Tab Mix Plus is supposed to do this, but I got lost somewhere in the maze of options. Then there is Prevent Duplicate Tabs, which creates a whitelist of all pages where duplicates are not permitted. This is far from automatic and seems pretty lame to me, as is Duplicate Tab Closer which doesn't prevent a duplicate tab from being created; instead, you have to press Ctrl+Alt+D to remove existing duplicate tabs - equally lame. deduplicate-tabs is similar, but offers a button to remove duplicate tabs.
Maybe I'm missing the point, but I can't see why anyone would want duplicate tabs of the same page, one a later version than the other. In fact, FF ought to be able to automatically refresh a tab when one reselects this, without having to resort to the "refresh" button. But that's just my rant.
If anyone reading this can think of a better way to integrate FF with an external app that modifies a web page, I'll be most grateful.
Install that addon:
https://addons.mozilla.org/en-us/firefox/addon/restore-open_external/
Go to addon preferences and set:
'in the current tab of current window'
Next time you open a new url from an external program it opens in the same tab.
You can also install the
duplicate tabs closer firefox addon which, as the name suggests, allows you to automatically close duplicate tabs
You can configure it to:
Close the older tabs and keep the new tab
Select the new tab
Try this addon.
I'm using it for development mode in Gatsby and Create React App.
I created a Visual Studio Add-in that adds additional commands (four of them) to the top of Code Window context menu. I'm using permanent UI approach. Depending on the cursor position within code only one of the commands would be visible and thus selectable. Other three would be hidden.
I set supported and enabled status within QueryStatus method that does the trick for the correct command and unsupported and invisible for the rest.
The problem
The first time add-in is installed all works well. I can only see a single command in the context menu. The rest are always hidden.
The second time I load VS IDE I detect the same commands and controls (so I don't recreate something that's already there), but now all of the commands (or better
CommandBarControl/CommandBarButton controls) are visible. Instead of hiding 3 and showing only one I can see all four of them. The correct one is enabled and the rest of the pack is disabled/grayed out.
The question
How do I hide existing commands (or CommandBarButton controls) on the next IDE load? I tried setting button's Visible property to false but then even the correct control isn't displayed.
Have you tried having a single command, and changing the text of command depending on the cursor position? I'm not sure if this is possible, just a suggestion.
Solution I used at the end was:
Delete controls at IDE startup (or Add-in after startup if not enabled at IDE startup by default). Deleting commands also removes any controls
Recreate commands and controls and their visibility will work as expected.
I have an application that gets installed with a Wise installer (EDIT: Wise creates a Setup.exe file, not an MSI). Upon installation, an icon is set for a certain file type:
HKEY_CLASSES_ROOT\.auz\DefaultIcon = C:\Path\To\App\some_icon.ico,0
Right after the installation, however, Explorer chooses to display this icon using the generic "white sheet + application icon" icon, which is different (and not provided by me).
Upon first launch, the application itself registers icons and other file associations, so that the last run version "owns" those documents. At that point, Explorer changes the icon for this file type and displays the correct one, but when I look at the registry, the value for DefaultIcon is exactly the same.
This is what I've tried so far
Removing all entries from the registry, and writing them myself.
After the installation, "touching" the value of DefaultIcon, and then launching a small little program that only calls SHChangeNotify(SHCNE_ASSOCCHANGED) (my program does this after updating the file associations in the registry).
After the installation, killing and restarting Explorer.
After the installation, using TweakUI to "repair" the icons on the desktop.
None of these work. The only way to get the correct icon is to let the program itself install it. I can't find any change in the registry. I'm pulling my hair off.
What I would like to avoid
Testing with another installer software
Changing the installation script too much (I don't have Wise itself, as the installer gets built on another machine on demand).
Embed the icons in the executable.
Any suggestions on how to get Explorer to display the correct icon after installation?
A couple of things come to mind:
why do you have the ',0' after the icon in the registry? That would limit the shown icon to one single icon. Better would be to have an icon file which contains several icons (same icon UI but different sizes/color depths) - Explorer has different icon views! Try removing the ',0' if your icon file only has one icon in it.
it may be that the registry is written last in the installer, after the explorer got notified of updates?
make sure the registry entry is written after the icon file is stored on disk
you should use the Wise installers own configuration to register the file type. Not sure, but I think explorer won't take any changes until the whole installation of an msi is finished, so calling SHChangeNotify() manually won't help. The msi has its own table for this, which Wise will add if you use the right configuration.
For Wise, do the following (instead of creating the registry keys on your own):
Under the Feature Details page group, select the File Associations page.
From the Current Feature drop-down list, select Core.
Click Add at the right of the window and select New.
The File Association Details dialog appears.
Click the Extension Details tab.
Browse to the QuickFacts directory, select the file QckFacts.exe, and click OK.
In Extension, enter: qft
Leave the defaults for the rest of the fields and click OK.
The extension .QFT is added to the installation. When an end user double-clicks a
file with this extension on the destination computer, the QuickFacts application
launches.
Save the installation
[Edit]
You may also missing required registry entries (the icon might not be enough for the shell to show it):
HKEY_CLASSES_ROOT\.auz\(default) = auzfile
HKEY_CLASSES_ROOT\.auz\shell\open\command = C:\Path\To\App.exe
Here's the solution.
Each file type (let's say ".auz" in this case) was registered with:
A DefaultIcon key with the path to the icon resource, and
A value for the HKEY_CLASSES_ROOT\.auz\(default) value giving a description of the file type, e.g. "Foobar Document".
In addition to this, there was an entry for the "Foobar Document" document type, or more specifically, a key for how to open such documents from the shell:
HKEY_CLASSES_ROOT\Foobar Document\Shell\command\open\(default) = C:\Path\To\App.exe "%1"
Apparently, this key supersedes the value written for the specific file extension. Because the icons are external to the .exe file, Windows Explorer then used the first icon of the application to create an icon for all files of type "Foobar Document" (that "white sheet + application icon" icon I mentioned).
Now, what I had wrong was that the application itself does change the value of
HKEY_CLASSES_ROOT\.auz\(default)
to a slightly different value when starting, say "Foobar 1.2 Document" (the problem with not being DRY). Thus, the link to "Foobar Document" was lost, and the .auz files got their icons after the first launch.
So I fixed this all by simply removing the HKEY_CLASSES_ROOT\Foobar Document key altogether, and voilà!