Afx Message Handling in CStatic as Child-Window
-
Hi! I have a question about afx-message-handling in a MFC-Dialog (VS.NET 2003, WinXP). I've got a main Dialog (CDialog) and a Child-Window in it (CStatic). The goal is to handle afx-messages from the CStatic (ie. ON_WM_LBUTTONDOWN()) . I did use the standard afx-message-map-mothod (ie. mapping ON_WM_LBUTTONDOWN() to afx_msg void OnLButtonDown(UINT nFlags, CPoint point)), but nothing happens. Only the messages and handlers of the Main-Dialog are working. I tried to put the focus on the Child-Window manually - no sucess. I tried to use CWnd instead of CStatic - no sucess. Perhaps the CDialog messages are blocking the messages of the CStatic?! Im really new in this and need a hint. thanks in advance! _NielsB
-
Hi! I have a question about afx-message-handling in a MFC-Dialog (VS.NET 2003, WinXP). I've got a main Dialog (CDialog) and a Child-Window in it (CStatic). The goal is to handle afx-messages from the CStatic (ie. ON_WM_LBUTTONDOWN()) . I did use the standard afx-message-map-mothod (ie. mapping ON_WM_LBUTTONDOWN() to afx_msg void OnLButtonDown(UINT nFlags, CPoint point)), but nothing happens. Only the messages and handlers of the Main-Dialog are working. I tried to put the focus on the Child-Window manually - no sucess. I tried to use CWnd instead of CStatic - no sucess. Perhaps the CDialog messages are blocking the messages of the CStatic?! Im really new in this and need a hint. thanks in advance! _NielsB
-
Hi! I have a question about afx-message-handling in a MFC-Dialog (VS.NET 2003, WinXP). I've got a main Dialog (CDialog) and a Child-Window in it (CStatic). The goal is to handle afx-messages from the CStatic (ie. ON_WM_LBUTTONDOWN()) . I did use the standard afx-message-map-mothod (ie. mapping ON_WM_LBUTTONDOWN() to afx_msg void OnLButtonDown(UINT nFlags, CPoint point)), but nothing happens. Only the messages and handlers of the Main-Dialog are working. I tried to put the focus on the Child-Window manually - no sucess. I tried to use CWnd instead of CStatic - no sucess. Perhaps the CDialog messages are blocking the messages of the CStatic?! Im really new in this and need a hint. thanks in advance! _NielsB
-
Include this style:
SS_NOTIFY
with the CStatic.m_Static.ModifyStyle(0,SS_NOTIFY);
this is this.