Click here to Skip to main content
15,894,260 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: keep-alive mechanism Pin
Brian Shifrin13-Apr-03 17:37
Brian Shifrin13-Apr-03 17:37 
GeneralRe: keep-alive mechanism Pin
Dudi Avramov13-Apr-03 19:47
Dudi Avramov13-Apr-03 19:47 
QuestionOnQueryEndSession - how to delay its imlementation with some seconds? Pin
julych13-Apr-03 3:50
julych13-Apr-03 3:50 
GeneralQuestion about friend function. Pin
George213-Apr-03 3:49
George213-Apr-03 3:49 
GeneralMessageBox variation Pin
J.B.12-Apr-03 22:23
J.B.12-Apr-03 22:23 
GeneralRe: MessageBox variation Pin
Brian Shifrin13-Apr-03 0:29
Brian Shifrin13-Apr-03 0:29 
GeneralRe: MessageBox variation Pin
Neville Franks13-Apr-03 0:46
Neville Franks13-Apr-03 0:46 
GeneralRe: MessageBox variation Pin
Jean-Marc Molina13-Apr-03 1:49
Jean-Marc Molina13-Apr-03 1:49 
Hello,

The solution is to first format your string, then display the message box. The best way is probably to use a varlist and to implement your own function. Here is my own:

int AfxMessageBoxFormat (LPCTSTR lpszFormat, ...)<br />
{<br />
	// Build message from parameters<br />
<br />
CString s;<br />
<br />
va_list args;<br />
va_start (args, lpszFormat);<br />
<br />
	s.FormatV (lpszFormat, args);<br />
<br />
	va_end (args);<br />
<br />
	// Message box<br />
<br />
	return AfxMessageBox (s);<br />
}


Hope that helps,
JM

Web: http://goa.ifrance.com
GeneralRe: MessageBox variation Pin
J. Dunlap13-Apr-03 7:36
J. Dunlap13-Apr-03 7:36 
GeneralQuestion about overloading operator time_t. Pin
George212-Apr-03 20:34
George212-Apr-03 20:34 
GeneralRe: Question about overloading operator time_t. Pin
markkuk13-Apr-03 0:15
markkuk13-Apr-03 0:15 
GeneralRe: Question about overloading operator time_t. Pin
George213-Apr-03 1:28
George213-Apr-03 1:28 
GeneralRe: Question about overloading operator time_t. Pin
markkuk13-Apr-03 9:57
markkuk13-Apr-03 9:57 
GeneralRe: Question about overloading operator time_t. Pin
George213-Apr-03 17:39
George213-Apr-03 17:39 
GeneralRe: Question about overloading operator time_t. Pin
Michael Dunn13-Apr-03 6:11
sitebuilderMichael Dunn13-Apr-03 6:11 
GeneralRe: Question about overloading operator time_t. Pin
George213-Apr-03 17:38
George213-Apr-03 17:38 
QuestionMSHTML get empty document? Pin
Kevein12-Apr-03 17:00
Kevein12-Apr-03 17:00 
AnswerRe: MSHTML get empty document? Pin
nde_plume13-Apr-03 12:06
nde_plume13-Apr-03 12:06 
QuestionAdd Member Function-VC ++ 6.0 bug? Pin
7stud12-Apr-03 16:46
7stud12-Apr-03 16:46 
Generalnot getting messages Pin
cgreathouse12-Apr-03 14:50
cgreathouse12-Apr-03 14:50 
GeneralRe: not getting messages Pin
Miszou14-Apr-03 6:48
Miszou14-Apr-03 6:48 
QuestionSending a CString to an edit control? Pin
stf12-Apr-03 13:43
stf12-Apr-03 13:43 
AnswerRe: Sending a CString to an edit control? Pin
Ravi Bhavnani12-Apr-03 14:03
professionalRavi Bhavnani12-Apr-03 14:03 
GeneralRe: Sending a CString to an edit control? Pin
stf12-Apr-03 16:10
stf12-Apr-03 16:10 
Generaldynamic memory allocation Pin
SHaroz12-Apr-03 12:57
SHaroz12-Apr-03 12:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.