Message Mapping Problem
-
I wrote a class CCamCtrl. I use a Custom message WM_CAPTURE_IMAGE and used message mapping. A dll is to post message. I think dll does not post messsage, sothat OnCaptureData(WPARAM wParam, LPARAM lParam ) event can't be called. Are there any problem in my code or in dll. here i mention that dll works well for dialog based application. Can anyone help me? Thanks in Advance Mazhar header file class CCamCtrl : public COleControl { //some code /// /// // Message maps //{{AFX_MSG(CCamCtrl) afx_msg void OnCaptureData(WPARAM wParam, LPARAM lParam ); afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg void OnTimer(UINT nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; in cpp i wrote BEGIN_MESSAGE_MAP(CCamCtrl, COleControl) //{{AFX_MSG_MAP(CCamCtrl) ON_MESSAGE(WM_CAPTURE_IMAGE,OnCaptureData) ON_WM_SHOWWINDOW() ON_WM_LBUTTONDOWN() ON_WM_TIMER() //}}AFX_MSG_MAP ON_MESSAGE(OCM_COMMAND, OnOcmCommand) ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties) END_MESSAGE_MAP()