displaying images without a window
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
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.
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.
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 ;)
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 ;)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement