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. Reading MessageBox

Reading MessageBox

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
6 Posts 4 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.
  • U Offline
    U Offline
    udayGovekar
    wrote on last edited by
    #1

    How can I read the content of a messagebox through my VC application Please reply asap Thanks for ur help Uday

    _ 1 Reply Last reply
    0
    • U udayGovekar

      How can I read the content of a messagebox through my VC application Please reply asap Thanks for ur help Uday

      _ Offline
      _ Offline
      _Theo_
      wrote on last edited by
      #2

      I'm not sure what you mean. Do you want to read the contents of an edit field in a dialog?

      U 1 Reply Last reply
      0
      • _ _Theo_

        I'm not sure what you mean. Do you want to read the contents of an edit field in a dialog?

        U Offline
        U Offline
        udayGovekar
        wrote on last edited by
        #3

        No, static Text, Label Say in MessageBox it comes as Hi! This is for Test I want to read this

        J _ B 3 Replies Last reply
        0
        • U udayGovekar

          No, static Text, Label Say in MessageBox it comes as Hi! This is for Test I want to read this

          J Offline
          J Offline
          jhwurmbach
          wrote on last edited by
          #4

          udayGovekar wrote: ...static Text... Call GetWindowText() on the CStatic-variable, or call ::GetWindowText() with the HWND of your static text control.


          My opinions may have changed, but not the fact that I am right.

          1 Reply Last reply
          0
          • U udayGovekar

            No, static Text, Label Say in MessageBox it comes as Hi! This is for Test I want to read this

            _ Offline
            _ Offline
            _Theo_
            wrote on last edited by
            #5

            I don't think there are functions to do it that if you use MessageBox. But why do you want to do it anyway? You provide the label and text for a messagebox yourself so there's no need to read it.

            1 Reply Last reply
            0
            • U udayGovekar

              No, static Text, Label Say in MessageBox it comes as Hi! This is for Test I want to read this

              B Offline
              B Offline
              Brian Delahunty
              wrote on last edited by
              #6

              Number of ways... e.g. GetWindowText() GetDlgItemText() Have a look in MSDN for more info on both these. If it's an MFC app dialog app and you have the Resource ID just use something like: GetDlgItemText(IDC_STATIC, string); where string in a CString reference, for example. Regards, Brian Dela :-)
              Run naked in the snow until you're sweating like a stuck pig and can't seem to catch your breath. When the flu becomes pneumonia, they can cure that with a shot. - Roger Wright

              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