摘要: 这段代码是网上找来的,自己消化精简了一下。void CaptureWindow(HWND hwnd){ //获取窗口的width和height RECT rect; GetWindowRect(hwnd,&rect); //这个函数得到的是整个窗口的Rect,包括非客户区,而近要得到客户区的rect,请使用GetClientRect DWORD width =rect.right-rect.left; DWORD height =rect.bottom-rect.top; //获取窗口的DC HDC hdc = GetWindowDC(hwnd); //如果这里用GetDC(hwnd) 阅读全文
posted @ 2012-08-27 09:19 shremie 阅读(2663) 评论(0) 推荐(0)