![]() |
| ||
| Screen Capture Program I am creating this simple program that will capture screen shots. I want to make it so the name of the image that is saved is what the user enters into a text field before the picture is taken. and if at all possible is there a way to make this window pop up above the game screen when a key combination is pressed? thanks! this is the code i have so far btw. #include<iostream> |
| ||
| Re: Screen Capture Program If all you want to do is let allow the user to input the bitmap name, use std::cin to get the name, and strcat ".bmp" on the end. Change your main code like this: int main() {>if at all possible is there a way to make this window pop up above the game screen when a key combination is pressed? Not quite sure what you mean by this. |
| ||
| Re: Screen Capture Program Since this program is a anti-cheat parameter for the league, the picture wont be needed till once the player is in game. so once in game i would like the players to push lets say Shift+Alt+S to bring up the console app over top the game. Then once the picture is taken and saved then push Shift+Alt+S to minimize the console behind the top screen again. |
| ||
| Re: Screen Capture Program Okay, that's tricky but possible. In this small example, I check to see if those keys are down. If they are down, it will toggle the windows visibility. I tried using windows hooks to give this example, but I couldn't set the hook without having a hInstance, so I tried this alternative method which works on console windows. #define _WIN32_WINNT 0x0500Whether or not ShowWindow will be enough to bring the console window in front of the game, I don't know, but that would be the next stage if the above doesn't work. Hope this helps. Code tags don't seem to work correctly, and can't get the C++ syntax, not sure why. |
| ||
| Re: Screen Capture Program Alright. So i havent compiled any programs for a while and im compiling this using the Microsoft Visual C++ Toolkit 2003. When i click build it gives me an error saying: Quote:
|
| ||
| Hello, I'm trying to use the code in the first post to capture a smaller area than the whole screen. I have a point that is at the center of the area I need to capture. In my main() function I call ScreenCapture(xPos - 25, yPos - 25, 50, 50, "image.bmp"), where xPos is the x-position of the center and yPos is the y-position of the center point. Everything is running OK, but the saved image is black. It has the right size, but it's black. What am I doing wrong? Thanx! |
| ||
| Quote:
|
| ||
| Quote:
|
| All times are GMT -4. The time now is 12:44 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC