怎么拖动文本框 -- MFC

1,添加消息OnLButtonDown

2,添加代码

	CRect rect;
	GetClientRect(&rect);

	rect.bottom = rectCaption.top + 5;
	if (rect.PtInRect(point)) {
		::SendMessage(GetSafeHwnd(), WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
	}
	CDialog::OnLButtonDown(nFlags, point);

猜你喜欢

转载自blog.csdn.net/u012418428/article/details/83988287
今日推荐