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. SendMessage

SendMessage

Scheduled Pinned Locked Moved C / C++ / MFC
help
9 Posts 6 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.
  • A Offline
    A Offline
    aaaan
    wrote on last edited by
    #1

    Hi i want to send a message to multiple windows,those window have same caption name. is there any way to send a perticular message to those windows only.firstly i wanted to use FindWindow then using their handle i will send message, but all those window have same caption. Can any one help me please. tunu

    N R D 3 Replies Last reply
    0
    • A aaaan

      Hi i want to send a message to multiple windows,those window have same caption name. is there any way to send a perticular message to those windows only.firstly i wanted to use FindWindow then using their handle i will send message, but all those window have same caption. Can any one help me please. tunu

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      aaaan wrote:

      I want to send a message to multiple windows,those window have same caption name. is there any way to send a perticular message to those windows only.firstly i wanted to use FindWindow then using their handle i will send message, but all those window have same caption. Can any one help me please.

      First register a window message for your application using RegisterWindowMessage and provide a handler for this message, then broadcast this message. This message will only be processed by your application since the Message id will be unique for your application.


      Nibu thomas A Developer Programming tips[^] My site[^]

      T A 2 Replies Last reply
      0
      • N Nibu babu thomas

        aaaan wrote:

        I want to send a message to multiple windows,those window have same caption name. is there any way to send a perticular message to those windows only.firstly i wanted to use FindWindow then using their handle i will send message, but all those window have same caption. Can any one help me please.

        First register a window message for your application using RegisterWindowMessage and provide a handler for this message, then broadcast this message. This message will only be processed by your application since the Message id will be unique for your application.


        Nibu thomas A Developer Programming tips[^] My site[^]

        T Offline
        T Offline
        toxcct
        wrote on last edited by
        #3

        i'm not sure at all the OP wants to send a own defined message. it seems more that he is trying to send an already defined message to some windows the OP don't own at all


        [VisualCalc][Flags Beginner's Guide] | [Forums Guidelines][My Best Advice]

        N 1 Reply Last reply
        0
        • T toxcct

          i'm not sure at all the OP wants to send a own defined message. it seems more that he is trying to send an already defined message to some windows the OP don't own at all


          [VisualCalc][Flags Beginner's Guide] | [Forums Guidelines][My Best Advice]

          N Offline
          N Offline
          Nibu babu thomas
          wrote on last edited by
          #4

          toxcct wrote:

          i'm not sure at all the OP wants to send a own defined message.

          My bad. :(


          Nibu thomas A Developer Programming tips[^] My site[^]

          1 Reply Last reply
          0
          • N Nibu babu thomas

            aaaan wrote:

            I want to send a message to multiple windows,those window have same caption name. is there any way to send a perticular message to those windows only.firstly i wanted to use FindWindow then using their handle i will send message, but all those window have same caption. Can any one help me please.

            First register a window message for your application using RegisterWindowMessage and provide a handler for this message, then broadcast this message. This message will only be processed by your application since the Message id will be unique for your application.


            Nibu thomas A Developer Programming tips[^] My site[^]

            A Offline
            A Offline
            aaaan
            wrote on last edited by
            #5

            Thanks Nibu thomas But my problem is i do not want to broadcast. I only want to send message to those perticular window.So please give me some idea regarding this. tunu

            N N 2 Replies Last reply
            0
            • A aaaan

              Thanks Nibu thomas But my problem is i do not want to broadcast. I only want to send message to those perticular window.So please give me some idea regarding this. tunu

              N Offline
              N Offline
              Nibu babu thomas
              wrote on last edited by
              #6

              aaaan wrote:

              I only want to send message to those perticular window.

              :~ HWND_BROADCAST is one option, but this sends the message to all top level windows.


              Nibu thomas A Developer Programming tips[^] My site[^]

              1 Reply Last reply
              0
              • A aaaan

                Thanks Nibu thomas But my problem is i do not want to broadcast. I only want to send message to those perticular window.So please give me some idea regarding this. tunu

                N Offline
                N Offline
                Naveen
                wrote on last edited by
                #7

                Another solution is to create another message( a unique message so that only your application can process this mesasge ) and send that message to the window you got through FindWindowEx. If the window responds, u can came in to conclusion that u have got the handle you want, if not find the next window with the same name using FindWindowEx

                nave

                1 Reply Last reply
                0
                • A aaaan

                  Hi i want to send a message to multiple windows,those window have same caption name. is there any way to send a perticular message to those windows only.firstly i wanted to use FindWindow then using their handle i will send message, but all those window have same caption. Can any one help me please. tunu

                  R Offline
                  R Offline
                  Roger Stoltz
                  wrote on last edited by
                  #8

                  aaaan wrote:

                  firstly i wanted to use FindWindow then using their handle i will send message, but all those window have same caption.

                  Well, wasn't that the point...? E.g. :

                  aaaan wrote:

                  i want to send a message to multiple windows,those window have same caption name

                  It sounds to me like you want to send messages to windows with the same title, but you cannot use ::FindWindow() because you find windows with the same title, which ...errhh... are the ones you want to send the message to...:confused::confused: I must have gotten you wrong. Can you rephrase it? What message do you want to send? Is it your own user-defined or an ordinary windows message such as WM_CLOSE? What is the criteria that makes a certain window a candidate for receiving such message? What have you done so far and why do you think it's not working?


                  "It's supposed to be hard, otherwise anybody could do it!" - selfquote

                  1 Reply Last reply
                  0
                  • A aaaan

                    Hi i want to send a message to multiple windows,those window have same caption name. is there any way to send a perticular message to those windows only.firstly i wanted to use FindWindow then using their handle i will send message, but all those window have same caption. Can any one help me please. tunu

                    D Offline
                    D Offline
                    David Crow
                    wrote on last edited by
                    #9

                    But do those same-titled windows belong to the same class?


                    "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                    "Judge not by the eye but by the heart." - Native American Proverb

                    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