Re: Adding Text to Richedit Control
- Posted by tone.skoda at gmx.net Nov 12, 2002
- 365 views
You can use this routine: --/* -- edittext_add_text [Created on 1. June 2002, 07:54] -- The 'edittext_add_text' procedure adds text -- to end of standard windows edit control. Previous text -- doesnt get deleted. -- -- PARAMETERS -- 'id' -- Edit window. -- 'text' -- Text to add to end. --*/ global procedure edittext_add_text (integer id, sequence text) atom mset, pstr mset = new_memset() pstr = acquire_mem( mset, text ) Void=sendMessage(id,EM_SETSEL,-1,-1) Void=sendMessage(id,EM_REPLACESEL,true,pstr) release_mem(mset) end procedure ----- Original Message ----- From: "C. K. Lester" <cklester at yahoo.com> To: "EUforum" <EUforum at topica.com> Sent: Tuesday, November 12, 2002 2:28 AM Subject: Adding Text to Richedit Control > > I'm considering my very first Windows(tm) program and am going to need a > little help. > > To start out simple, I'm thinking of just using a Richedit control to > display what would normally be displayed using puts()... > > How would I add text to simulate the DOS screen display? I've got the > following to start: > > -- code generated by Win32Lib IDE v0.14.2 > > include Win32Lib.ew > without warning > > -------------------------------------------------------------------------- -- > ---- > -- Window MainWin > constant MainWin = createEx( Window, "MatrixLife", 0, Default, Default, 400, > 300, 0, 0 ) > constant RichEdit2 = createEx( RichEdit, "", MainWin, 4, 28, 384, 244, > or_all({ES_NOHIDESEL}), 0 ) > --------------------------------------------------------- > > WinMain( MainWin,Normal ) > > > >