How to hide a messagebox before it pops up, in a dialog based app 
Author Message
 How to hide a messagebox before it pops up, in a dialog based app

Which function  can be used to call?
Thanks.


Tue, 14 Sep 2004 03:08:15 GMT  
 How to hide a messagebox before it pops up, in a dialog based app
Try to post a message to your dialog in OnInitDialog(). In the message
handler, you can call ShowWindow() to hide it. Here is another technique:

http://www.mooremvp.freeserve.co.uk/Win32/framed_tip026.htm

--
Ajay Kalra [MVP - VC++]


Quote:
> Which function  can be used to call?
> Thanks.



Tue, 14 Sep 2004 04:55:55 GMT  
 How to hide a messagebox before it pops up, in a dialog based app
Thanks. I should explain my problem clearer.
I am trying to avoid a messagebox from another DLL, which
I can't get a handle. The code is like this:
MyDialog::OnInitDialog()
{
...;
init_dll;//There is a messagebox in this function
...;

Quote:
}

How should I do?

Quote:
>-----Original Message-----
>Try to post a message to your dialog in OnInitDialog().
In the message
>handler, you can call ShowWindow() to hide it. Here is
another technique:

>http://www.mooremvp.freeserve.co.uk/Win32/framed_tip026.ht
m

>--
>Ajay Kalra [MVP - VC++]



>> Which function  can be used to call?
>> Thanks.

>.



Tue, 14 Sep 2004 05:48:49 GMT  
 How to hide a messagebox before it pops up, in a dialog based app

    On way is to load the DLL using LoadLibrary, and patch the
MessageBoxA/MessageBoxW entry in its IAT ( Import Address Table ).

    You need to understand the PE file format to do this. There are great
articles by Matt on this subject in msdn.  Search for

        "Peering Inside the PE: A Tour of the Win32 Portable Executable File
Format"

Cheers
Check Abdoul
------------------


Quote:
> Thanks. I should explain my problem clearer.
> I am trying to avoid a messagebox from another DLL, which
> I can't get a handle. The code is like this:
> MyDialog::OnInitDialog()
> {
> ...;
> init_dll;//There is a messagebox in this function
> ...;
> }

> How should I do?

> >-----Original Message-----
> >Try to post a message to your dialog in OnInitDialog().
> In the message
> >handler, you can call ShowWindow() to hide it. Here is
> another technique:

> >http://www.mooremvp.freeserve.co.uk/Win32/framed_tip026.ht
> m

> >--
> >Ajay Kalra [MVP - VC++]



> >> Which function  can be used to call?
> >> Thanks.

> >.



Tue, 14 Sep 2004 06:02:11 GMT  
 How to hide a messagebox before it pops up, in a dialog based app
Try overriding CWinApp::DoMessageBox  in your app class.  If the other dll
uses AfxMessageBox, this is where it will go.


Quote:
> Thanks. I should explain my problem clearer.
> I am trying to avoid a messagebox from another DLL, which
> I can't get a handle. The code is like this:
> MyDialog::OnInitDialog()
> {
> ...;
> init_dll;//There is a messagebox in this function
> ...;
> }

> How should I do?

> >-----Original Message-----
> >Try to post a message to your dialog in OnInitDialog().
> In the message
> >handler, you can call ShowWindow() to hide it. Here is
> another technique:

> >http://www.mooremvp.freeserve.co.uk/Win32/framed_tip026.ht
> m

> >--
> >Ajay Kalra [MVP - VC++]



> >> Which function  can be used to call?
> >> Thanks.

> >.



Tue, 14 Sep 2004 06:04:40 GMT  
 How to hide a messagebox before it pops up, in a dialog based app
You can also trap the dialog creation using CBT hook and subclass the
dialog. Take a look at SetWindowsHookEx.

--
Ajay Kalra [MVP - VC++]


Quote:
> Thanks. I should explain my problem clearer.
> I am trying to avoid a messagebox from another DLL, which
> I can't get a handle. The code is like this:
> MyDialog::OnInitDialog()
> {
> ...;
> init_dll;//There is a messagebox in this function
> ...;
> }

> How should I do?

> >-----Original Message-----
> >Try to post a message to your dialog in OnInitDialog().
> In the message
> >handler, you can call ShowWindow() to hide it. Here is
> another technique:

> >http://www.mooremvp.freeserve.co.uk/Win32/framed_tip026.ht
> m

> >--
> >Ajay Kalra [MVP - VC++]



> >> Which function  can be used to call?
> >> Thanks.

> >.



Tue, 14 Sep 2004 09:16:10 GMT  
 How to hide a messagebox before it pops up, in a dialog based app
Funnily it just occurred to me that Annabell is trying to suppress a
shareware DLL's reminder messagebox :-)

Means the entire newsgroup [or at least the people who answered] is abetting
piracy of one kind ;-)

Nish



Tue, 14 Sep 2004 20:06:28 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Dialog box pop-ups - SDI vs. MDI apps

2. HOWTO: hide dialog when a dialog-based app starts

3. Help pop-ups in MFC App

4. Pop up menu in Dialog based App

5. creating pop-up menus with dialog based apps gets assert error

6. ::MessageBox does nothing in MFC AppWizard dialog-based app

7. hiding an mfc dialog based app

8. Hide dialog based app on startup

9. Hiding a dialog-based app

10. How can I tell when a dialog based app gets hidden or exposed

11. Hide dialog based apps

12. A: How to start dialog-based app hidden

 

 
Powered by phpBB® Forum Software