Hi...
I saw a simmilar problem in this forum, but now i have a new problem....
I want to read string from a txt file: "myfile.txt".....
inside the file: "i want to read this text".
then I write:
LRESULT CALLBACK WindowProcedure(HWND hwnd....
HDC hDC;
PAINTSTRUCT Ps;
HANDLE hFile;
DWORD n;
char someread[24];
switch (message)
{
case WM_CREATE:
hFile = CreateFile ( "myfile.txt", GENERIC_READ, 0, NULL,OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
ReadFile(hFile, &someread, sizeof(someread), &n, 0);
CloseHandle ( hFile );
break;
case WM_PAINT:
hDC = BeginPaint(hwnd, &Ps);
TextOut(hDC,0,0,someread,24);
EndPaint(hwnd, &Ps);
break;
case WM_DESTROY:......
But when i run this.......in the client area don't appear: "i want to read this text"
appear something as :"¼üAD1ýüAD2ýüAD3ýüAD4"....
I don't understand.....
ReadFile give BYTE but no char???....Unicode???...ascii???.....TextOut()????
Please help me......
Thanks.....