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. Send message to child

Send message to child

Scheduled Pinned Locked Moved C / C++ / MFC
questiondata-structurestutorial
5 Posts 3 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.
  • D Offline
    D Offline
    DrZOO
    wrote on last edited by
    #1

    Hello I want to send messages from MainFrame to its child views (for example CView and CListView). In MainFrame there are tree views created from splitterwnd like this; m_wndSplitter2.CreateView(0,0, RUNTIME_CLASS(CUserListView), CSize (0, 0), NULL); Those are the ones I would like to send messages to. How do I do that? How do I get all neccesary handles/pointers to that view. /Yours truly ;)

    D C 2 Replies Last reply
    0
    • D DrZOO

      Hello I want to send messages from MainFrame to its child views (for example CView and CListView). In MainFrame there are tree views created from splitterwnd like this; m_wndSplitter2.CreateView(0,0, RUNTIME_CLASS(CUserListView), CSize (0, 0), NULL); Those are the ones I would like to send messages to. How do I do that? How do I get all neccesary handles/pointers to that view. /Yours truly ;)

      D Offline
      D Offline
      DrZOO
      wrote on last edited by
      #2

      I really need to know how to get a handle or a pointer to a child view? I'm trying to do thar with GetWindow(), but how do I know which window the result is? Thanks for all your help /DrZOO

      Q 1 Reply Last reply
      0
      • D DrZOO

        I really need to know how to get a handle or a pointer to a child view? I'm trying to do thar with GetWindow(), but how do I know which window the result is? Thanks for all your help /DrZOO

        Q Offline
        Q Offline
        qmuffs
        wrote on last edited by
        #3

        I think you can get the caption of all windows like this. I'm sure there is an easier way. HWND curHWnd = GetWindow(HWND, GW_HWNDFIRST) while (curHWnd) { int iLen = GetWindowTextLength(curHWnd) GetWindowText(curHWnd , szWindowText, lngLen + 1) // check if szWindowText is the Caption you want curHWnd = GetWindow(curHWnd, GW_HWNDNEXT) } QMuffs

        1 Reply Last reply
        0
        • D DrZOO

          Hello I want to send messages from MainFrame to its child views (for example CView and CListView). In MainFrame there are tree views created from splitterwnd like this; m_wndSplitter2.CreateView(0,0, RUNTIME_CLASS(CUserListView), CSize (0, 0), NULL); Those are the ones I would like to send messages to. How do I do that? How do I get all neccesary handles/pointers to that view. /Yours truly ;)

          C Offline
          C Offline
          Chris Losinger
          wrote on last edited by
          #4

          if you have the splitter wnd, you can do : splitter.GetPane(...) for each of the panes. this gievs you the CWnd for each sub-view. -c


          ABSURDITY: A statement or belief manifestly inconsistent with one's own opinion.

          ISEffects - effects for images

          D 1 Reply Last reply
          0
          • C Chris Losinger

            if you have the splitter wnd, you can do : splitter.GetPane(...) for each of the panes. this gievs you the CWnd for each sub-view. -c


            ABSURDITY: A statement or belief manifestly inconsistent with one's own opinion.

            ISEffects - effects for images

            D Offline
            D Offline
            DrZOO
            wrote on last edited by
            #5

            It's nice with bright people!

            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