MinnisotaFreezing
Programmer
Ok. If I go
TextOut(hdc, 0, 0, TEXT("Hello!", sizeof("Hello!"
my string will come out the right length. But if I go
TCHAR * strBuff = "Hello!";
TextOut(hdc, 0, 0, strBuff, sizeof(strBuff));
it will not work because the pointer is smaller than the string, right, the reason to use a pointer. My question is, how can I get the length for TextOut dynamically using a pointer? That is
TextOut (hdc, 0, 0, strBuff, 6);
works with "Hello!" but if I want to change the string, I must then change the 6. I guess I'm looking for a Len() equivilent for C++.
Any help is greatly appriciated,
Thanks,
CJB
TextOut(hdc, 0, 0, TEXT("Hello!", sizeof("Hello!"
my string will come out the right length. But if I go
TCHAR * strBuff = "Hello!";
TextOut(hdc, 0, 0, strBuff, sizeof(strBuff));
it will not work because the pointer is smaller than the string, right, the reason to use a pointer. My question is, how can I get the length for TextOut dynamically using a pointer? That is
TextOut (hdc, 0, 0, strBuff, 6);
works with "Hello!" but if I want to change the string, I must then change the 6. I guess I'm looking for a Len() equivilent for C++.
Any help is greatly appriciated,
Thanks,
CJB