真的是很简单的问题!!

wangyanyan 2002-08-16 09:37:40
问:我曾经用过这样的一个函数SetWindowExt(400,450);可是我不明白那个400,450 是怎么样算出来的呢?
问:关于TRACE诊断宏的问题怎么样查看诊断宏的输出,是不是它只用在格式化的字符串中。例:TRACE("points=%d,tmHeight=%d,tmInternalLeading=%d,""tmExternalLeading=%d\n",nPoint,tm.tmHeight,tm.tmInternalLeading,tm.tmExternalLeading);
其中nPoint为int型,tm为TEXTMETRIC结构类型。
问:
没有重载OnPrepareDC 函数却用了为什么基于CScrollView类。
...全文
72 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wangyanyan 2002-08-16
  • 打赏
  • 举报
回复
各位能不能详细一点我是初学者??
lshadow 2002-08-16
  • 打赏
  • 举报
回复
3 这是一个虚函数调用机制的问题,你可以看看《深入浅出mfc》
lshadow 2002-08-16
  • 打赏
  • 举报
回复
2 在调试模式的输出窗口中才可以看到诊断宏的输出
wuxuan 2002-08-16
  • 打赏
  • 举报
回复
Sets the x- and y-extents of the window associated with the device context.

virtual CSize SetWindowExt(
int cx,
int cy
);
CSize SetWindowExt(
SIZE size
);
Parameters
cx
Specifies the x-extent (in logical units) of the window.
cy
Specifies the y-extent (in logical units) of the window.
size
Specifies the x- and y-extents (in logical units) of the window.
Return Value
The previous extents of the window (in logical units) as a CSize object. If an error occurs, the x- and y-coordinates of the returned CSize object are both set to 0.

Remarks
The window, along with the device-context viewport, defines how GDI maps points in the logical coordinate system to points in the device coordinate system.

When the following mapping modes are set, calls to SetWindowExt and SetViewportExt functions are ignored:

MM_HIENGLISH
MM_HIMETRIC
MM_LOENGLISH
MM_LOMETRIC
MM_TEXT
MM_TWIPS
When MM_ISOTROPIC mode is set, an application must call the SetWindowExt member function before calling SetViewportExt.

16,467

社区成员

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

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

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