PDA

View Full Version : Anyone Ever Used Windowless Rich Edit Controls?



MattInglot
08-30-2004, 09:15 PM
For CustomBar I have been using Windowless Rich Edit controls for enabling skinned edit boxes. Unfortunately the documentation in MSDN on these is poor at best. After fighting for two years on and off with this stuff I still have two major problems:

1) I cannot get scrolling to work. Period. It'll scroll along with the caret but getting scrollbars I have no idea how.

2) On some computers random characters get shoved in when using these boxes in conjunction with autocomplete.

I based my code on the MS example and heavily hacked it into something less buggy but still horribly messy and incoherent.

I'm also open to alternative ideas for providing the functionality of an edit box and having complete control over how the background is drawn and what the text color is (and some other details, but this is big general requirement).

patrox
08-30-2004, 10:44 PM
1) I cannot get scrolling to work. Period. It'll scroll along with the caret but getting scrollbars I have no idea how.

add this to the style WS_HSCROLL | WS_VSCROLL when creating the control.

pat.

MattInglot
08-30-2004, 11:18 PM
That creates scrollbars but doesn't actually make them work unfortunately.

Google brings up almost nothing on the subject of windowless rich edits.

patrox
08-31-2004, 03:16 AM
That creates scrollbars but doesn't actually make them work unfortunately.

Google brings up almost nothing on the subject of windowless rich edits.

CreateWindowEx( WS_EX_CLIENTEDGE,"RICHEDIT","test", WS_CHILD | ES_MULTILINE | WS_VISIBLE | WS_VSCROLL , etc...

works just fine.
Did you load the rich edit DLL before creating the rich edit control ?
you have to call: LoadLibrary( "Riched32.dll" ) ; ( or whatever version you ship with your tool )

pat.

ps : you can also force the display state that way SendMessage( rich , EM_SHOWSCROLLBAR, SB_VERT , true ) ;

MattInglot
08-31-2004, 09:25 AM
Ah, see this isn't what I'm talking about. The key thing is here windowless rich edit controls.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/richedit/windowlessricheditcontrols/aboutwindowlessricheditcontrols.asp?frame=true

These guys. It must be possible to implement them well since MSN 6 uses them but there just isn't documentation. :(