hi,
i've some zero terminated strings that i want to put on my window with TextOut. but when i run the program on windows nt there is a square directly after the string. i thought that it has something to do with that zero at the end of the string. is that right? what can i do against that? is the identifier of the end of strings something else than in windows 9x?
tnx.
TextOut requires you to give it a length of the string, so if you have:-
MyString db 'abcd',0
then the length is 4, if you specify the length as 5 you will see the little square.
Use lstrlen to find the length....
If you want an example I'll post it here.
umbongo
no thank you. i got it. but, does sizeof string doesn't return the length of the string correctly?
sizeof will give you the total size, including the null at the end. use lstrlen :)
Umbongo