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