Jump to content

MSVC++ .NET 2003 IDE Setup


n4gix

Recommended Posts

The goal of this brief tutorial is to explain and illustrate my method of setting up and using the MSVC++ .NET 2003 Integrated Development Environment. It is by no means necessarily the best way, but it is one which has proven itself to me as at least an organized method... ;)

 

After installing MSVC++ .NET 2003, you will need to set up some Project folders. My way of organizing things is shown in the picture below:

 

http://img369.imageshack.us/img369/366/msvcplusnet20030000020vz.jpg

 

Now, start Visual Studio and we will begin the process of setting up a New Gauge Project.

 

http://img53.imageshack.us/img53/418/msvcplusnet20030000016rk.jpg

 

The "New Project" dialog will open up. As show by the arrows, choose "Win32", "Win32 Console Project" and finally, enter in the name of your New Project Subfolder, which in this case is "MyNewGauge." Click on OK to continue.

 

http://img307.imageshack.us/img307/9494/msvcplusnet20030000039bx.jpg

 

Enter the settings indicated in steps 1 through 4 below:

 

http://img190.imageshack.us/img190/5931/msvcplusnet20030000056qu.jpg

 

After a few moments, you will be rewarded with the scene illustrated below. You now have an "Empty Project" ready to build your gauge! Of course, there's more to come, but these are the basic steps to "getting ready to get started..." ;)

 

http://img319.imageshack.us/img319/5350/msvcplusnet20030000064hm.jpg

Bill Leaming http://smileys.sur-la-toile.com/repository/Combat/0054.gif

Gauge Programming - 3d Modeling Military Visualizations

Flightsim.com Panels & Gauges Forum Moderator

Flightsim Rig: Intel Core i7-2600K - 8GB DDR3 1333 - EVGA GTX770 4GB - Win7 64bit Home Premium

Development Rig1: Intel Core i7-3770k - 16GB DDR3 - Dual Radeon HD7770 SLI 1GB - Win7 64bit Professional

Development Rig2: Intel Core i7-860 - 8GB DDR3 Corsair - GeForce GTS240 1GB - Win7 64bit Home Premium

NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...

Link to comment
Share on other sites

All gauges consists of at least three files:

1) The .c file (main entry code)

2) The .h file (header information)

3) The .rc file (resource control)

 

If you are going to build a mult-gauge, then there will be additional files needed, which contain the C code for each subgauge to be created. I'm going to use the output files from Easy Gauge here for illustration, but the principles remain the same regardless of whether you use EG or "hand rolling" to create your gauges.

 

