Here is the problem:
I have a path to a file like \Windows\Start Menu\Accessorie s\Calculator.ln k and I am trying to truncate it down to just "Calculator ".
First I am copying the recentItem (which is just a struct that has a TCHAR array called path -- which is the path to the shortcut) path to the pItem (which is just a struct that my WinMain method uses to populate a popup menu, that contains a label and a path -- where label is like "Calculator "). Then I truncate the label to remove the .lnk, so I am left with \Windows\Start Menu\Accessorie s\Calculator. Now I want to get rid of everything up to the last back-whack. Any ideas? I'm using all Win32 stuff here.
I have a path to a file like \Windows\Start Menu\Accessorie s\Calculator.ln k and I am trying to truncate it down to just "Calculator ".
Code:
_tcscpy(pItem->label, recentItem->path); *wcsrchr (pItem->label, '.') = '\0';
Comment