Jump to content
Tuts 4 You
Sign in to follow this  
alaphate

Why MessageBoxs titles are different for null string?

Recommended Posts

alaphate

Compare these tow messageboxs:

MessageBox(0, 0, 0, 0);

and

MessageBox(0, 0, "", 0);

The captions of them are different.

What's the reason?

Share this post


Link to post
ghandi

Passing a null string will actually pass the empty buffer, passing NULL as the parameter (0) causes the system to use a stock error title, if i recall correctly it is 'Error', which is inventive and descriptive all in one... Google is still our best friend for information like this...

http://msdn.microsof...5(v=vs.85).aspx

Ghandi

Edited by ghandi (see edit history)

Share this post


Link to post
alaphate

ghandi,

Thank you!

I should have looked up MSDN and read carefully.

0=='\0' true

'\0'=="" false

0=="" false

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×
×
  • Create New...