c++ - Container folder modification -
using mfc dialog box application in vc++,
i have file path(without end file) displayed in edit box. path represents container folder location file:
cstring container = mypath.left(mypath.reversefind(_t('\\'))); m_container.setwindowtext(container);
the variable 'mypath' holds current directory(full path).
for example, c:\de1\progs\dev\freetest\gm.prg
with container displayed as: c:\de1\progs\dev\freetest
how can modify container folder(i.e. 'freetest') , restrict changes further path within edit box? there specific function or method this
you can use spanincluding(or spanexcluding) function of cstring. please check link https://msdn.microsoft.com/en-us/library/aa300657(v=vs.60).aspx
Comments
Post a Comment