-
March 26th, 2013, 10:14 PM
#1
dialog box for visual studios2005
i've took some codes from VS 2010 to make a dialog box in VS 2005 but there are errors to it. can someone help me with this problem. the codes are stated below.
OpenFileDialog ^ openFileDialog1= gcnew OpenFileDialog();
OpenFileDialog1->Filter = "Image Files|*.tif";
OpenFileDialog1->Title = "Select a Image File";
// Show the Dialog.
// If the user clicked OK in the dialog and
// a .CUR file was selected, open it.
if (OpenFileDialog1->Sho() == System::Windows::Forms:ialogResult::OK)
{
// Assign the cursor in the Stream to
// the Form's Cursor property.
marshal_context ^ context = gcnew marshal_context();
const char* str4 = context->marshal_as<const char*>(openFileDialog1->FileName);
IplImage* img = cvLoadImage(str4);
cvNamedWindow("MyWindow");
cvShowImage("MyWindow", img);
cvWaitKey(0);
cvDestroyWindow("MyWindow");
cvReleaseImage(&img);
// return 0;
// this->Cursor = gcnew
// System::Windows::Forms::Cursor(
// openFileDialog1->OpenFile());
}
}
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|