SOLVED: Problem with events MFC [modified]
-
Me view is derived from CFormView. I need to add dialog in my view like a fixed child window. I do this in OnCreate. m_TableDialog.Create(IDD_DIALOGTABLE, this); The problem: The m_TableDialog doesn't receive messages, but controls in it do. So, for example CMyView::OnLButtonDown never called. What's the problem? -- modified at 1:02 Sunday 9th September, 2007
-
Me view is derived from CFormView. I need to add dialog in my view like a fixed child window. I do this in OnCreate. m_TableDialog.Create(IDD_DIALOGTABLE, this); The problem: The m_TableDialog doesn't receive messages, but controls in it do. So, for example CMyView::OnLButtonDown never called. What's the problem? -- modified at 1:02 Sunday 9th September, 2007
progDes wrote:
The problem: The m_TableDialog doesn't receive messages, but controls in it do. So, for example CMyView::OnLButtonDown never called.
I'm confused. m_TaleDialog is a CMyView class object? The WM_LBUTTONDOWN message should go to the window under the cursor unless the mouse is captured by another window. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
progDes wrote:
The problem: The m_TableDialog doesn't receive messages, but controls in it do. So, for example CMyView::OnLButtonDown never called.
I'm confused. m_TaleDialog is a CMyView class object? The WM_LBUTTONDOWN message should go to the window under the cursor unless the mouse is captured by another window. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
No, m_TableDialog is CDialogTable object. And the dialog is creating in CMyView::Create. The owner of m_TableDialog is a view class. May be the creation of dialog is wrong? Looks like some modal dialog catch all messages.
Again, the WM_LBUTTONDOWN message should go to the window under the cursor unless the mouse is captured by another window. Where are you clicking and where do you expect to get the message? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Again, the WM_LBUTTONDOWN message should go to the window under the cursor unless the mouse is captured by another window. Where are you clicking and where do you expect to get the message? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
I'm clicking on dialog window, and waiting the message in CDialogTable::OnLMouseDown. The strange thing: Controls are acting correct, buttons are animating etc, but there is a beep sound when I'm selecting element in CListCtrl (just like, trying to do something when modal dialog on the top), bu elements are selecting correctly.
-
I'm clicking on dialog window, and waiting the message in CDialogTable::OnLMouseDown. The strange thing: Controls are acting correct, buttons are animating etc, but there is a beep sound when I'm selecting element in CListCtrl (just like, trying to do something when modal dialog on the top), bu elements are selecting correctly.
I'm not picturing how your windows are arranged so it's tough to tell what's going on. Your CDialogTable is a child of a CFormView, right? If so, it's on top of its parent in the z-order. How much of its parent is it covering up? What controls are on which windows? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Me view is derived from CFormView. I need to add dialog in my view like a fixed child window. I do this in OnCreate. m_TableDialog.Create(IDD_DIALOGTABLE, this); The problem: The m_TableDialog doesn't receive messages, but controls in it do. So, for example CMyView::OnLButtonDown never called. What's the problem? -- modified at 1:02 Sunday 9th September, 2007