Re: show dialog result?
- From: "Frank Hickman [MVP]" <fhickman3_NOSP@xxxxxxxxxxxxxxx>
- Date: Tue, 23 Aug 2005 16:40:19 -0400
"iwdu15" <iwdu15@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6DF4CA33-B705-47FA-96D1-9DF936107D1F@xxxxxxxxxxxxxxxx
> hi, im a relative noob to C++ so im wondering how u can tell if the user
> pushed the "ok" button on a show dialog, like the equivilent of VB.net's
> "if
> showdialog = dialogresult.ok then
>
> heres the code i have to show a savefiledialog
>
> private: System::Void btnsave_Click(System::Object * sender,
> System::EventArgs * e)
> {
> this ->saveFileDialog1->set_Filter("TXT *.txt|(*.txt)|Doc
> *.doc|(*.doc)");
> this ->saveFileDialog1->set_FilterIndex(0);
> this->saveFileDialog1->ShowDialog();
> }
>
> };
>
> --
> -iwdu15
Did you look at the online help? Try something like this...
if ( this->saveFileDialog1->ShowDialog() == DialogResult.OK )
{
// do stuff...
}
--
============
Frank Hickman
Microsoft MVP
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.
.
- References:
- show dialog result?
- From: iwdu15
- show dialog result?
- Prev by Date: Re: Encrypting passwords
- Next by Date: Re: Encrypting passwords
- Previous by thread: show dialog result?
- Next by thread: Number of Open Files
- Index(es):