Sign in to follow this  
dragonflightdesign

Visual Studio 2015CE mouse flag warnings

Recommended Posts

Got me beat, this one. I've just loaded a VS2013 project (that started in VS2010) into VS2015 and the mouse rect info in all source code files is now showing a


"Warning    C4838    conversion from 'unsigned int' to 'FLAGS' requires a narrowing conversion"

e.g.

MOUSE_BEGIN( captinstr_light_mouse_rect, 0, 0, 0 )
    MOUSE_PARENT_BEGIN( 0, 0, 64, 64, 0)
        MOUSE_TOOLTIP_STRING(DFD_CPTINST)
    MOUSE_PARENT_END
    MOUSE_CHILD_FUNCT( 0, 0, 64, 64, CURSOR_HAND, MOUSE_LEFTSINGLE | MOUSE_RIGHTSINGLE, captinstr_light_mcb)
MOUSE_END

I know VS2015 has much higher security on it and I know that because I'm aware what the narrowing conversion actually is I can ignore the warnings, but I'd like to get rid of them. Or go back to VS2013 :biggrin:

-Dai

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Huh. It's gone away. Then it came back, now it's gone away again (hopefully this time permanently). I have no idea what I did.

Share this post


Link to post
Share on other sites

Strange, Dai! Just out of curiosity, why the move to 2015? I'm still using 2005 and cannot convince myself that there's any real advantage to upgrading.

Share this post


Link to post
Share on other sites

Hello Bill

Weelll.... something to do with work. If I work from home and just in case I don't have my work laptop with me, my own PC has to be loaded with various installations of various developer programs, Visual Studio 2015 CE being one of them. I figured it would be beneficial to upgrade most of my FS projects so that I could remove older versions of VS and clean up the HDD.

If it was up to me, the last version of VS I paid for (as an MSDNAA as it happened) was VS2008 and I'd still be there, because, like you, I had no real need to upgrade.

-Dai

 

Share this post


Link to post
Share on other sites

Oddly enough Dai, I've used VS2005 these past six or so years mostly for XML gauge scripting... Even though Notepad++ is a superior XML editor, I really like the fact that I can have multiple XML, text, and so forth open in tabs at the same time. It sure makes copy/pasting quick and painless.

Share this post


Link to post
Share on other sites

Finally go the answer to this one, but not the answer to the overall problem - yet. I was right in suspecting VS2015's security as the culprit: on the VS2015 menu go to

Project | [project] property pages

Under Configuration | General | Platform Toolset

If set to "Visual Studio 2015 (v140)" you'll get the errors: if set to "Visual Studio 2013 (v120)" you don't get the errors. Not sure where to go next but Prepar3D v4 requires the V140 toolset. Oh - and the gauges.h file supplied with the Prepar3D SDK is still the original and uncorrected Microsoft FSX SDK offering with added Prepar3D bits.

I wonder if I'll get a response on the Prepar3D forums... :)

Share this post


Link to post
Share on other sites
18 hours ago, dragonflightdesign said:

Oh - and the gauges.h file supplied with the Prepar3D SDK is still the original and uncorrected Microsoft FSX SDK offering with added Prepar3D bits.

I wonder if I'll get a response on the Prepar3D forums... :)

Oh dear. I was wondering about that. All those lovely "corrections & improvements" that have been made over the years by Arne and others will have to be added back to L-M's gauges.h file, and both bloody versions to boot? Argh!

Share this post


Link to post
Share on other sites

I've already done it Bill. Better still, it seems that FSX projects will compile and run with the updated P3Dv4gauges.h file, provided that you don't try to use the P3D-specific stuff. I did it by accident! However, I'm reluctant to announce that the P3D gauges.h file 'iz wrong and I haz the propr one' when I've only made two posts on the P3D forums.

-Dai

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this