Sometimes you might have seen that application which loads some files, showing its path in the title bar with its short form. we can do it simply by 2-3 lines of code.
Note the API are defined at shlwapi.h and we should link with shlwapi.lib
See the output


CString strEditText("C:\\test\\test\\test\\test\\test\\etst.xyz");
PathCompactPath(GetDC()->m_hDC,strEditText.GetBuffer(0),125);
strEditText.ReleaseBuffer();
Regards,
SaRath.
"Don't Do Different things… Do Things Differently…"
