i am trying to get windows text in c++, i need to get the windows text and then extract certain part as my string such as: my name is raj, now here i need the part "raj" how do i do that in vc++?
Printable View
i am trying to get windows text in c++, i need to get the windows text and then extract certain part as my string such as: my name is raj, now here i need the part "raj" how do i do that in vc++?
If the text that you want to get is in a CString,
you just have to look in the (Class Member ) of the CString class
and you will find the function that you need or you can try
char buffer[4];
char name[] = "raj name";
int a;
for (a=0; a<3; a++)
{
buffer[a] = name[a];
}
I'm tired and i'm not sure if the best for this is for or while.
Serge Gagnon
Hi.
CSring as memer 2 functions thatyou can use for this case:
ine if CString::Find and the second is CString::GetAt(int Position);
the first will find some char inside this string.
the second will retrive the current char that place in this position.
HTH
kishk91
[email protected]
http://www.path.co.il
ICQ: 13610258
Use CString member functions Mid,Left and Right to extract part of a string.