GDI+ Gauges Tutorial

mendiola_loyola

Resource contributor
#21
I have quite a bit of information available as "sticky posts" in my forum at http://flightsim.com "Panel and Gauges" as well as my Wiki page...

http://forums.flightsim.com/fswiki/index.php/Category:Panel_&_Gauge_Design

I noticed from looking through your makefile that you are compiling the SDK example gauges. I actually had created a VS 2005 "Solution" for that several years ago, and made it available on request.

I also have a C++/GDI+ template "Solution" available on request to me at n4gix@comcast.net...

I make no pretense that it's the only -or even the best!- approach to the subject, but it has the advantage of being well-structured and gives beginners a place to start... :D

Dear Bill:

Could you give me your solution for the C++/GDI+ template, please?

Do you know how to smooth the slider movement, I have a glide slope (slider) that moves making small jumps.

Do you know a good website to upload my Russian gauges?

email: mendiola_loyola@yahoo.com
alfredo.mendiola@nextel.com.pe

***********************



//Slideres

MAKE_SLIDER //ILS

(

cs_adi_slider_horizontal,

BMP_ADI_VERT_MARK,

adi_missing_vertical_icon_list,

0,

IMAGE_USE_ERASE | IMAGE_USE_TRANSPARENCY,

0,

175,62,

//176,62,

VOR1_NEEDLE, NULL, 0.38, //Hace el papel del ILS

MODULE_VAR_NONE, NULL, 0

)



MAKE_SLIDER //ILS Glide Slope

(

cs_adi_slider_vertical,

BMP_ADI_HORI_MARK,

adi_missing_vertical_icon_list,

0,

IMAGE_USE_ERASE | IMAGE_USE_TRANSPARENCY,

0,

//36,193,

36,194,

MODULE_VAR_NONE, NULL, 0,

VOR1_GS_NEEDLE, NULL, 0.4 //Hace el papel del ILS

)



MAKE_SLIDER //Glide Slope

(

cs_adi_slider_glide_slope,

BMP_ADI_GLIDE_SLOPE,

adi_missing_vertical_icon_list,

0,

IMAGE_USE_ERASE | IMAGE_USE_TRANSPARENCY,

0,

125,193,

MODULE_VAR_NONE, NULL, 0,

VOR1_GS_NEEDLE, NULL, 0.4 //Hace el papel del ILS

)



PELEMENT_HEADER cs_adi_sliders_list[] =

{

&cs_adi_slider_vertical.header,

&cs_adi_slider_horizontal.header,

&cs_adi_slider_glide_slope.header,

NULL

};



********************************





Thanks.

Alfredo Mendiola Loyola

Lima, Perú
 

n4gix

Resource contributor
#22
GDI+ Project Template sent via email.

When dealing with bitmaps, the smoothness of movement is proportional to overall size of the gauge's background.

Keep in mind that by their nature, bitmaps may only be shifted in position by one pixel increments... ;)

So, if you need to shift a horizontal line vertically between a range of +/- 127, then you will require at least 254 pixels in the y axis for a 1:1 movement...
 
Top