In the illustration below, I've shown how I've placed the three files listed above, plus the xxxG.c file (which is the subgauge's actual code) in the "MyNewGauge" subfolder.

 

The "bitmaps" have been placed in a common \res subfolder to keep my workspace organized and uncluttered.

 

http://img262.imageshack.us/img262/408/msvcplusnet20030000085fu.jpg[/url]

 

Now, I need to "load" each of the files into the appropriate areas of the MSVC++ IDE Project box. Right-click on the entry to bring up the options menu:

 

http://img220.imageshack.us/img220/8616/msvcplusnet20030000096vu.jpg

 

Using the same "pattern," I will load the remaining files into the proper areas. As shown below, a "special thing" must be done to the xxxG.c file, since it is called as an #include file in the .c file. We must "right click" on the filename, and perform steps 1 through 4 as shown below, to explicity "Exclude" this file from the compiling process:

 

http://img106.imageshack.us/img106/8640/msvcplusnet20030000029by.jpg

 

Now, it isn't strictly necessary to even list the xxxG.c file in the IDE's listing window, but it is convenient since all you need to do is "double click" on the filename to open the file in the Editing Window! It's all a matter of choice... ;)

 

Continued in Part #3 to follow.

Bill Leaming http://smileys.sur-la-toile.com/repository/Combat/0054.gif

Gauge Programming - 3d Modeling Military Visualizations

Flightsim.com Panels & Gauges Forum Moderator

Flightsim Rig: Intel Core i7-2600K - 8GB DDR3 1333 - EVGA GTX770 4GB - Win7 64bit Home Premium

Development Rig1: Intel Core i7-3770k - 16GB DDR3 - Dual Radeon HD7770 SLI 1GB - Win7 64bit Professional

Development Rig2: Intel Core i7-860 - 8GB DDR3 Corsair - GeForce GTS240 1GB - Win7 64bit Home Premium

NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...

Link to comment
Share on other sites

In the picture below, I have the .c file open for editing. I've changed the line pointed to by the arrow to name my "fs9gauges.h" file that I have in the \inc folder of the Visual Studio compiler.

 

http://img326.imageshack.us/img326/9165/msvcplusnet20030000108rn.jpg

 

Next, I've opened the .h file and have renumbered my resource numbers for a more logical increment of 0010, rather than the 0100 EG uses by default.

 

http://img401.imageshack.us/img401/5647/msvcplusnet20030000119yv.jpg

 

The .rc file is a bit "tricker" to open in the editor. Instead of "double-clicking," you need to "right-click" and choose "Open with Text Editor" from the options, otherwise you will get into a strange WYSIWYG "Graphical Editor" which is a royal pain... ;)

 

Once opened, edit each of the lines indicated to point to the \res subfolder where your bitmaps have been placed. Edit the information about your gauge project as shown in the middle part of the file as desired.

http://img371.imageshack.us/img371/5995/msvcplusnet20030000121as.jpg

 

Now, we need to finish configuring our Project before we can compile this gauge for the first time.

 

Point to the Project Name (#1 below) and Right-Click. Choose Properties (#2 below) to open the Properties Dialog:

 

http://img247.imageshack.us/img247/9704/msvcplusnet20030000139xc.jpg

 

Next, open the C/C++ Code Generation (#3 below) and choose either /MT or /MTd as the type of build from the Runtime Library:

 

http://img129.imageshack.us/img129/4800/msvcplusnet20030000136ne.jpg

Finally, open the Linker General dialog and enter your gauge name as shown in steps #5 and #6 below:

 

http://img366.imageshack.us/img366/3117/msvcplusnet20030000111nz.jpg

 

Assuming that you're only going to create a "stand alone gauge" for the moment, we are now ready to Build our first gauge!

 

If you intend to build a "multi-gauge," then there's a bit more work to do, but that will be the topic of the next tutorial.

 

So, I confidently press the Build/Build MyNewGauge buttons on the top menu bar. What's this? I have an error! Oops!

 

http://img12.imageshack.us/img12/2139/msvcplusnet20030000123yc.jpg

Actually, I knew that was going to happen! I just wanted to show how neat the 'error trapping' is with this IDE, and how to quickly locate and "fix" the error.

 

Now, I confidently click the Build/Build MyNewGauge buttons again. OK! I now have a compiled MyNewGauge.gau file waiting in the \Debug folder, just waiting for me to copy it to FS9 and give it a test!

 

In the next installment of this tutorial series, I'll show how to modify the file(s) to allow us to build multi-gauges! Stay tuned to this forum! ;)

Bill Leaming http://smileys.sur-la-toile.com/repository/Combat/0054.gif

Gauge Programming - 3d Modeling Military Visualizations

Flightsim.com Panels & Gauges Forum Moderator

Flightsim Rig: Intel Core i7-2600K - 8GB DDR3 1333 - EVGA GTX770 4GB - Win7 64bit Home Premium

Development Rig1: Intel Core i7-3770k - 16GB DDR3 - Dual Radeon HD7770 SLI 1GB - Win7 64bit Professional

Development Rig2: Intel Core i7-860 - 8GB DDR3 Corsair - GeForce GTS240 1GB - Win7 64bit Home Premium

NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...