MessageBox Result - pressed buton.

  • Thread starter Thread starter Przemek
  • Start date Start date
P

Przemek

Hi.
I have MessageBox likt that:
MessageBox::Show(S"string1",S"string2", MesageBoxButton::YesNo,
MessageBoxIcon::Error);

How can I get result of pressed button from that MessageBox - I trying to do
something like that:
if(DialogResult::Yes == MessageBox::Show(......))
{
......
}

But whatever I press in MessageBox, 'IF' is always true!
I can change 'DialogResult::Yes' with any numerical value it's still true -
what going on?:)
Thanks for wrote.
 
The code you have should work.
What does MessageBox::Show return
if you put it on a separate row?

/claes
 
* "Przemek said:
I have MessageBox likt that:
MessageBox::Show(S"string1",S"string2", MesageBoxButton::YesNo,
MessageBoxIcon::Error);

How can I get result of pressed button from that MessageBox - I trying to do
something like that:
if(DialogResult::Yes == MessageBox::Show(......))

Set a breakpoint and check what value 'MessageBox::Show' returns.
 
Back
Top