DialogResult

This is a discussion on DialogResult within the Windows Programming forums, part of the Platform Specific Boards category; ok I really dont get why this isnt working for me since I have read about 3 sites that say ...

  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.

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21