|
TOP
|
|
对话方块(六十九)
text, write the // byte order mark to the file.
#ifdef UNICODE WriteFile (hFile, &wByteOrderMark, 2, &dwBytesWritten, NULL) ; #endif // Get the edit buffer and write that out to the file. GetWindowText (hwndEdit, pstrBuffer, iLength + 1) ; WriteFile (hFile, pstrBuffer, iLength * sizeof (TCHAR), &dwBytesWritten, NULL) ; if ((iLength * sizeof (TCHAR)) != (int) dwBytesWritten) { CloseHandle (hFile) ; free (pstrBuffer) ; return FALSE ; } CloseHandle (hFile) ; free (pstrBuffer) ; return TRUE ; }
|
|