Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Slyxsith

GUI question

This topic is 5818 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Pardon my ignorance but with a C++ prog can I just use standard image files and call them up for use in a GUI? eaxmple: Can I create buttons and backgrounds etc and then write a menu app that actually just calls my JPGs etc and writes them in locations and windows? Can you stretch-to-fill with images from inside teh C++ app or do the backgrounds have to be the size of the "window"? Again please excuse my ignorance Im not a coder. (what was your first clue? ) Thank you in advance for your suggestions. Mark M

Share this post


Link to post
Share on other sites
Advertisement
You will need a function to be able load the images. You can download libraries that will do this, such as DevIL or whatever.

However, these libraries will need to be compatible with the code used to draw the images. (There is no inbuilt graphics functionality in C++.) If you just use DirectDraw or something, code will have to be written to put the image into a DirectDraw Surface first.

And whether you can stretch them or not when drawing depends upon the graphics functions/library you use. Generally it''s best to create them at the appropriate size because most drawing functions do not support "stretch blits", as they are called, and even those that do will do it slowly as it''s a processor intensive operation to do it well.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]

Share this post


Link to post
Share on other sites
Thanks Kylo you are my new best friend.

Excellent description of the issue. So as long as I have the correct draw libraries I''m set. I''ll probably get the DirectDraw working first and worry about openGL later. But again thats the noob in me speaking and when I get a coder to help on this project they''ll probably tell me all sorts of better ways to do it =)

Really appreciate everyones input. It helps a bunch.

Mark M.

PS: If you are bored for the next 20 months Kylo feel free to give me a hollar. You work for free right?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!