请教一个关于视图缩放的问题!急!高分相谢!请具体!

sujy2002 2003-10-20 02:23:24
我现在的程序是在视图上加滚动条来显示多行数据,我现在想做成一在视图上点击左键,试图就缩小,再一点视图就变回原来的样子,主要是视图缩放功能的实现,就好像在打印御览里放大缩小的功能一样!
谢谢!
请具体一点!
...全文
38 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
bluebohe 2003-10-21
  • 打赏
  • 举报
回复
在倒分投诉贴子中已经记录了sujiayi得sujy2002分的几个倒分贴子,在这里再次出现,删除此回复。希望sujiayi自重。

回复人: sujiayi(sujiayi) ( ) 信誉:89 2003-10-20 17:36:27 得分:50



Copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap if necessary to fit the dimensions of the destination rectangle.

BOOL StretchBlt(
int x,
int y,
int nWidth,
int nHeight,
CDC* pSrcDC,
int xSrc,
int ySrc,
int nSrcWidth,
int nSrcHeight,
DWORD dwRop
);
Parameters
x
Specifies the x-coordinate (in logical units) of the upper-left corner of the destination rectangle.
y
Specifies the y-coordinate (in logical units) of the upper-left corner of the destination rectangle.
nWidth
Specifies the width (in logical units) of the destination rectangle.
nHeight
Specifies the height (in logical units) of the destination rectangle.
pSrcDC
Specifies the source device context.
xSrc
Specifies the x-coordinate (in logical units) of the upper-left corner of the source rectangle.
ySrc
Specifies the x-coordinate (in logical units) of the upper-left corner of the source rectangle.
nSrcWidth
Specifies the width (in logical units) of the source rectangle.
nSrcHeight
Specifies the height (in logical units) of the source rectangle.
dwRop
Specifies the raster operation to be performed. Raster operation codes define how GDI combines colors in output operations that involve a current brush, a possible source bitmap, and a destination bitmap. This parameter may be one of the following values:
BLACKNESS Turns all output black.
DSTINVERT Inverts the destination bitmap.
MERGECOPY Combines the pattern and the source bitmap using the Boolean AND operator.
MERGEPAINT Combines the inverted source bitmap with the destination bitmap using the Boolean OR operator.
NOTSRCCOPY Copies the inverted source bitmap to the destination.
NOTSRCERASE Inverts the result of combining the destination and source bitmaps using the Boolean OR operator.
PATCOPY Copies the pattern to the destination bitmap.
PATINVERT Combines the destination bitmap with the pattern using the Boolean XOR operator.
PATPAINT Combines the inverted source bitmap with the pattern using the Boolean OR operator. Combines the result of this operation with the destination bitmap using the Boolean OR operator.
SRCAND Combines pixels of the destination and source bitmaps using the Boolean AND operator.
SRCCOPY Copies the source bitmap to the destination bitmap.
SRCERASE Inverts the destination bitmap and combines the result with the source bitmap using the Boolean AND operator.
SRCINVERT Combines pixels of the destination and source bitmaps using the Boolean XOR operator.
SRCPAINT Combines pixels of the destination and source bitmaps using the Boolean OR operator.
WHITENESS Turns all output white.




Top



该问题已经结贴 ,得分记录: yangang000 (10)、 csdnzhu (40)、 sujiayi (50)、





sujy2002 2003-10-20
  • 打赏
  • 举报
回复
到今天晚上6点就结帖子了!
sujy2002 2003-10-20
  • 打赏
  • 举报
回复
谁还有更好的想法亚!
sujy2002 2003-10-20
  • 打赏
  • 举报
回复
谢谢
sujiayi@dlmse.panasonic.com.cn
csdnzhu 2003-10-20
  • 打赏
  • 举报
回复
告诉我信箱,我发一个例程序给你
sujy2002 2003-10-20
  • 打赏
  • 举报
回复
请具体点谈谈!
最好能有源码!
wuxfBrave 2003-10-20
  • 打赏
  • 举报
回复
自己处理OnDraw,在其中处理
yangang000 2003-10-20
  • 打赏
  • 举报
回复
视图的缩放只不过就是按不同比例(字符大小、线的长短等)对视图进行绘制的过程。
它和正常的视图绘制没什么区别。
不过也可以先按正常比例将内容绘制到内存中的一个兼容DC中,然后将其作为位图进行缩放,再画到显示DC中。

16,470

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