/*----------------------------------------
BRICKS1.C -- LoadBitmap Demonstration
(c) Charles Petzold, 1998
----------------------------------------*/
#include <windows.h>
#include <vector>
#include <TCHAR.H>
#include <stdio.h>
//#include "MyBitmap.h"
#include <windows.h>
#include <TCHAR.H>
#include <stdio.h>
#include <iostream>
#include <string>
#include <atltrace.h>
using namespace std;
//
class Intercept
{
public:
//初始化 传入窗口句柄
Intercept(HWND hwnd1,HWND hwnd2)
:m_hSrcWnd(hwnd1),m_hDestWnd(hwnd2)
{
}
//根据句柄获得窗口DC
HDC GetWindowsDC(HWND hwnd)
{
return ::GetDC(hwnd);
}
//获得源窗口的宽
void GetWindowsWidth()
{
::RECT rect;
::GetWindowRect(m_hSrcWnd,&rect);
m_nCxWnd = rect.right - rect.left;
}
//获得源窗口的高
void GetWindowHeigh()
{
::RECT rect;
::GetWindowRect(m_hSrcWnd,&rect);
m_nCyWnd = rect.bottom - rect.top;
}
//将源窗口画到目标窗口
void BitBltP
windows 截屏api
最新推荐文章于 2025-03-09 23:24:59 发布