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. doubt in VC++ regarding Message Box

doubt in VC++ regarding Message Box

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
17 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.
  • C color Aljechin

    No matter who owns the messgae box. After something is displayed on the screen, it is no more available as text it will be bitmap. You will need to use OCR. I dont know if there is an alternative. I dont know if GetWindowText() will work. But you will need the handle of that window still. :rose:

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

    Aljechin wrote:

    I dont know if GetWindowText() will work. But you will need the handle of that window still.

    I Believe thats not the Solution!

    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

    cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

    1 Reply Last reply
    0
    • J Javagal Srinath

      :confused:How to Extract information stored in the main part of any Message box window after it displays on Desktop? I want to retreive all the arguments send to Message box. The Message box is owned by a different application.

      S Offline
      S Offline
      Sarath C
      wrote on last edited by
      #4

      Do the following 1. if u dont have the window(messsagebox) get it using FindWindow or some other API 2. GetNextWindow (pass GW_CHILD) as the flag to find the window. I donno in which order the windows has placed in teh message box. so iterate till end. 3. Use GetWindowText by passing the find result. this is applicable if the message box is created using normal MessageBox API. SaRath

      T 1 Reply Last reply
      0
      • J Javagal Srinath

        :confused:How to Extract information stored in the main part of any Message box window after it displays on Desktop? I want to retreive all the arguments send to Message box. The Message box is owned by a different application.

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #5

        Javagal Srinath wrote:

        want to retreive all the arguments send to Message box. The Message box is owned by a different application.

        Hook MessageBox api !

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

        1 Reply Last reply
        0
        • S Sarath C

          Do the following 1. if u dont have the window(messsagebox) get it using FindWindow or some other API 2. GetNextWindow (pass GW_CHILD) as the flag to find the window. I donno in which order the windows has placed in teh message box. so iterate till end. 3. Use GetWindowText by passing the find result. this is applicable if the message box is created using normal MessageBox API. SaRath

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #6

          SaRath C wrote:

          1. if u dont have the window(messsagebox) get it using FindWindow or some other API

          Sorry if Sound Rude, how will determine that is messagebox window as it Normal Dialog Box!

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

          1 Reply Last reply
          0
          • C color Aljechin

            No matter who owns the messgae box. After something is displayed on the screen, it is no more available as text it will be bitmap. You will need to use OCR. I dont know if there is an alternative. I dont know if GetWindowText() will work. But you will need the handle of that window still. :rose:

            E Offline
            E Offline
            Eytukan
            wrote on last edited by
            #7

            Aljechin wrote:

            GetWindowText()

            I guess this would work only to catch its caption.:~


            --[V]--

            [My Current Status]

            T 1 Reply Last reply
            0
            • J Javagal Srinath

              :confused:How to Extract information stored in the main part of any Message box window after it displays on Desktop? I want to retreive all the arguments send to Message box. The Message box is owned by a different application.

              A Offline
              A Offline
              anwer_skk
              wrote on last edited by
              #8

              I feel it is very difficult to solve this problem. But I believe there is a solution for all problems. So here is a spark: We can manually copy the entire text and caption form a message box using Ctrl+C (am not sure, will it work for all the message boxes). Check the link : http://secretgeek.net/msgbox\_copy.asp http://weblogs.asp.net/chuckop/archive/2004/04/08/110153.aspx So my idea is: What about simulating the Ctrl + C and take the text from clipboard? It is only a spark :~

              1 Reply Last reply
              0
              • E Eytukan

                Aljechin wrote:

                GetWindowText()

                I guess this would work only to catch its caption.:~


                --[V]--

                [My Current Status]

                T Offline
                T Offline
                ThatsAlok
                wrote on last edited by
                #9

                VuNic wrote:

                I guess this would work only to catch its caption.

                for getting text of particular Window of other process you have to us WM_GETTEXT message!

                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                E 1 Reply Last reply
                0
                • T ThatsAlok

                  VuNic wrote:

                  I guess this would work only to catch its caption.

                  for getting text of particular Window of other process you have to us WM_GETTEXT message!

                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                  cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                  E Offline
                  E Offline
                  Eytukan
                  wrote on last edited by
                  #10

                  hmm... thanks thanks.. so this works different from the GetWindowText??


                  --[V]--

                  [My Current Status]

                  T 1 Reply Last reply
                  0
                  • E Eytukan

                    hmm... thanks thanks.. so this works different from the GetWindowText??


                    --[V]--

                    [My Current Status]

                    T Offline
                    T Offline
                    ThatsAlok
                    wrote on last edited by
                    #11

                    VuNic wrote:

                    hmm... thanks thanks.. so this works different from the GetWindowText??

                    Would you like to read that your Self in the MSDN or you like to explaination by Me! :)

                    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                    cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                    E 1 Reply Last reply
                    0
                    • T ThatsAlok

                      VuNic wrote:

                      hmm... thanks thanks.. so this works different from the GetWindowText??

                      Would you like to read that your Self in the MSDN or you like to explaination by Me! :)

                      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                      cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                      E Offline
                      E Offline
                      Eytukan
                      wrote on last edited by
                      #12

                      Nope, I'm in the middle of some process here, so I just put the question further there , If it worries you, leave it. I'll look about it in MSDN later. No problem!


                      --[V]--

                      [My Current Status]

                      T 3 Replies Last reply
                      0
                      • E Eytukan

                        Nope, I'm in the middle of some process here, so I just put the question further there , If it worries you, leave it. I'll look about it in MSDN later. No problem!


                        --[V]--

                        [My Current Status]

                        T Offline
                        T Offline
                        ThatsAlok
                        wrote on last edited by
                        #13

                        VuNic wrote:

                        I'm in the middle of some process here,

                        Process HUMM................... :)

                        VuNic wrote:

                        so I just put the question further there

                        Then let me Explain, i am kiddin... By Design GetWindowText only Bring Caption of Window , remember by design. but GetWindowText use WM_GETTEXT  internally!

                        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                        cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                        1 Reply Last reply
                        0
                        • E Eytukan

                          Nope, I'm in the middle of some process here, so I just put the question further there , If it worries you, leave it. I'll look about it in MSDN later. No problem!


                          --[V]--

                          [My Current Status]

                          T Offline
                          T Offline
                          ThatsAlok
                          wrote on last edited by
                          #14

                          VuNic wrote:

                          I'm in the middle of some process here, so I just put the question further there ,

                          Humm Process :)

                          VuNic wrote:

                          o I just put the question further there

                          Actually By Design GetWindowText Brings the Caption of the Remote Window, remember by Design.though interally it make call to the WM_GETTEXT!

                          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                          cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                          1 Reply Last reply
                          0
                          • E Eytukan

                            Nope, I'm in the middle of some process here, so I just put the question further there , If it worries you, leave it. I'll look about it in MSDN later. No problem!


                            --[V]--

                            [My Current Status]

                            T Offline
                            T Offline
                            ThatsAlok
                            wrote on last edited by
                            #15

                            VuNic wrote: I'm in the middle of some process here, so I just put the question further there , Humm Process VuNic wrote: o I just put the question further there Actually By Design GetWindowText Brings the Caption of the Remote Window, remember by Design.though interally it make call to the WM_GETTEXT!

                            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                            cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Re

                            E 1 Reply Last reply
                            0
                            • T ThatsAlok

                              VuNic wrote: I'm in the middle of some process here, so I just put the question further there , Humm Process VuNic wrote: o I just put the question further there Actually By Design GetWindowText Brings the Caption of the Remote Window, remember by Design.though interally it make call to the WM_GETTEXT!

                              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                              cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Re

                              E Offline
                              E Offline
                              Eytukan
                              wrote on last edited by
                              #16

                              Yup Alok, that's what I knew, it would internally use GETTEXT, but why does this get supressed when its called by GetWindowText? I tried to take the text off a notepad, but I failed there. Actually I got the handle of notepad's client window from spy ++ and tried GetWindowText, but didn't work. so you mean, here sending GETTEXT would work??


                              --[V]--

                              [My Current Status]

                              T 1 Reply Last reply
                              0
                              • E Eytukan

                                Yup Alok, that's what I knew, it would internally use GETTEXT, but why does this get supressed when its called by GetWindowText? I tried to take the text off a notepad, but I failed there. Actually I got the handle of notepad's client window from spy ++ and tried GetWindowText, but didn't work. so you mean, here sending GETTEXT would work??


                                --[V]--

                                [My Current Status]

                                T Offline
                                T Offline
                                ThatsAlok
                                wrote on last edited by
                                #17

                                VuNic wrote:

                                but didn't work. so you mean, here sending GETTEXT would work??

                                By Design GwtWindowText bring the Caption of Window:)

                                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                                cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Re

                                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