1、 picture 控件画矩形可以任意拖动
解决方案 »
- MFC操作MySql数据库是插入操作只能插入一次
- vc画线后,鼠标移动到线上,能提示一些信息
- 在vc读写word文档(RTF文件)时,如何在不改变字体大小颜色格式的情况下,将字体的内容修改了?
- 关于CRect
- 串口问题
- help!怎么在视图中画圆?
- 初学者疑问????????????急!!!!!!!!
- SQL问题,内详,晚10点结账,请帮忙(第一次提问,请问如何给分)
- 有谁知道那本Charles Petzold写的《Programming Windows 95》那里有的卖?原著或译著都行
- 窗口类成员变量的调用
- vs2013 引入外部active控件不显示,仅当前工程不行,其他工程就可以
- 一个很奇怪的问题,关于CoResumeClassObjects函数。
#define TRACK_SIZE 128void CPartialBitmapView::OnInitialUpdate()
{
CView::OnInitialUpdate();
//
CRect rc;
GetClientRect(&rc);
CPoint pt=rc.CenterPoint();
rc.left=pt.x-TRACK_SIZE/2;
rc.right=pt.x+TRACK_SIZE/2;
rc.top=pt.y-TRACK_SIZE/2;
rc.bottom=pt.y+TRACK_SIZE/2;
m_Tracker.m_rect=rc;
m_Tracker.m_nStyle |= CRectTracker::solidLine;
m_Tracker.m_nStyle |= CRectTracker::resizeInside;
}
http://www.cnblogs.com/jsxyhelu/p/6354341.html已经完全实现带代码,只是需要你去读懂。
CRectTracker does not have a base class.The CRectTracker class allows an item to be displayed, moved, and resized in different fashions. Although the CRectTracker class is designed to allow the user to interact with OLE items by using a graphical interface, its use is not restricted to OLE-enabled applications. It can be used anywhere such a user interface is required. CRectTracker borders can be solid or dotted lines. The item can be given a hatched border or overlaid with a hatched pattern to indicate different states of the item. You can place eight resize handles on either the outside or the inside border of the item. (For an explanation of the resize handles, see GetHandleMask.) Finally, a CRectTracker allows you to change the orientation of an item during resizing. To use CRectTracker, construct a CRectTracker object and specify which display states are initialized. You can then use this interface to give the user visual feedback on the current status of the OLE item associated with the CRectTracker object. For more information on using CRectTracker, see the articleTrackers in Visual C++ Programmer’s Guide.#include <afxext.h>Class Members | Hierarchy ChartSamples MFC Sample TRACKER | MFC Sample DRAWCLISee Also COleResizeBar, CRect, CRectTracker::GetHandleMask