|
-
August 27th, 2003, 08:17 AM
#10
Well from MSDN, SetHandle:
Call this function to set the handle to the local memory that will be used by a multiple-line edit control. The edit control will then use this buffer to store the currently displayed text instead of allocating its own buffer.
This seems to be a really weird implementation for These functions to use... Once the SerializeRaw() method is finished, do you still have access to the data? If so, try setting the edit text (setwindowtext) directly from that buffer. If I were doing this code, I'd avoid the serialization and do my own file handling, as it seems like overkill to use it...
Just read through the code for SerializeRaw(), as I was writing this... I have no clue as to why they'd (MS) want to change the handle (the edit ctrl's internal text buffer)... I'd think about overriding the SerializeRaw method in your code, copy the stuff from the CEditView::SerializeRaw() method to your method and
change it to allocate the memory, read the archive, and call setwindowtext. You don't need to use the LocalAlloc, Lock & Unlock stuff, as that's only for 16-bit windows compatibility...
The only reason I can think of for using the SetHandle stuff, is that it's a work around for the limit of text in a CEdit.
bytz
--This signature left intentionally blank--
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
|