Implementing Resizable Controls in VC++ - 项目摘要 |
摘要
| 管理 |
论坛 文档
| 软件包 |
|
|
|
项目描述: |
To implement an interactively resizable control (using the mouse), you generally need to treat the following Windows messages:
WM_SETCURSOR—to set the appropriate mouse cursor for the different regions of the control's border. The following mouse cursors are used:
IDC_SIZEWE—when the mouse is on the left or right side
IDC_SIZENS—when the mouse is on the top or bottom side
IDC_SIZENWSE—when the mouse is on the top left or bottom right corner
IDC_SIZENESW—when the mouse is on the top right or bottom left corner
IDC_ARROW—when the mouse is on the control but not on the border)
WM_MOUSEMOVE—to resize the control with the mouse movement.
WM_NCLBUTTONDOWN—to start the resizing action.
WM_LBUTTONUP—to end the resizing action.
为了实现一个交互式的可调整大小的控件(使用鼠标),通常需要处理下列消息:
WM_SETCURSOR-为控件边界的不同区域设置鼠标光标。可以使用下列的光标:
IDC_SIZEWE—鼠标在左边界
IDC_SIZENS—鼠标在上部或下部
IDC_SIZENWSE—鼠标在左上部或右下部
IDC_SIZENESW—鼠标在右上部或左下部
IDC_ARROW—鼠标在控件中,但不在边界上
WM_MOUSEMOVE—用鼠标移动来调整控件的大小
WM_NCLBUTTONDOWN—开始调整大小的动作
WM_LBUTTONUP—调整大小的动作结束
来源: http://www.codeguru.com/controls/ResizableCtrl.html |
类别: |
|
发布者:
cbd002
|
|
最新发布源码包 |
软件包 |
版本号 |
日期 |
本地下载 |
ResizableCtrl |
 1.0  |
2004-04-18 |
下载 |
|
|