🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.windows.misc
2 messages
2 total messages Started by Diane Kurilecz Thu, 20 Oct 1988 16:07
MS Windows -- edit controls
#1055
Author: Diane Kurilecz
Date: Thu, 20 Oct 1988 16:07
11 lines
738 bytes
I've got a problem in ms-windows.

I have an edit-class window into which i am trying to open a file.
So far, so good.  However, i would like to then open an additional
file.  I can't seem to get it tacked on to the end of the current
edit control without losing what's already there.

Does anyone have any suggestions?

                       -- diane
Re: MS Windows -- edit controls
#1056
Author: Bill Turner
Date: Fri, 21 Oct 1988 17:03
24 lines
1414 bytes
> I have an edit-class window into which i am trying to open a file.
> So far, so good.  However, i would like to then open an additional
> file.  I can't seem to get it tacked on to the end of the current
> edit control without losing what's already there.

How are you getting the first file into the edit control?

I haven't done this myself, but I have two suggestions on how to
proceed:

1) When you are ready to append the second file, send a EM_GETHANDLE
message to the edit (which returns the local handle of its buffer),
then LocalReAlloc it to the required size and read the text onto
the end of the buffer.

2) Read the text into a block of memory, then EM_SETSEL to the end of
file (I believe that if you specify start and end as the same it moves
the cursor to that location), and EM_REPLACESEL to replace the (null)
selection with the text you've read.

(My preferences lean toward the first suggestion, since I'm not sure
if SETSEL works as I think it does...)

--Bill Turner
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads