如何解决?望高手赐教。
解决方案 »
- #define后面的"\"应该怎么用?
- vc2008操作office2003中excel表格,想读取单元格内容,myRange.get_Value();出错
- 请教关于struct和carray
- c++如何光标放到非顶层窗口
- 如何创建一个控件窗口?
- Unhandled exception in Poepoem.exe :0xC0000005 :Access Violation不知是什么意思
- 我的 CTime怎么不能用了?
- 怎么样把一个图标画到菜单项中。
- A程序要用数字1当热键,B程序要用数字2当热键怎么就不行呢
- 急........excell操作取不到列的数据
- CListView中可以获取用户双击某一个item吗?
- VC++如何以象素为单位设定界面字体以及系统字体大小检测
如果用在工具条上,就必须自己写代码---------
++C++
---------
把你的图片专成BMP 格式。
你可以
1.使用MM_TEXT 模式
2.调用
CDC::SetStretchBltMode(int nStretchMode)
3。如何调用?
int SetStretchBltMode( int nStretchMode );Return ValueThe previous stretching mode. It can be STRETCH_ANDSCANS, STRETCH_DELETESCANS, or STRETCH_ORSCANS.ParametersnStretchModeSpecifies the stretching mode. It can be any of the following values:Value Description
BLACKONWHITE Performs a Boolean AND operation using the color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves black pixels at the expense of white pixels.
COLORONCOLOR Deletes the pixels. This mode deletes all eliminated lines of pixels without trying to preserve their information.
HALFTONE Maps pixels from the source rectangle into blocks of pixels in the destination rectangle. The average color over the destination block of pixels approximates the color of the source pixels.
After setting the HALFTONE stretching mode, an application must call the Win32 function::SetBrushOrgEx to set the brush origin. If it fails to do so, brush misalignment occurs.
STRETCH_ANDSCANS Windows 95: Same as BLACKONWHITE
STRETCH_DELETESCANS Windows 95: Same as COLORONCOLOR
STRETCH_HALFTONE Windows 95: Same as HALFTONE.
STRETCH_ORSCANS Windows 95: Same as WHITEONBLACK
WHITEONBLACK Performs a Boolean OR operation using the color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves white pixels at the expense of black pixels.
ResSets the bitmap-stretching mode for the StretchBlt member function. The bitmap-stretching mode defines how information is removed from bitmaps that are compressed by using the function.The BLACKONWHITE (STRETCH_ANDSCANS) and WHITEONBLACK (STRETCH_ORSCANS) modes are typically used to preserve foreground pixels in monochrome bitmaps. The COLORONCOLOR (STRETCH_DELETESCANS) mode is typically used to preserve color in color bitmaps. The HALFTONE mode requires more processing of the source image than the other three modes; it is slower than the others, but produces higher quality images. Also note that SetBrushOrgEx must be called after setting the HALFTONE mode to avoid brush misalignment. Additional stretching modes might also be available depending on the capabilities of the device driver.CDC Overview | Class Members | Hierarchy ChartSee Also CDC::GetStretchBltMode, CDC::StretchBlt,::SetStretchBltMode
--------------------------------------------------------------------------------
Send feedback to MSDN.Look here for MSDN Online resources.
CDC::SetStretchBltMode(int nStretchMode) nStretchMode = COLORONCOLOR;//COLORONCOLOR Deletes the pixels. This mode deletes all eliminated lines of pixels without trying to preserve their information.