I Need a Close Dialog

I'm having trouble with visual studio C++ (orcus)

I'm trying to make my program prompt to Close when
an event is fired.

currently I just have:

Close();

Which works perfectly fine except It does not prompt the user if they really want to close the application or not

I have tried

result= MessageBox::Show("Are you sure you want to exit?","Exit",MessageBoxButtons::YesNo,MessageBoxIcon::Question);

if (result==DialogResult::Yes)
{ Close(); }

but It gives me a Compile error, Saying 'Yes'
is a undeclared identifier. Please Someone with C++ knowlege, Help me.
[661 byte] By [james245] at [2007-11-20 11:33:04]
# 1 Re: I Need a Close Dialog
if (result == IDOK) // IDCANCEL if cancelled
{
}
Skizmo at 2007-11-10 22:25:04 >