首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

[] 摄像头控制MFC程序,怎么调整显示的分辨率

2012-02-15 
[求助] 摄像头控制MFC程序,如何调整显示的分辨率?自定义了一个对话框程序,中间留出一显示视频的区域,可是

[求助] 摄像头控制MFC程序,如何调整显示的分辨率?
自定义了一个对话框程序,中间留出一显示视频的区域,可是区域太小,只能显示一部分视频,请教一下如何在有限的区域中将全部视频都显示出来.也就是显示的按比例缩小???

[解决办法]
ChangeDisplaySettings
[解决办法]
StretchDIBits
The StretchDIBits function copies the color data for a rectangle of pixels in a device-independent bitmap (DIB) to the specified destination rectangle. If the destination rectangle is larger than the source rectangle, this function stretches the rows and columns of color data to fit the destination rectangle. If the destination rectangle is smaller than the source rectangle, this function compresses the rows and columns by using the specified raster operation.

int StretchDIBits(
HDC hdc, // handle to device context
int XDest, // x-coordinate of upper-left corner of dest. rectangle
int YDest, // y-coordinate of upper-left corner of dest. rectangle
int nDestWidth, // width of destination rectangle
int nDestHeight, // height of destination rectangle
int XSrc, // x-coordinate of upper-left corner of source rectangle
int YSrc, // y-coordinate of upper-left corner of source rectangle
int nSrcWidth, // width of source rectangle
int nSrcHeight, // height of source rectangle
CONST VOID *lpBits, // address of bitmap bits
CONST BITMAPINFO *lpBitsInfo, // address of bitmap data
UINT iUsage, // usage flags
DWORD dwRop // raster operation code
);

热点排行