Microsoft Visual C++ 2012: cannot find basic stuff - c++

Being new to Microsoft Visual Studio Ultimate 2012, I cannot find some basic things that I usually take for granted. It must be my fault for sure.
How can I have multiple views of the same file? So far I have been able to split the file window vertically, but just once.
Can I split it horizontally?
Can I split it more than once?
Can I just have the same file in multiple windows?
Can I do some refactoring?
Can I set bookmarks, to jump back and forth in the code?
Can I have a list of bookmarks/breakpoints?

To have multiple view of the same file go to the Window meni and select New Window This will show the file in multiple windows, which you'll be able to split.
For bookmarking go to the Edit menu and look at the Bookmark sub-menu near the bottom. It's got all the options you need for manipulating bookmarks.
For breakpoints go to the Debug menu, select the Windows sub-menu and pick the Breakpoints menu. It will display an window that allows you to manage all the breakpoint in the project you're working on.
To refactor just right-click in any file and you'll see a Refactor sub-menu that has a list of refactor actions.

Related

In Visual C++ 2017: Where in the property pages does it say what Application Types correspond to the projets?

I am trying to recreate a Visual C++ Solution that had about 30 projects so that the general organization will be cleaner.
The original "solution" was in fact a Visual C++ 6 workspace from the turn of the century, migrated into VS 2017.
Some of the projects will be close to being clones of the old ones.
When I try to create a project, I am asked what Application Type it must be:
Single Document/Multiple document/Dialog based or Multiple top level documents.
I thought I could guess this by looking at the property pages of the existing documents, but I can't seem to find it. Or am I likely to be going in the wrong direction?
As far as I'm concerned, we couldn't guess this by looking at the property pages of the existing documents. I suggest that you could check MainFrm.cpp in the project source file to distinguish the project from a single document / multiple documents / dialog based or multiple top-level documents.
A multiple documents:the document's frame window can hold multiple child windows.
IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWndEx)
A single document:the document's frame window can hold only one document.
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWndEx)
dialog based: There is no MainFrm.cpp in the source file.
multiple top-level documents:Creates a multiple top-level architecture for your application, where a view class is based on CView.
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWndEx)
clicks New Frame on the File menu:
For more details, I suggest you could refer to the Application Type, MFC Application Wizard

Is there any sort of "Codelet Template" in KDevelop?

Everytime I need to input a piece of code such as "switch .. case" or "declaring a class", I desire a way I can rapidly achieve it by hitting a shortcut.
In many IDEs, we can do it by pressing some shortcut keys, and IDEs will paste a little piece of pre-defined code at the position of the focuse.
Is there any similar way in KDevelop?
I'm not meaning the File/Project Templates here.
Thanks!
Yes, use the 'Snippets' plugin distributed with Kate.
Install the Kate editor. Several of the plugins included can also be used in KDevelop; there's been some discussion of distributing those separately but it hasn't happened yet.
In KDevelop, use the menu Window -> Add Tool View and select 'Snippets'.
There will be a 'Snippets' toolview. Click on entries to paste them, or you can bind a shortcut. You can add new entries and categories.

How to Make the Open recent do-files list longer

If one goes to the File menu of the Do-file Editor window of Stata, one sees that one of the options is Open recent do-files. Is it possible to control how many entries appear in this list? I would like to see more than the 10 that are currently there.
Within Stata, I looked in Preferences
General Preferences - Windows - Do-file Editor
in both General and Advanced and did not see a place to control this.
This question is somewhat related to the one here
This seems to be a question regarding the macOS rather than Stata. If you open up the System Preferences in you mac and navigate to the General options, you will see an option with a line starting "Recent Items: " As in the screen shot below.
If you change that setting and relaunch Stata it should work.
Unfortunately, I don't know how to do this in a Windows environment.

How do you change your app icon in visual studio 2013?

I'm new to visual studios and I just created this very short calculator and I want to put it on mediafire for people to download but I wanted to change the icon..
I've heard that you select your app in solution explorer and Project>Properties
But my properties menu seems different.
It saids calculator property pages.
It doesnt have the tabs like ~Publish~ or ~Applications~ where people said you change your icon.
My properties is like this:
Configuration: Active(Debug)
and some other stuff below it some complicated stuff(to me)
Why doesnt mine have what other people have? I just want to share my first ever app with a custom icon. Help please, will appreciate it.
Create a text file, rename it res.rc, edit it to contain the line:
201 ICON "myicon.ico"
Add that file to your project. The file myicon.ico must exists.
Note: This is a bit hacky, the numerical vaulues should preferably be defined in a header.
You might be confused because Visual Studio supports different languages, and its UI is not consistent across those languages. Since you tagged it C++, the "old" rules apply. An application icon is a so-called resource.
You have to provide an .ico file, and reference it in a .rc file. The resource compiler (RC) compiles it into a .res file, and the linker then adds it to the EXE.
In C++, if you open the form in designer view, the properties window has an icon property that will allow you to browse for the icon of your choice.
Just for reference, i spent two hours trying to change it without any success until i resized the icon, it should be 32x32 and another one for small icon -not sure if its necessary though- with 16x16.
visual studio creates two icons when create the project , one is called small.ico and one is name yourexe.ico, just replace those and make sure to have correct sizes.

C++ - Writing to a specific output window pane in VS2010

I'm trying to write to a custom Output Window Pane, but the only examples that I can find for writing to the output window automatically write to the Debug pane.
I've gotten as far as creating a custom pane with a VS add-in in C#, and writing text to it when VS2010 starts up. I'm working in a C++ project, and I'm just wondering how I can write to my custom pane from anywhere in code. I'd like to do it with as little overhead as possible, because I am working in a larger code base that I don't want to have to heavily modify.
Thanks
The Debug pane shows results of OutputDebugString calls (either direct, or by Debug.WriteLine / Trace.WriteLine) (it serves the same purpose as dbgview.exe from SysInternals). This is default behavior of the IDE. I think, that writing to custom pane may require implementing your own extension for Visual Studio.
As a workaround, you may use dbgview, define specific prefixes (as [MODULE-A]: , [MODULE-B]: etc.) and set filters to highlight occurences of specific words. Note, that dbgview will work properly only if you run your program without the IDE.