Re: pop up a TCHAR[1024]
- From: "<ctacke/>" <ctacke_AT_OpenNETCF_com>
- Date: Tue, 11 Apr 2006 23:19:30 -0400
Send me your paycheck and I'll send you the modified code. Then tell your
employer and maybe we can remove the middle man.
-Chris
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:OjMfEZYXGHA.4688@xxxxxxxxxxxxxxxxxxxxxxx
So, you haven't been working on it, huh?
-----
{
char testbufs[ 1024 ]; // ANSI buffer to receive data from remote
file
TCHAR testbuff[1024]; // Unicode buffer to receive translated data.
Note that,
// if remote file contains
null characters, that's where the
// 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 me,
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: Re: Diff Tool
- Next by Date: Re: Can I use a jpg picture as view's background?(WCE.NET 4.2 eVC+
- Previous by thread: Re: pop up a TCHAR[1024]
- Next by thread: Re: pop up a TCHAR[1024]
- Index(es):
Relevant Pages
|