Thread: DialogResult

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    14

    DialogResult

    ok I really dont get why this isnt working for me since I have read about 3 sites that say im doing it right

    heres what ive got
    Code:
    private: System::Void openbut_Click(System::Object^  sender, System::EventArgs^  e) {
    			if( openFileDialog1->ShowDialog() == DialogResult::OK )
    			{
    				openbox->Text = "Testing";
    			}
    		 }
    I get these errors

    Code:
    error C2039: 'OK' : is not a member of 'System::Windows::Forms::Form::DialogResult'
    error C2065: 'OK' : undeclared identifier
    whats wrong here?
    Last edited by Stringer; 10-16-2006 at 01:52 PM.

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    http://msdn2.microsoft.com/en-us/library/c7ykbedk.aspx

    Code:
    if ( testDialog->ShowDialog( this ) == ::DialogResult::OK )
    I don't really know though. Just what I see.

Popular pages Recent additions subscribe to a feed