RE: RichEdit title bar text

new topic     » goto parent     » topic index » view thread      » older message » newer message

I guess this is how I would get around it.  Create a child window 
containing the richedit control.  This way you can set the title of the 
child window using setText().  You can also resize the window...
----------------------
include Win32Lib.ew
without warning

constant
  Win = create( Window, "Main", 0, Default, Default, 400, 400, 0 ),
  ChildWin = create( Window, "Sub Window", Win, 0, 0, 0, 0, 
{WS_SIZEBOX,WS_CAPTION,WS_CHILD} ),
  Redt = create( RichEdit, "", ChildWin, 0, 0, 0, 0, 0 )

procedure onResize_ChildWin( integer id, integer event, sequence params 
)
  setRect( Redt, 0, 0, params[2], params[3], 0 )
end procedure
setHandler( ChildWin, w32HResize, routine_id( "onResize_ChildWin" ) )

procedure onOpen_Win( integer id, integer event, sequence params )  
  openWindow( ChildWin, Normal )
  setRect( ChildWin, 10, 10, 370, 350, 1 )
end procedure
setHandler( Win, w32HOpen, routine_id( "onOpen_Win" ) )

WinMain( Win, Normal )
----------------------


Brian Broker wrote:
> Got me... both 'SetWindowText' and message WM_SETTEXT appear to set 
> *both* the title and the data (on WinXP).  Not sure how you'd get around 
> 
> this one.  The only thing I can think of is that RichEdit controls 
> aren't meant to have captions(?)
> 
> -- Brian
> 
> 
> Brian Broker wrote:
> > I guess I have to retract my reply since the PSDK states that "A rich 
> > edit control is a window in which the user can enter, edit, format, 
> > print, and save text."  I didn't know that you could have a richedit 
> > control with a title...
> > 
> > I'll have to figure out the the correct message to send to the control.
> > 
> > -- Brian
> > 
> > Brian Broker wrote:
> > > A control is not a window.  A window contains the control.  Use 
> > > setText() on the window containing the richedit control.
> > > 
> > > -- Brian
> > > 
> > > 
> > > tone.skoda wrote:
> > > > i got a simple question:
> > > > how do you set window title to RichEdit control?
> > > > not the data but title bar, window has style WS_CAPTION
> > > > 
> > > > setText() changes data not title
> > > 
> > > 
> > >

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu