Answer the question
In order to leave comments, you need to log in
Why can't the ShellExecute() function open a folder?
I am writing a visual application, I encountered such a problem, the ShellExecute () function opens local folders, but remote (server) does not want to, I can’t understand why
ShellExecute(NULL, NULL, L"//10.10.2.1/17_Проекты/Библиотека", NULL, NULL, SW_SHOWNORMAL);
Answer the question
In order to leave comments, you need to log in
I found what the problem is for such tasks, the QFileDialog class is best suited
QString fileName;
if (fileName == nullptr){
fileName = QFileDialog::getOpenFileName(
this,
"Open File",
"//10.10.2.1/17_Проекты/Библиотека",
"file (*.vsd *.vsdx)");}
else {
QErrorMessage *Message = new QErrorMessage();
Message->showMessage("Error");}
Try like this:
ShellExecute(NULL, NULL, L"\\\\10.10.2.1\\17_Проекты\\Библиотека", NULL, NULL, SW_SHOWNORMAL);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question