15,979
社区成员
发帖
与我相关
我的任务
分享
#include<afxwin.h>
#include<math.h>
class CMyWnd:public CFrameWnd
{
public:
afx_msg void OnNcLButtonDblClk(UINT nHitTest, CPoint point);
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp);
};
BEGIN_MESSAGE_MAP(CMyWnd, CFrameWnd)
ON_WM_NCLBUTTONDBLCLK()
ON_WM_NCCALCSIZE()
END_MESSAGE_MAP()
class CMyApp:public CWinApp
{
public:
BOOL InitInstance();
};
BOOL CMyApp::InitInstance()
{
CMyWnd *pFrame = new CMyWnd;
pFrame->Create(0, _T("title"), WS_SYSMENU|WS_MINIMIZEBOX);
pFrame->ShowWindow(SW_MAXIMIZE);
this->m_pMainWnd = pFrame;
return TRUE;
}
CMyApp ThisApp;
void CMyWnd::OnNcLButtonDblClk(UINT nHitTest, CPoint point)
{
;
}
void CMyWnd::OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp)
{
lpncsp->rgrc[0].top += 20;
CFrameWnd::OnNcCalcSize(bCalcValidRects, lpncsp);
}