Hi,
I'm trying to utilize string resources in a project I'm doing using GapiDraw.
If I define an entry in the string table like this:
NAME:IDS_STRING
VALUE:1
CAPTION:Line 1\nLine 2\nLine 3\n
Since I don't own a pocket PC yet I'm using the window ce pocket pc emulator (could this be the problem?)
Then if I run the following code withing createsurfaces:
Then if I use the windows ce remote file viewer and transfer file.txt to my computer and open it it looks like this where _ is a space
L_i_n_e___1_
_L_i_n_e___2_
_L_i_n_e___3_
There seems to be spaces between every character of the original resource string. Is this something to do with the TCHAR stuff or is it a flaw in the emulator?
The main reason is eventually I want to tokenize the resource string with _tcstok but when I tried doing that it failed miserably with the token TEXT('\n') and TEXT("\n").
Any advice on how to change things? Or is this just the standard functionality for string resources. Am I using ::LoadString incorrectly?
Thanks for any assistance,
CM
I'm trying to utilize string resources in a project I'm doing using GapiDraw.
If I define an entry in the string table like this:
NAME:IDS_STRING
VALUE:1
CAPTION:Line 1\nLine 2\nLine 3\n
Since I don't own a pocket PC yet I'm using the window ce pocket pc emulator (could this be the problem?)
Then if I run the following code withing createsurfaces:
- Code:
TCHAR buffer[1000];
::LoadString(hInstance,1,buffer,1000);
FILE *file;
file = _tfopen(TEXT("file.txt"),TEXT("at"));
fwrite(buffer,sizeof(TCHAR),_tcslen(buffer),file);
fclose(file);
Then if I use the windows ce remote file viewer and transfer file.txt to my computer and open it it looks like this where _ is a space
L_i_n_e___1_
_L_i_n_e___2_
_L_i_n_e___3_
There seems to be spaces between every character of the original resource string. Is this something to do with the TCHAR stuff or is it a flaw in the emulator?
The main reason is eventually I want to tokenize the resource string with _tcstok but when I tried doing that it failed miserably with the token TEXT('\n') and TEXT("\n").
Any advice on how to change things? Or is this just the standard functionality for string resources. Am I using ::LoadString incorrectly?
Thanks for any assistance,
CM