|
-
Oct 2nd, 2001, 02:35 PM
#1
Thread Starter
Black Cat
Filling the first word of the buffer
MSDN says to use the EM_GETLINE message to get the text of an edit, you have to "set the first word of this buffer to the size, in TCHARs, of the buffer". It seems to work without doing so, but am I doing this right?
Code:
int length = 0;
char * pchText = NULL;
WORD mp = (WORD)MAX_PATH; \\???
pchText = (CHAR*)HeapAlloc(GetProcessHeap(), 0, MAX_PATH);
CopyMemory(pchText, &mp, sizeof(WORD)); \\???
length = SendMessage(g_hSource, EM_GETLINE, 0, (LPARAM)pchText);
pchText[length+1] = '\0';
MessageBox(0, pchText, "test", MB_OK);
HeapFree(GetProcessHeap(), 0, pchText);
Thanks.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Oct 2nd, 2001, 04:35 PM
#2
Yeah, this is right. I don't know about intel byte order, butI think windows can handle this.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 3rd, 2001, 06:35 AM
#3
Thread Starter
Black Cat
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|