Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. SOLVED: Problem with events MFC [modified]

SOLVED: Problem with events MFC [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorialquestion
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    progDes
    wrote on last edited by
    #1

    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

    M P 2 Replies Last reply
    0
    • P progDes

      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

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      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:

      P 1 Reply Last reply
      0
      • M Mark Salsbery

        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:

        P Offline
        P Offline
        progDes
        wrote on last edited by
        #3

        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.

        M 1 Reply Last reply
        0
        • P progDes

          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.

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          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:

          P 1 Reply Last reply
          0
          • M Mark Salsbery

            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:

            P Offline
            P Offline
            progDes
            wrote on last edited by
            #5

            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.

            M 1 Reply Last reply
            0
            • P progDes

              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.

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              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:

              1 Reply Last reply
              0
              • P progDes

                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

                P Offline
                P Offline
                progDes
                wrote on last edited by
                #7

                SOLVED This is long to explain, but in general I'm a fool myself :)

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups