0

I am having a dialog box opens that lets you select a picture and then copy that picture to another folder but the problem is that i am having an error that says that i can't convert a System::String to a LPCTSTR.
I searched this subject on google but i spent the whole day trying to figure it out.
How should i convert a System::string to a LPCTSR?

if ( openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK )
            {
                strpic=openFileDialog1->FileName;
                CopyFile(strpic,L"pic/",false);
            }
2
Contributors
1
Reply
15
Views
4 Years
Discussion Span
Last Post by Suzie999
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.