Jump to content
  • Advertisement
Sign in to follow this  
sir-jj

displaying images without a window

This topic is 4061 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

im using dev-C++ 4.9.9.2 and id like to know if there is any pice of code that, i can put in the top of my main code, that allows me to put another peice of code, that when it is reached puts a jpeg/bmp image on the screen without a window at a set location on the screen and have it set to background forground or middle, so you know what images will apear over others and give it a name so that if an image is opened and given the same name it will overwrite it but the same image can be opend twice if they are given diferent names

Share this post


Link to post
Share on other sites
Advertisement
Sentences man! Making your post easier to read will pay out: more people are likely to reply.

To answer your question, there is no way of doing this in C++ without help from an external library.

Most libraries that can create a window can create one without a title bar, close button etc. If you fill such a window with an image you get a "floating image box", which sounds like what you want. Handling names will probably have to be done yourself but in C++ its quite easy using an associative container such as std::map to allow you to select a window given a name.

Share this post


Link to post
Share on other sites
I totally agree with rip-off about the "sentences".
I'm not sure I understood what you need, but if you want to draw "directly on the screen" (without creating a window), under win32 platform you can use
HDC hdc = CreateDC("DISPLAY", NULL, NULL, NULL); to get a dc for the screen and then draw on that.

If you just want to change the wallpaper (again, on WIN32), there is an api function for that (search msdn for SystemParametersInfo).

No idea how that is done (no idea if possible either) on linux.

Also, the method with drawing directly on screen is a bit of a 'hack' (and it's not going to look nice when other windows refresh themselves :D), either do a full-screen app or a windowed app, that's how people are used to "use" those windows thinggies ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!