Re: pop up a TCHAR[1024]

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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?

-----

{
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








.



Relevant Pages

  • Re: pop up a TCHAR[1024]
    ... characters, that's where the ... // other than the one we added at the end above, the string will not ... // after the translation. ... best regards, ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Multi-Language Site
    ... a meaningfull string would be a better option IMO, ... GetTrans(StringId, LanguageId) function, to fetch the wanted translated ... and also request them by page (less data to request = ... you might consider storing all translation data in the Application ...
    (microsoft.public.inetserver.asp.db)
  • Re: Which is this sentence
    ... But in order to achieve this translation ... is objectionable in NAFL). ... This superposition state is similar to the Schrodinger cat's ... Now define the "fixed point term" for any string S to be ...
    (sci.logic)
  • Re: Language Selcection Philosophy
    ... This is the general approach of GNU gettext, ... The basic idea is that each string literal is replaced by a call to ... A utility extracts all these from the source and builds a "translation ... In the actual code, the _macro invocations ...
    (comp.arch.embedded)
  • Re: Anyone wanna help with a compression routine (new type)
    ... Pi is an infinite pseudorandom string. ... we know: For every language a part of at least 1 ... The problem is an important one as the compression of an algorithm ... translation by having a language pair. ...
    (sci.math.research)