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. Sending Message

Sending Message

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 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
    Poorniselva
    wrote on last edited by
    #1

    Hi, I have an MDI application whose main frame will receive a message which should be sent to the correct view..With this message i will be having an Object ID(i.e. One of my child window has some object on which i have clicked..the ID of that object is sent to a second application which Sends a message back to the first application with ID).So is there any way i can identify the correct view with the help of this Object ID??????? Plz reply Thanx in advance Poorni

    D 1 Reply Last reply
    0
    • P Poorniselva

      Hi, I have an MDI application whose main frame will receive a message which should be sent to the correct view..With this message i will be having an Object ID(i.e. One of my child window has some object on which i have clicked..the ID of that object is sent to a second application which Sends a message back to the first application with ID).So is there any way i can identify the correct view with the help of this Object ID??????? Plz reply Thanx in advance Poorni

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

      From the main frame, get the document to iterarate round all the current views (CDocument::GetFirstViewPosition & CDocument::GetNextView. Add a OwnsObject function to each view, and call it for each view. In that function, have the view check to see if it owns the supplied object ID.

      P 1 Reply Last reply
      0
      • D Diddy

        From the main frame, get the document to iterarate round all the current views (CDocument::GetFirstViewPosition & CDocument::GetNextView. Add a OwnsObject function to each view, and call it for each view. In that function, have the view check to see if it owns the supplied object ID.

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

        Hi, In the MainFrame when i try getting the document pointer its giving me error ..Can u explain me in detail how to do it??? Pls help me Poorni

        D 1 Reply Last reply
        0
        • P Poorniselva

          Hi, In the MainFrame when i try getting the document pointer its giving me error ..Can u explain me in detail how to do it??? Pls help me Poorni

          D Offline
          D Offline
          Diddy
          wrote on last edited by
          #4

          CMyDocument* = (CMyDocument*)GetActiveDocument ();

          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