DevExpress CodeRush: multicursor replacement - replace

In Sublime Text there's a way to highlight all similar strings by setting a cursor to every one of them, and then you can just type something, and this text will be printed in every highlight area. In rus version it's called "multicursor".
Is there something like that in CodeRush?
I know about "Replace all" function in Visual Studio. But this approach is not as convenient as the approach described earlier.

Something like that you can see in Rename feature of CodeRush.
Documentation:
When the Rename is activated, it turns all references to the selected
variable into the linked identifiers.
Linked identifiers are related sections that are kept synchronized. If
you change the text within one of them, all others get updated
accordingly.
There are also the Multi-Select feature which allows you to select separate text blocks by pressing CTRL + ALT + ENTER, but this feature does not allows you to edit every highlight area:

Related

MFC "Hidden" or "Default" Function Key Accelerators?

I have a pretty normal MFC SDI application.
I recently started using things from the new MFC feature pack (eg CMFCToolbar), and after all these changes, I am seeing some unexplained behavior in keyboard shortcuts.
It seems some resource IDs have function key shortcuts (like F6), but I cannot find out how this works, or how to disable it.
For example, if I mouseover ID_ABC in a toolbar, I see a tooltip like:
ABC (F2)
Do ABC action
I don't see VK_F2 anywhere in the accelerator table, or anywhere at all for that matter. I also cannot find (F2) anywhere at all in the solution. This all seems very weird to me. Pressing F2 does indeed do ABC.
If I delete the entire accelerator table, that seems to "fix" the problem, but then of course I have no accelerators. As soon as I add any accelerator back, the problem re-appears.
Usually, when I run into these things, I seem to be on my own, and the cause of the problem is usually "far away", sort of like landing in some random function after a bad memory access, and saying, "why am I here"??
But if anyone knows anything about this, thanks!
Just look into the accelerator table in the resource file of your application. Yes, many standard commands do have accelerator keys assigned (eg Ctlr+S is mapped to the File Save command). You can delete the commands you do not want (individually, not the whole accelerator table). The application "remembering" the old accelerator table assignments (or not working with the new ones) may be due to saving these in the registry. Go there and delete the "Workspace" tree for your application, and then test anew.
Menu item labels must contain the shortcut as well, separated by a tab (eg File &Open\tCtlr+O). Status bar hints and tooltips are created by a string resource, with the same ID as the menu or toolbar item. You can create/edit these in the Menu Editor or the String Table Editor. The two items are separated by a newline character.

MFC: Line control for separating parts of dialog boxes in C++

I am looking for the class name of an MFC Common Control for the caption and line that divide the dialog box into sections: "Section", "Headers and Footers", "Page, and "Preview" in the image below.
It appears that this likely a standard control, but I haven't been able to figure out how to create it so far.
Unless you're dead set on that exact look, this is done with a group box. It will look a little different, as it draws a box all the way around a group, so the result would look something like this:
If you're really set on a line at the top but not bottom or sides, you'll probably have to do that yourself. You'd (at least normally) do this with a custom control. As simple of one as you're looking at here (caption, line, doesn't need to accept any input from the user) that'll be a trivial one to implement, but you'd normally do it as a separate project, then use that in your project.

Paste selection in console based editor

I have written a windows console based text-editor with C & I'm gonna add copy/paste feature to it.
Editor is made up of a doubly-linked list that each structure just contains one letter. editor gets letters, arrow keys, backspace, ... with getch function (which is found in conio.h) & uses their ascii code to recognize them.
when a selection is made and CRTL+C is pressed, the selection is copied to memory but I don't know where to get that copied text.
Hope I cleared the problem,
Thanks.

How to instantly change name of variable for all references in project

I am working on some game in VS10, and I want to change the name of some variable, because I want to expand the game, however there is so much references to it, that I don't know from where to start. Is there any hotkey in VS10 that will do this in a moment for me? I know there is NetBeans hotkey CTRL+H, but this doesn't work for VS10.
First, any variable should always be declared and used in the smallest of scope.
In VS2010, whenever you rename a variable, it will prompt you whether you want all references to this variable is to be so renamed. A little red bar will appear underneath the name where you changed it. Move your mouse to that bar and an icon will appear with "Options to update references to the renamed object". You can choose between renaming all right away or with preview.
(The ability to rename all references to the renamed variable disappears when you go and rename another different variable. Perhaps there is a way to go back to an older rename but I have not found it.)
I tried renaming a public property of a class. The automatic renaming works too for references to that public property, at least when both are within the same code file.
As Retired Ninja said in his comment, you pretty much need add-ons for Visual Studio (like Visual Assist X).
Installing Visual Assist will give you a menu like this:
... where the "Find References" button searches for all references to that variable/function/namespace/etc and replaces it (not just a plain text search).
Other alternative is to open the "Find and Replace" window (press Ctrl+F), and click "Quick Replace". From there you can do a plain text search and replace (there's also wildcard and regex support (under "Find Options->Use:), if that helps).
There is CTRL+H in VS10 too. If you press it on the right side pops out panel which is basically interface for what you want to do about the modification. It has everything included, to modify that name only in the document/s which is/are currently opened, or even in the whole project. Bad thing is that replaces that name with everything it encounters, except for header name. So if I have something like fruit.h and I want to rename it in apple.h, everything will be renamed to apple.h except the name file, so it will throw an exception that aformentioned header couldn't be found.

Paste multi-line text into single-line Edit Box control

My app uses standard single-line Edit Box controls. Is there any way to accept a multi-line "paste", discarding carriage return / linefeeds?
Notes
I don't want to use multi-line controls
My app is VS2010 C++ with WTL (not MFC or ATL)
The reason I want this is because actual input is normally quite short, but could in rare circumstances be hundreds or even thousands of characters. In which case users might well want to build the string using NotePad or whatever, then just cut & paste it in.
This is not possible as the user is pasting himself/herself. An alternative is to use a multi-line Edit Box and displaying all the data into one line by managing the pasted data into OnChange function for your control (basically disregading new lines).