Sign in to follow this  

displaying images without a window

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

This topic is 3847 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.

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