Results 1 to 3 of 3

Thread: MSVC++ .NET 2003 IDE Setup

  1. #1
    Join Date
    Mar 2005
    Location
    Hammond, IN USA
    Posts
    4,796

    Default MSVC++ .NET 2003 IDE Setup

    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:



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



    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.



    Enter the settings indicated in steps 1 through 4 below:



    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..." ;)

    Last edited by n4gix; 12-22-2007 at 11:39 AM.
    Bill Leaming
    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...

  2. #2
    Join Date
    Mar 2005
    Location
    Hammond, IN USA
    Posts
    4,796

    Default MSVC++ .NET 2003 IDE Setup (Part #2)

    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.



    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:



    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:



    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.
    Last edited by n4gix; 12-15-2008 at 02:44 PM.
    Bill Leaming
    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...

  3. #3
    Join Date
    Mar 2005
    Location
    Hammond, IN USA
    Posts
    4,796

    Default MSVC++ .NET 2003 IDE Setup (Part #3)

    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.



    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.



    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.


    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:



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


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



    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!


    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! ;)
    Last edited by n4gix; 01-21-2011 at 02:47 PM.
    Bill Leaming
    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...

Similar Threads

  1. Using GaugeSound.dll with MSVC++ .NET (all editions)
    By n4gix in forum Panel & Gauge Design
    Replies: 0
    Last Post: 05-13-2008, 02:03 PM
  2. MSVC++2005 Express Edition
    By wsieffert in forum Panel & Gauge Design
    Replies: 1
    Last Post: 09-18-2006, 07:01 AM
  3. Easter 2003 Competition (GJSmith.net)
    By GarryJSmith in forum FS2002
    Replies: 8
    Last Post: 04-20-2003, 10:44 AM
  4. Round IDE Cables
    By tjkotula in forum FS2002
    Replies: 7
    Last Post: 02-07-2003, 09:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •