Jump to content
Tuts 4 You

Why MessageBoxs titles are different for null string?


alaphate

Recommended Posts

Posted

Compare these tow messageboxs:

MessageBox(0, 0, 0, 0);

and

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

The captions of them are different.

What's the reason?

Posted (edited)

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
Posted

ghandi,

Thank you!

I should have looked up MSDN and read carefully.

0=='\0' true

'\0'=="" false

0=="" false

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
×
×
  • Create New...