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. Possible to kill MessageBox?

Possible to kill MessageBox?

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 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.
  • J Offline
    J Offline
    J B 0
    wrote on last edited by
    #1

    Hello guys, I am wondering if there is a way to get a handler and so to kill the messageboxes created by ::MessageBox() or AfxMessageBox() from other thread? Or I have no choice but to manually make a class to produce the very same dialogue and kill it by destroy the class. Thanks alot

    R A C 3 Replies Last reply
    0
    • J J B 0

      Hello guys, I am wondering if there is a way to get a handler and so to kill the messageboxes created by ::MessageBox() or AfxMessageBox() from other thread? Or I have no choice but to manually make a class to produce the very same dialogue and kill it by destroy the class. Thanks alot

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      This[^] article that describes an auto-close modal dialog may come in handy. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

      1 Reply Last reply
      0
      • J J B 0

        Hello guys, I am wondering if there is a way to get a handler and so to kill the messageboxes created by ::MessageBox() or AfxMessageBox() from other thread? Or I have no choice but to manually make a class to produce the very same dialogue and kill it by destroy the class. Thanks alot

        C Offline
        C Offline
        casid
        wrote on last edited by
        #3

        Check out GetLastActivePopup :)

        1 Reply Last reply
        0
        • J J B 0

          Hello guys, I am wondering if there is a way to get a handler and so to kill the messageboxes created by ::MessageBox() or AfxMessageBox() from other thread? Or I have no choice but to manually make a class to produce the very same dialogue and kill it by destroy the class. Thanks alot

          A Offline
          A Offline
          Alvaro Mendez
          wrote on last edited by
          #4

          You may use FindWindow to retrieve the message box's handle which then you can destroy with DestroyWindow. Regards, Alvaro


          Give a man a fish, he owes you one fish. Teach a man to fish, you give up your monopoly on fisheries.

          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