Skip to main content

Creating a File

Although the most popular files used in Microsoft Visual C++ are header and source files, this IDE allows you to create various other types of files that are not natively C++ types.
To create a file, if a project is currently opened:
  • On the main menu, click Project -> Add New Item... This would open the New dialog box from where you can select the desired type of file and click Open. By default, the new file would open in the Source Code Editor. If you want to open the file otherwise, after selecting it in the New dialog box, click the arrow of the Open As combo box.
  • In the Solution Explorer or the Class View, right- click the name of the project, position the mouse of Add, and click the option you want

Comments

Popular posts from this blog

Links

Official resources MSDN Visual C++ Home microsoft.public.vc.language The Top CodeGuru CodeProject DeveloperFusion.com C/C++ Users Journal RSDN (RU) First Steps (RU) Sources.ru (RU) Tricks, Tips, FAQs Bjarne Stroustrup's C++ Style and Technique FAQ CodeGuru FAQ C++ FAQ Lite by Marshall Cline CodeProject Forum FAQ Boob Moore's page (Win32, NT, MFC) Edelmiro Fuentes's page http://www.sources.ru/cpp/cpp_vcpp_faq.shtml (RU) Akzhan Site (RU) Forums, newsgroups CodeGuru Forum microsoft.public.vc.language comp.lang.c++ RSDN Forum (RU) Libraries, Components, Add-ons, Add-ins Boost Libraries #1 for C++! TinyXML - light yet powerful XML library. Forget about MSXML! :) Whole Tomato Software: Code syntax highlighting Compuware corporation: BoundsChecker, SoftICE etc. Xtreme ToolkitPro - Industry leading Visual C++ MFC UI controls. STL Error Decryptor UCanCode: XD++ MFC Class Library for Diagrams Regular Expression Library Disk File Sy...

Introduction to Microsoft Visual C++/MFC

Microsoft Visual C++ is a programming environment used to create applications for the Microsoft Windows family of operating systems. To use these lessons, you must have installed either Microsoft Visual Studio 2010. Although Microsoft Visual Studio 2010 Professional provides many programming environments for the price of one, in our lessons, we will use it but we will cover only the Microsoft Foundation Class (MFC) library side. After installing it, to use the programming environment, you must first open it. To do that, you would click Start -> (All) Programs -> Microsoft Visual Studio 2010 -> Microsoft Visual Studio 2010. In our lessons, unless used in code, the -> arrow means an action that should follow another. Based on this: Edit -> Copy means click Edit, then click Copy View -> Toolbars -> Custom means click View position the mouse on Toolbars, and then click Custom To start Microsoft Visual C++ or Visual Studio, on the Taskbar, click Start (All) Prog...

A Window's Instance

When you start an application such as Notepad, you are said to have created an instance of the application. In the same way, when you declare a variable of a class, an instance of the class is created and made available to the project. The WinMain() function also allows you to create an instance of an application, referred to as the hInstance argument of the WinMain() function. The instance is created as an HINSTANCE . The CWinApp class provides a corresponding instance variable called m_hInstance . This variable can let you get a handle to the instance of your application. Alternatively, to get a handle to the instance of your application, you can call the AfxGetInstanceHandle() global function. Its syntax is: HINSTANCE AfxGetInstanceHandle(); Even more, to get a handle to your application, you can call the Win32 API's GetWindowLong() function. Suppose you have opened Notepad to view the source code of an HTML document. This is said that you have an instance of Notepad. Imag...