• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX:SE [c++/gdi+] Gauge size incorrect

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Hi,
Those gauges won't leave me alone... For some reason all my GDI+ gauges automatically resized to 256x256 pixels. And I can't seem to find the cause of the issue. I define the size of the gauge in the panel.cfg like this:
gauge03=vega5!manual, 0,45,1920,905

I use the gauge width and height for some resizing in my C++ gauge. To gather that information, I have these lines in the PANEL_POST_INSTALL section:
C++:
mGaugeWidth = element->image_data.final->dim.x;
mGaugeHeight= element->image_data.final->dim.y;

When I debug that section of the code, I read 256x256 for both values, no matter the size of the panel. Any idea where this could be coming from?
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
There's no bitmap and no particular element - the whole gauge is sized to 256x256 with no consideration of the configuration in the panel.cfg. It was working before, now it's not and I really can't reproduce when or where this problem started. At what points is the size of a gauge defined, other than in the panel.cfg and the GAUGE_HEADER_FS1000?
 
Messages
2,077
Country
us-ohio
No... that value you're trying to use is based on the original bitmap size. I ask again, what is the size of the bitmap you're referencing in that element?
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
ooooooooooooooooooooooooooooooooooooooh! I got it! It was pointing to the static element and the static element had no bitmap assigned to (NULL). I assigned a 16x16 bitmap from the resource library and now it's working again. Thanks for your input!
 
Top