A question about MessageBox() 
Author Message
 A question about MessageBox()

     I am writing a multiple documents program, and I want to create a
prompt dialog after this program running,so I used the following function

     MessageBox("Start!","myself prompt title",MB_OK);

But when I put it in the  BOOL CExam1App::InitInstance(),I can just use the
following way MessageBox("3D?a?!",MB_OK); It couldn't be satisified with
me. I could use it completely in --->  int
CExam1View::OnCreate(LPCREATESTRUCT lpCreateStruct),but it isn't my request.

    So who will give me a hand?  TIA.



Thu, 15 Sep 2005 16:49:06 GMT  
 A question about MessageBox()

Quote:

> I am writing a multiple documents program, and I want to create a
> prompt dialog after this program running,so I used the following
> function

> MessageBox("Start!","myself prompt title",MB_OK);

> But when I put it in the  BOOL CExam1App::InitInstance(),I can just
> use the following way MessageBox("3D?a?!",MB_OK); It couldn't be
> satisified with me. I could use it completely in --->  int
> CExam1View::OnCreate(LPCREATESTRUCT lpCreateStruct),but it isn't my
> request.

> So who will give me a hand?  TIA.

Look, AfxMessageBox(...), the Win32 MessageBox documentation, and the
CWnd::MessageBox documentation, it should help you to understand.

--
Quentin Pouplard (Tene/MyOE)
http://graff.alrj.org



Thu, 15 Sep 2005 17:04:12 GMT  
 A question about MessageBox()

Quote:
>      I am writing a multiple documents program, and I want to create a
> prompt dialog after this program running,so I used the following
function

>      MessageBox("Start!","myself prompt title",MB_OK);

> But when I put it in the  BOOL CExam1App::InitInstance(),I can just
use the
> following way MessageBox("3D?a?!",MB_OK); It couldn't be satisified
with
> me. I could use it completely in --->  int
> CExam1View::OnCreate(LPCREATESTRUCT lpCreateStruct),but it isn't my

request.

In InitInstance you can try...

 // The one and only window has been initialized, so show and update it.
 m_pMainWnd->CenterWindow();
 m_pMainWnd->ShowWindow(SW_SHOW);
 m_pMainWnd->UpdateWindow();

 m_pMainWnd->MessageBox(_T("Start!"), _T("myself prompt title"), MB_OK);

--
Jeff Partch [VC++ MVP]



Thu, 15 Sep 2005 17:12:09 GMT  
 A question about MessageBox()


Wed, 18 Jun 1902 01:00:00 GMT  
 A question about MessageBox()


Fri, 16 Sep 2005 17:38:23 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Another Question (dialog/messagebox)

2. Simple question about MessageBox and ToolTip

3. messagebox formatting question

4. MessageBox() - quick question

5. A rather simple MessageBox question

6. MessageBox question

7. Question about use of messagebox on a dialog box?Thank you

8. MessageBox question

9. simple messagebox question

10. Messagebox question

11. MessageBox Question

12. MessageBox question

 

 
Powered by phpBB® Forum Software