图像采集到了先,在内存中,怎么显示出来呢?
解决方案 »
- 求助,《数据库原理》教学平台设计
- 对话框属性的语言设置
- 当改变窗口大小的时候 系统会把什么消息放入消息队列吗?
- 二维数组分配空间,元素为变量
- FTP 上传返回错误信息 ERROR_INTERNET_CONNECTION_RESET
- 如何让基于对话框的程序一运行就隐藏?
- 我的一个疑惑:com对象的this指针是怎么存储并传递的呢
- QQ被盗散分,同时寻求一个QQ!
- 超级菜鸟送分……
- 一个画曲线的控件,没有封装打印的功能,有没有办法加上打印和预览?
- VS2008中用ATL设计了一个简单的COM组件,仅仅完成几个简单的算术运算。制作好后该组件不能在其他的计算机上注册,请问为什么,怎么办?
- CDC简单作图函数, 如何才能在边线以内填充颜色?
The SetDIBitsToDevice function sets the pixels in the specified rectangle on the device that is associated with the destination device context using color data from a DIB. Windows 98/Me, Windows 2000/XP: SetDIBitsToDevice has been extended to allow a JPEG or PNG image to be passed as the source image. int SetDIBitsToDevice(
HDC hdc, // handle to DC
int XDest, // x-coord of destination upper-left corner
int YDest, // y-coord of destination upper-left corner
DWORD dwWidth, // source rectangle width
DWORD dwHeight, // source rectangle height
int XSrc, // x-coord of source lower-left corner
int YSrc, // y-coord of source lower-left corner
UINT uStartScan, // first scan line in array
UINT cScanLines, // number of scan lines
CONST VOID *lpvBits, // array of DIB bits
CONST BITMAPINFO *lpbmi, // bitmap information
UINT fuColorUse // RGB or palette indexes
);
Parameters
hdc
[in] Handle to the device context.
XDest
[in] Specifies the x-coordinate, in logical units, of the upper-left corner of the destination rectangle.
YDest
[in] Specifies the y-coordinate, in logical units, of the upper-left corner of the destination rectangle.
dwWidth
[in] Specifies the width, in logical units, of the DIB.
dwHeight
[in] Specifies the height, in logical units, of the DIB.
XSrc
[in] Specifies the x-coordinate, in logical units, of the lower-left corner of the DIB.
YSrc
[in] Specifies the y-coordinate, in logical units, of the lower-left corner of the DIB.
uStartScan
[in] Specifies the starting scan line in the DIB.
cScanLines
[in] Specifies the number of DIB scan lines contained in the array pointed to by the lpvBits parameter.
lpvBits
[in] Pointer to DIB color data stored as an array of bytes. For more information, see the following Res section.
lpbmi
[in] Pointer to a BITMAPINFO structure that contains information about the DIB.
fuColorUse
[in] Specifies whether the bmiColors member of the BITMAPINFO structure contains explicit red, green, blue (RGB) values or indexes into a palette. For more information, see the following Res section.
The fuColorUse parameter must be one of the following values. Value Meaning
DIB_PAL_COLORS The color table consists of an array of 16-bit indexes into the currently selected logical palette.
DIB_RGB_COLORS The color table contains literal RGB values.
Return Values
If the function succeeds, the return value is the number of scan lines set. If the function fails, the return value is zero. Windows NT/2000/XP: To get extended error information, call GetLastError.