Shortcut of watch window in VS2012 - c++

I'm C++ user, and I like to use watch window.
Everytime I want to investigate variables
I do it in watch window pannel..
Before vs2008 the shortcut was ALT+3.
really easy to press.
But with vs2012,
I must press CTRL+ALT+W, 1
I think this is really ugly.
hard to press, multiple step...
But I don't want to change default setting,
because I have many environment and
I don't want to configure the key setting
every time I move or change computer.
Is there any good way or
easy way to debug with out pressing that CTRL+ALT+W, 1 commend?

You could make the change to the shortcut key/keys, then you could export the settings.
Tools > Import and Export Settings Wizard. Exports into a file you can send to yourself etc.
Then you could import the settings you like into other visual studio environments you have ;).

To change it back to Alt+3
Select Tools/Options
Goto Environment/Keyboard
In the list of commands, scroll down to Debug.Watch1
It will tell you that the shortcut is Ctrl+Alt+W,1
In Press Shortcut keys box, press Alt+3

Related

Disabling menu compression in MFC

My English is not perfect. I am using Visual C++ 2019 and MFC. At my MDI-program, the menus are compressed: I do not see all the items, there is a double-arrow-like something on bottom of the menu, I always must click to them. I can not disable this. At Resource View, I can not open the whole menu's Properties Page, only for the File, etc. menu's Properties Page. I did not find the disabling on the Properties Page. In the code, in MainFrm.cpp, CBRS_SIZE_DYNAMIC and CBRS_FLYBY occur 2+2 times. I tried to put to comment them, but this did not solve the problem. How can I disable the compression? Thank you.
I can not open Properties Page of the whole menu. Maybe it has not Properties Page, or the cause is the lack of High DPI support in Visual Studio. For example, I can not edit icons: the icon editor is unusable. At the generated program, it seems the High DPI support of toolbar is depend on the style. At WinAPI programs, there are 3 pixel stairs: emulates 1/3 resolution. There is 3*96 dpi = 288 dpi at me, 0,16 mm * 3 = 0,48 mm.
Use CMFCMenuBar::SetShowAllCommands
Remarks
If a menu does not display all the menu commands, it hides the commands that are rarely used.
Whether the application should display all menu items or just the most recently used ones (and the user will have to expand the rest) is an option that can be set by the user: Toolbar Options->Add or Remove Buttons->Customize->Options->Personalized Menus and Toolbars->Menus show recently used commands first. This option is saved in the registry under HKEY_CURRENT_USER\SOFTWARE\CompanyName\ApplicationName\Workspace\MFCToolBarParameters\RecentlyUsedMenus, so the application "remembers" it.
Programmatically it can be changed using the CMFCMenuBar::SetRecentlyUsedMenus() function - it's a static function.
It would be best to let the user decide how the application should work, so I would recommend that you do... nothing about it. Or, you could set it to FALSE, but only for the very first time the application is run. Add a new boolean value in the registry, under ...ApplicationName\Workspace or ...ApplicationName\Settings, with a value always set to TRUE. The best place to do this is the SaveCustomState() member function of your application class. In the LoadCustomState() read that value (default FALSE), and if it is TRUE call CMFCMenuBar::SetRecentlyUsedMenus(FALSE);.

Modifying the Windows Explorer Toolbar with WinApi / c++

My task is to program change sorting parameter of files and folders in my operating system.
In the article on the MSDN:
under
Modifying the Windows Explorer Toolbar
indicated
In addition to modifying the Windows Explorer menu bar, you can also add buttons to the toolbar. And an example code.
But example of this modifying the Windows Explorer menu bar is not there, the only thing is there it's button adding example.
An alternative article has an example of opening it, so my question is: is it even possible, and if it is, how to do it?
The folder sort settings are saved to:
HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\
HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU
The entries look like:
You would need to loop through all of these registry entries and change the 'Sort' key. This would only affect folders which have already been accessed.
If you want to see how these lists are parsed, run ShellBagsView while running ProcMon and log all the interactions with the registry.
To do it, not programatically you can follow these instructions:
https://superuser.com/a/1481763/1043059

Windows 10 - Taskbar - Add item to context menu for each program

I need a context menu entry for each program in the taskbar. Want to add an entry which immediately terminates (UNIX/Linux-like signal SIGKILL) the process. There a lot of questions on this site, how it's done for the explorer or desktop. But is it also possible to add such an option to the context menu of the taskbar?
To clarify the question, according to my comments:
The current problem:
I have a program (not Firefox) which randomly crashes. The program is in fullscreen mode. But if I want to close the window of the program with Exit window, it takes a long time that Windows kill the program. When I try to open the Task Manager the program immediately grabs the user input and I have no chance to interact with the Task Manager. So my solution was to add a context menu item in the taskbar to quit the task of the program. According to a user comment, I test the option "Always on top" in the Task Manager. Didn't know that. But I haven't tried it yet. I'm also interested for further projects, if there is a function in WINAPI or Windows Registry to add an item.
To avoid down-votes:
I'm not interested to hack Windows or the application. Solutions with code injection are taboo for me. Want a clean solution, if even possible. I want improve my Windows version. Adding also some additional information (process information) in the context menu.
Have currently found this (Registering shell extension handlers).
Has anybody used this before? I think it's sound promising.
There is no API to extend this menu like that. Applications can customize the top of the menu with ICustomDestinationList but there is no way to add entries for all applications.
For a personal use project, you could inject a .dll in the taskbar instance of Explorer.exe and add your item after figuring out the address of the function where the menu is created. This address can of course change after you upgrade Windows so it is not a very generic solution. Using the public symbols might help but you still have to expect it to break from time to time when Microsoft changes part of their taskbar code.
You don't need to change code in explorer.exe, because you can close a program by doing the keyboard shortcut: Alt + F4.

Qt global shortcut extension hijacks shortcut

I am using this Qt extension that enables global short cuts (hotkeys) https://github.com/falceeffect/UGlobalHotkey
It works great, however if e.g. you enable the shortcut 'Ctrl+S' (Cmd+S on OSX) - the usual Save shortcut, and run this extension, it will hijack the shortcut and whatever application (Word/Sublime etc) you have in focus never receives the shortcut - EVEN WHEN the Qt app is NOT the focus.
My question(s) is/are:
how can an application take such control of a shortcut like this? Surely thats almost a vulnerability?
Can I 'pass' the shortcut back to the OS or to any other app that is in focus?
What order do shortcuts get registered?
My goal is to just passively recognise that Ctrl+S (Cmd+S on OSX) has been hit, but not hijack it in it's entirety
Alas this can't be done due to limitations of the OS
https://github.com/Skycoder42/QHotkey#known-limitations

Keyboard shortcut to cleanup code in WebStorm

What is the keyboard shortcut to cleanup code in IntelliJ WebStorm?
I keep getting the "Unterminated statement" warning and have to select "cleanup code" option every time to fix it. Is there a keyboard shortcut for the same?
If you double-click shift it will open a search-all window, where you can type literally anything, and it will search IDE options, files, symbols, etc.
Do that and type in 'cleanup code', see what happens. On the right side, there should be a keyboard shortcut. If there isn't any, you can assign it with settings windows.