J
Jeff0803
Guest
I'm trying to add a message handler for WM_NCHITTEST but following error occur.
Here is the code snippet.
//header file
afx_msg LRESULT OnNcHitTest(CPoint point);
//source file
BEGIN_MESSAGE_MAP (CMainWindow, CWnd)
......
ON_WM_NCHITTEST ()
END_MESSAGE_MAP ()
LRESULT CMainWindow::OnNcHitTest (CPoint point)
{
LRESULT nHitTest = CFrameWnd::OnNcHitTest (point);
if (nHitTest == HTCLIENT)
nHitTest = HTCAPTION;
return nHitTest;
}
Compile error occurs at following line.
LRESULT nHitTest = CFrameWnd::OnNcHitTest (point);
Error messag is
error C2248: 'CWnd::OnNcHitTest' : cannot access protected member declared in class 'CWnd'
Can anybody give me any advice?
Continue reading...
Here is the code snippet.
//header file
afx_msg LRESULT OnNcHitTest(CPoint point);
//source file
BEGIN_MESSAGE_MAP (CMainWindow, CWnd)
......
ON_WM_NCHITTEST ()
END_MESSAGE_MAP ()
LRESULT CMainWindow::OnNcHitTest (CPoint point)
{
LRESULT nHitTest = CFrameWnd::OnNcHitTest (point);
if (nHitTest == HTCLIENT)
nHitTest = HTCAPTION;
return nHitTest;
}
Compile error occurs at following line.
LRESULT nHitTest = CFrameWnd::OnNcHitTest (point);
Error messag is
error C2248: 'CWnd::OnNcHitTest' : cannot access protected member declared in class 'CWnd'
Can anybody give me any advice?
Continue reading...