Ok this is how it is,
I created an empty single document using wizard in VC 6 win98.
Then i directly modified the
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
//{{AFX_MSG_MAP(CMainFrame)
ON_WM_LBUTTONDOWN() ////////////added this line
ON_WM_CREATE()
//}}AFX_MSG_MAP
// Global help commands
ON_COMMAND(ID_HELP_FINDER, CFrameWnd::OnHelpFinder)
ON_COMMAND(ID_HELP, CFrameWnd::OnHelp)
ON_COMMAND(ID_CONTEXT_HELP, CFrameWnd::OnContextHelp)
ON_COMMAND(ID_DEFAULT_HELP, CFrameWnd::OnHelpFinder)
END_MESSAGE_MAP()
and then i defined the functions as, public:
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
and in the body of the function just placed a message box.
void CMainFrame::OnLButtonDown(UINT nFlags, CPoint point)
{
MessageBeep(-1);
MessageBox("yeeha", NULL, MB_OK);
}
Now the problem is when i presses the left mouse button beep or the message box does not pops up? why is it.