SetScrollSizes( nMapMode, GetDocument( )->GetMyDocSize( ) )中的MSDN解释
来源:互联网 发布:手机设置网络共享 编辑:程序博客网 时间:2024/06/01 11:28
void SetScrollSizes( int nMapMode, SIZEsizeTotal, const SIZE& sizePage = sizeDefault, const SIZE&sizeLine = sizeDefault );
Parameters
nMapMode
The mapping mode to set for this view. Possible values include:
Mapping ModeLogical UnitPositive y-axis Extends...MM_TEXT1 pixelDownwardMM_HIMETRIC0.01 mmUpwardMM_TWIPS1/1440 inUpwardMM_HIENGLISH0.001 inUpwardMM_LOMETRIC0.1 mmUpwardMM_LOENGLISH0.01 inUpwardAll of these modes are defined by Windows. Two standard mapping modes,MM_ISOTROPIC and MM_ANISOTROPIC, are not used forCScrollView. The class library provides the SetScaleToFitSize member function for scaling the view to window size. Column three in the table above describes the coordinate orientation.
sizeTotal
The total size of the scroll view. The cx member contains the horizontal extent. Thecy member contains the vertical extent. Sizes are in logical units. Bothcx and cy must be greater than or equal to 0.
sizePage
The horizontal and vertical amounts to scroll in each direction in response to a mouse click in a scroll-bar shaft. Thecx member contains the horizontal amount. The cy member contains the vertical amount.
sizeLine
The horizontal and vertical amounts to scroll in each direction in response to a mouse click in a scroll arrow. Thecx member contains the horizontal amount. The cy member contains the vertical amount.
Remarks
Call SetScrollSizes when the view is about to be updated. Call it in your override of theOnUpdate member function to adjust scrolling characteristics when, for example, the document is initially displayed or when it changes size.
You will typically obtain size information from the view’s associated document by calling a document member function, perhaps calledGetMyDocSize
, that you supply with your derived document class. The following code shows this approach:
SetScrollSizes( nMapMode, GetDocument( )->GetMyDocSize( ) );
Alternatively, you might sometimes need to set a fixed size, as in the following code:
SetScrollSizes( nMapMode, CSize(100, 100) );
You must set the mapping mode to any of the Windows mapping modes except MM_ISOTROPIC or MM_ANISOTROPIC. If you want to use an unconstrained mapping mode, call theSetScaleToFitSize member function instead of SetScrollSizes.
Example
void CScaleView::OnUpdate( ){ // ... // Implement a GetDocSize( ) member function in // your document class; it returns a CSize. SetScrollSizes( MM_LOENGLISH, GetDocument( )->GetDocSize( ) ); ResizeParentToFit( ); // Default bShrinkOnly argument // ...}
- SetScrollSizes( nMapMode, GetDocument( )->GetMyDocSize( ) )中的MSDN解释
- GetDocument()
- GetDocument()
- GetDocument()
- 在线MSDN中的各个C#关键字解释
- ioctlsocket MSDN解释
- SetScrollSizes函数
- CScrollView::SetScrollSizes
- Exists解释(msdn文档)
- MSDN 对 DELEGATE 的解释
- msdn上cin的解释
- 转自msdn magzine----解释:ASP.NET 2.0 中的 Windows 身份验证
- GetDocument()使用
- GetDocument()使用
- Msdn中的事件路由
- vs2010中的msdn
- 事件的简单解释(转msdn)
- MSDN中关于 handle的解释
- ewebeditor的上传结合IIS解析漏洞
- 通过tcpdump/wireshark工具抓包Android平台
- 网络(J2SE学习随笔五)
- 大家好
- Url Rewriting with ASP.NET
- SetScrollSizes( nMapMode, GetDocument( )->GetMyDocSize( ) )中的MSDN解释
- MAIL 邮件服务(一)
- Hibernate 3中的formula
- MAIL 邮件服务 (二)
- 搜索记录[20110821--20110826]
- exe4j的使用-- java -jar test.jar为什么不好用
- 36. A joke never gains an enemy, but losses a friends. 戏谑不能化敌为友,只能使人失去朋友。
- .NET C#入门视频教程
- TCP三次握手/四次挥手详解