February 24, 201610 yr Commercial Member I've taken the plunge to learn C++ gauge development. Note that I'm not new to C++; I'm just new Visual Studio and the way gauges are built. Here's what's troubling me. I've downloaded the ESP GDI+ sample starter gauge, but I simply cannot find where the bitmaps are being called. In the root project folder, there is a folder called "res". Inside the res folder, I see: gauge_background.bmp HeadingArrow.bmp HeadingBackground.bmp However, in the code, I only see: Gdiplus::Bitmap* mBackgroundBitmap; // Image used for the background of our 'heading' component Gdiplus::Image* mArrowBitmap; // Image used as the indicator for our 'heading' component But digging around the code, there is nowhere that points mArrowBitmap to the HeadingArrow.bmp bitmap. How will Visual Studio know it should use HeadingArrow.bmp when there aren't anywhere in the code that states mArrowBitmap = HeadingArrow.bmp? Is this all done in the file called GDIPlus_GaugeRes.rc? Because the .rc is the only file my Visual Studio express will not allow me to open. Thanks in advance, TFDi Design
February 24, 201610 yr Commercial Member Go study the SDK on how a gauge is defined using the gauge macros. You're missing a ton of information. Also look at the header files, where there's even more defined. Ed Wilson Mindstar AviationMy Playland - I69
February 24, 201610 yr Author Commercial Member Thanks Ed. I went through the ESP guide and turns out yup, the resource bitmaps are defined in the .rc file. Well, now I gotta find a way to open .rc files; Visual Studio tells me I need to pay in order to edit them TFDi Design
February 24, 201610 yr Commercial Member An .rc file is a text file. If you need proof... load one into notepad. Also, be careful... ESP is not FSX. Ed Wilson Mindstar AviationMy Playland - I69
February 24, 201610 yr Moderator Thanks Ed. I went through the ESP guide and turns out yup, the resource bitmaps are defined in the .rc file. Well, now I gotta find a way to open .rc files; Visual Studio tells me I need to pay in order to edit them Right-click on the .rc in the Solution Explorer window and Open in Text mode. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
February 25, 201610 yr Author Commercial Member Ah got it working and I see the linking of the bitmaps in the .rc file. Thanks Bill, thanks again Ed. And yup I know ESP != FSX. I am using the P3D SDK, but since it's originally ESP I thought I'd look at those examples from Microsoft's website with the C++ gauge tutorial. TFDi Design
February 25, 201610 yr What's the reason for using Visual Studio Express instead of Community Edition? The Community edition seems much more capable. Barry Friedman
February 25, 201610 yr Author Commercial Member I haven't experimented with Community Edition; I've used VS2013 with C# for a bit last year, so that was my go-to Visual Studio when I decided to try gauge development. I'll download CE and give it a shot. Hopefully my GDI+ gauge originally built for VS2010 still runs... Creating a backup now B) TFDi Design
February 27, 201610 yr Commercial Member This should give you a head start on C++ gauges: http://library.avsim.net/search.php?SearchTerm=sd2gau35.zip&CatID=root&Go=Search Doesn't deal with GDI+ though. Maybe one day if we get lucky :smile:
Create an account or sign in to comment