It seems ShellExecute as is can't do that. If you specify open operation, it defines (in the registry) file open mode for the corresponding application...
If you use Shellexecute to open files for the SAME program, look out for the program line arguments , there mighrt be one that opens files as read-only (excel and word I think ahve this feature)
HTH,
s-)
Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
You could modify the file with the code below and then open it. It is a bit of a work around but ShellExecute will open the file read only. Then you can reverse this with a
"&= ~(CFile::readOnly)"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.