如何在屏幕上创建一个对任何类型的屏幕捕获(打印屏幕或应用程序)都不可见的矩形?
通过在屏幕上创建一个矩形,我的意思是这样的:
#include <Windows.h>
#include <iostream>
void drawRect(){
HDC screenDC = ::GetDC(0);
::Rectangle(screenDC, 200, 200, 300, 300);
::ReleaseDC(0, screenDC);
}
int main(void){
char c;
std::cin >> c;
if (c == 'd') drawRect();
std::cin >> c;
return 0;
}
我在 Windows XP 上使用 Visual Studio 2010