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. Automatically close message box

Automatically close message box

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
2 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.
  • S Offline
    S Offline
    sandhyanp
    wrote on last edited by
    #1

    Hi. I'm using a DLL provided by someone else which throws up a message box in case of an error in some function within the DLL. Is there some way I can suppress these message boxes? Asking the person who wrote the DLL to get rid of them doesn't work. Any useful suggestions would be appreciated. Thanks, Sandhya.

    R 1 Reply Last reply
    0
    • S sandhyanp

      Hi. I'm using a DLL provided by someone else which throws up a message box in case of an error in some function within the DLL. Is there some way I can suppress these message boxes? Asking the person who wrote the DLL to get rid of them doesn't work. Any useful suggestions would be appreciated. Thanks, Sandhya.

      R Offline
      R Offline
      RaajaOfSelf
      wrote on last edited by
      #2

      This would the nearest i can think of ... 1.Before you call any function of that DLL ,call SetWIndowsHookEx(WH_CBT,CBTProc ,GetApp()->m_hInstance , GetcurrentThreadId()) You need to write the CBTProc Function .refet MSDN for it .In that function you can trap any messages for all the windows create din ur application . 2.AFter you are thru with calling the DLL function ,call UnhookWindowsHookEx() To read more ,there is en excellent article by Nishant and SHog .If you follow the MFC way ( CDelayMessageBox 2 ) ,you can do this easily . Click This to know more .. Cause is my effort; Effect is God's effort

      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