Re: MessageBox Error
From: Joseph M. Newcomer (newcomer_at_flounder.com)
Date: 06/11/04
- Next message: Joseph M. Newcomer: "Re: CSocket problem"
- Previous message: Joseph M. Newcomer: "Re: gray CMenu items in a Dialog-Based App"
- In reply to: Jakir: "Re: MessageBox Error"
- Next in thread: suhredayan: "Re: MessageBox Error"
- Reply: suhredayan: "Re: MessageBox Error"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Jun 2004 21:29:35 -0400
Don't use sprintf; Use CString::Format. sprintf is one of those quaint calls that rarely
or never should appear in an MFC program.
joe
On 10 Jun 2004 17:04:29 -0700, jakir@coolgoose.com (Jakir) wrote:
>The MessageBox parameter requires char*. Just format the string using sprintf
>and pass that parameter to MessageBox function.
>
>Regards
>Jakir
>"JLO" <geomapa@cybercable.net.mx> wrote in message news:<en2$TYxTEHA.544@TK2MSFTNGP11.phx.gbl>...
>> hello.
>> When i try to get a message from a variable information i get this message
>> error C2664: 'MessageBoxA' : cannot convert parameter 1 from 'int'
>> to 'const char *'
>>
>> here is part of my code
>>
>> int PointsNumber(0);
>> MessageBox(PointsNumber, "Information");
>>
>> thanks for your help
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
- Next message: Joseph M. Newcomer: "Re: CSocket problem"
- Previous message: Joseph M. Newcomer: "Re: gray CMenu items in a Dialog-Based App"
- In reply to: Jakir: "Re: MessageBox Error"
- Next in thread: suhredayan: "Re: MessageBox Error"
- Reply: suhredayan: "Re: MessageBox Error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|