Re: pop up a TCHAR[1024]
- From: "paul" <chu2802@xxxxxxxxx>
- Date: Thu, 13 Apr 2006 20:40:55 +0800
Many thanks, i will go over it asap
best regards,
Paul
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> ¼¶¼g©ó¶l¥ó·s»D:OjMfEZYXGHA.4688@xxxxxxxxxxxxxxxxxxxxxxx
So, you haven't been working on it, huh?data.
-----
{
char testbufs[ 1024 ]; // ANSI buffer to receive data from remote
file
TCHAR testbuff[1024]; // Unicode buffer to receive translated
Note that,null
// if remote file contains
characters, that's where theme,
// string will end after
translation!
DWORD dwDataSize = 0;
DWORD dwBytesRead = 0;
InternetQueryDataAvailable(hOpen, &dwDataSize, 0, 0); // Not sure
why we're doing this
// since we ignore the value!
int j=0;
while (
InternetReadFile( hOpen, testbufs[ j ], 1, &dwBytesRead) &&
( dwBytesRead!=0 )
)
{
j++;
}
// Null terminate the ANSI buffer.
testbuffs[j]='\0';
// Data is in buffer, but in ANSI, not Unicode. Translate it. If it
has null characters,
// other than the one we added at the end above, the string will not
come out right
// after the translation.
MultiByteToWideChar( CP_ACP, 0, testbufs, -1,
testbuff, sizeof( testbuff ) / sizeof( testbuff[0] ),
MessageBox(hDlg, testbuff, TEXT("You've got the licence"),MB_OK);
}
-----
Paul T.
"paul" <chu2802@xxxxxxxxx> wrote in message
news:u%23ToONYXGHA.1084@xxxxxxxxxxxxxxxxxxxxxxx
thanks all your advice and suggestions, i really appreciate.
but i'm sorry that i'm running out of time for the completion of this
function. could anyone kindly do me a favor by modifying the code for
such the the messagebox can pop up with what it read from a text file on
internet.
many thanks!
best regards,
paul
"paul" <chu2802@xxxxxxxxx> ¼¶¼g©ó¶l¥ó·s»D
:ezfP5KtWGHA.4620@xxxxxxxxxxxxxxxxxxxxxxx
hi,
i have
TCHAR buff[1024] = "testing";
MessageBox(hWnd, buff, TEXT("caption"), MB_OK);
it only output the first character of buff, how can i output the whole
string?
regards,
Paul
.
- References:
- pop up a TCHAR[1024]
- From: paul
- Re: pop up a TCHAR[1024]
- From: paul
- Re: pop up a TCHAR[1024]
- From: Paul G. Tobey [eMVP]
- pop up a TCHAR[1024]
- Prev by Date: GetComputername() equivalent in eVC++ 4.20 SP4 ?
- Next by Date: Re: How do I access IO address space
- Previous by thread: Re: pop up a TCHAR[1024]
- Next by thread: Getting notification in the code for headset plug-in / plug-out..
- Index(es):
Relevant Pages
|