Hi all having a wee bit of difficulty here
Could someone pls help;
Following code finds the word subtotal in the wide string fstr
wchar_t fstr[2000];
int len=(GetWindowTextLength(g_heditqoutebox));
GetDlgItemText(g_hwnd,QUOTE_EDITBOX,fstr,len+1);
wchar_t *ptrx=wcsstr(fstr, L"subtotal");// find where in the string we find subtotal
if (ptrx!=NULL) // found subtotal
{
// now need to delete everything beyond and including subtotal
SetFocus(g_heditqoutebox);
}
Whilst i have the pointer to the beginning of "subtotal" i wish to calculate the length of the wide string up to the beginning of that word and delete from the wide string all text from subtotal to the end of the string
e.g the "massive subtotal is big" needs to become just
"massive"
BTIA gromit