Jump to content
Sign in to follow this  
Guest bartels

2 different gdi+ gauges at the same time

Recommended Posts

What advantage would that be?I really can't think of any.


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Our rather large project, an FMS, requires it for OO design reasons, reduces complexity, improves maintainability, improves performance, reduces storage requirments, and allow us to do what we need to do.Anyway, my point was just that if your design calls for static Gdi+ stuff, the technique above won't work, and I wanted to document that fact for those that might otherwise not understand why things weren't working for them as it is not obvious.If you don't see a need for them, by all means reduce your complexity and don't use them.

Share this post


Link to post
Share on other sites

I think ya misunderstood my post.You said "The advantage to having static colors, pens, and brushes made it worthwhile for me to figure out how to do it."I simply wanted to know what advantages were offered using static colors, pens and brushes. Your post nicely explains why you must use them... though... gotta say your post has something amusing in it... and I am NOT pointing this out as a slight or a dig, just a 'ha-ha' funny. ;)In your first sentence you say it 'reduces complexity'... in the last sentence you suggest not using them to 'reduce complexity'. Now I know what you mean... but it's still amusing to my simple little mind. ;)


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Ed,Yeah, I thought you would notice that and not get my context.To be more precise, I should say that it reduces complex in the code (although for me it was complex to figure out initially). It does this the way any static var does, and I won't bother to explain something so basic here (which I'm confident you likely understand anyway). For those who want to know more, I highly recommend working through Headstart Design Patterns (it's in Java, but you can translate), and C++ Primer 5th Edition.And what I'm saying, is that if it only introduces complexity for others because they don't need it, then clearly it is not advantageous.I just prefer coding the way something should be designed (which is not to say that every design should use them), rather than limiting myself because I can't figure out how to do it. But then, with all of us helping each other with how to do things, we can take some of the sting out of learning them. I'm more than willing to share how to do this if someone determines they need them. That's why I posted my singleton class.Perhaps someone will improve upon my start as well. My hope is that Benchmark will soon have a sourceforge site up were some useful classes will be posted for others to use and contribute too.Sorry, I'm just so busy coding that I didn't bother to be more precise.

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...