How to make the message box appear after the dialog jumps out

xiaoxiao2021-03-06  40

Master: How to make the message box appear after the dialog jumps out? Servers: LittleLine () 等: Credit: 100 Community: VC / MFC Basics Questions Points: 50 Reposted: 17 Posted: 2004-7-14 11:21:12

After I want to jump out of the dialog, the program automatically jumps out a message prompt box, how to write?

I put AFXMessagebox in the beginning of the initialization, but the result is that the prompt box will be jumped before jumping out of the dialog! Help!

Reply to: gunj (3,000 thousand things) () Reputation: 99 2004-7-14 11:25:11 Score: 2

Set a timer in the dialog box!

SetTimer ()

Put AfxMessagebox in the response function ontimer ().

TOP

Reply to: cslren (bits) () Reputation: 100 2004-7-14 11:26:49 Score: 8

You can pop up behind onshow

TOP

Reply to: cslren (bits) () Reputation: 100 2004-7-14 11:29:48 Score: 0

In short, you can display the message after displaying the dialog, you can track it in the MFC to see, see which step display dialog box, then display the message box behind it.

TOP

Reply to: Bluebohe (Mint) () Reputation: 143 2004-7-14 11:30:01 Score: 10

STATIC I = 0;

IF (i == 0)

{

i = 1;

AfxMessageBox ("asfjklsadf");

}

This sentence is added in ONPAINT

TOP

Reply to: csdmy (in depression) () Reputation: 95 2004-7-14 11:30:30 Score: 2

First create your dialog, or first show your dialog box! Then execute the message prompt box! If you are too speed, use the timer. If you delay your 500 milliseconds?

TOP

Reply to: wwww2 () () Reputation: 98 2004-7-14 11:33:29 Score: 10

Adding a showWindow in AfxMessageBox

TOP

Reply to: DevilPlus (Window Square) () Reputation: 100 2004-7-14 11:34:38 ​​Score: 2

Put AfxMessagebox in the destructor of the dialog

TOP

Reply to: cslren (bits) () Reputation: 100 2004-7-14 11:35:19 Score: 0

I think

STATIC I = 0;

IF (i == 0)

{

i = 1;

AfxMessageBox ("asfjklsadf");

}

This sentence is added in ONPAINT

This is too wasteful.

TOP

Reply to: cslren (bit "() Reputation: 100 2004-7-14 11:35:37 Score: 0

There must be better ways

TOP

Reply to: longlong1129 (玲) () Reputation: 109 2004-7-14 11:58:45 Score: 10

Bool ctestdlg :: oninitdialog ()

{

CDIALOG :: OnInitdialog ();

.

.(slightly)

.

.

Seticon (M_Hicon, True); // set Big icon

Seticon (M_HICON, FALSE); // set small icon // Todo: Add Extra Initialization Here

:: ShowWindow (M_HWND, SW_SHOW);

AfxMessageBox ("You want the result");

Return True;

}

TOP

Reply to: bianguowei () () Reputation: 90 2004-7-14 12:02:36 Score: 2

Bool cbbdlg :: oninitdialog ()

{

// Todo: Add Extra Initialization Here

SetTimer (1,1000, null);

Return True; // Return True UnsS you set the focus to a control

}

Void cbbdlg :: ONTIMER (uint nidevent)

{

// Todo: add your message handler code here and / or call default

Killtimer (1);

MessageBox ("OK");

CDIALOG :: ONTIMER (Nidevent);

}

TOP

Reply to: cslren (bit "() reputation: 100 2004-7-14 12:03:10 Score: 0

This is still almost, but I don't know if I can run, the best way is to overrun. Onshow.

TOP

Reply to: lixiaosan (small 3) () Reputation: 120 2004-7-14 12:12:40 Score: 2

Ontimer is not good, it should be

TOP

Reply to: cslren (bits) () Reputation: 100 2004-7-14 12:17:23 Score: 0

Personally don't like the structure of Ontimer, I can do something executed in order, I feel a little more, and then SETIMER does not necessarily succeed.

TOP

Reply to: maxcode (zhangjianfang) () Reputation: 99 2004-7-14 13:10:39 Score: 2

CSLREN's method 8 is wrong, adopted! ! ! !

Overload onshowwindow

Void Caboutdlg :: OnshowWindow (Bool Bshow, Uint Nstatus)

{

CDIALOG :: OnShowWindow (BShow, NStatus);

AfxMessageBox ("TA; SFDKSAJ; FJA; S");

}

This is what you want! ! !

TOP

Reply to: LittleLine () () Reputation: 100 2004-7-14 14:06:53 Score: 0

Thank you, overShowWindow doesn't seem to be realized, my last use of Longlong 1129 (Ling Ling) method, thank you.

TOP

Reply to: longlong1129 (玲) () Reputation: 109 2004-07-15 20:39:00 Score: 0

Welcome

TOP

转载请注明原文地址:https://www.9cbs.com/read-73377.html

New Post(0)