2

I was wondering, how do I create a re-sizable border in MFC without showing the border itself?

IDD_GADGETTRANSLUCENTDIALOG DIALOGEX 0, 0, 320, 201
STYLE DS_SETFONT | DS_FIXEDSYS | WS_SYSMENU | WS_THICKFRAME

The "WS_THICKFRAME" style provides the functionality of resizing, but I don't want the border to be visible. How would I go about doing this?

4

2 回答 2

2

或者自己处理 WM_NCPAINT 并绘制边框(和标题)......

于 2013-11-08T04:06:15.157 回答
1

我创建了一个具有可选边框(和框架)的 MCF 应用程序。在无边框模式下,我仍然希望它可调整大小和可移动,所以基本上OnMouseMove如果我在窗口边缘的几个像素内,我设置适当的光标(例如IDC_SIZENESW右上角)然后如果nFlags & MK_LBUTTON做了SendMessage使用WM_SYSCOMMAND和适当的大小命令(例如SC_SIZE + WMSZ_TOPRIGHT)并让CWnd::OnSysCommand默认处理程序处理它。此外,同样的技巧适用于SC_MOVE......

于 2013-11-18T18:13:35.537 回答