Author |
Topic: Impressed (Read 729 times) |
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Impressed
« Reply #4 on: Jun 23rd, 2014, 7:23pm » |
|
on Jun 23rd, 2014, 10:45am, Sean wrote:| Here is where I tried _ES_AUTOHSCROLL or _WS_HSCROLL but did not work |
|
Of course it didn't - you're using a totally different set of STYLEBITS (study the code I listed and you will see that those two bits are being turned off, not on)!
Why are you using an API call rather than the native LB code I listed? If you must use an API call - which I don't recommend - you are on your own and will need to consult MSDN.
Richard.
|
|
Logged
|
|
|
|
Sean
New Member
member is offline


Posts: 6
|
 |
Re: Impressed
« Reply #5 on: Jun 24th, 2014, 12:30am » |
|
No, the above code works fine using normal LB.
However after some googling, I found this solution style = _WS_CHILDWINDOW OR _WS_BORDER OR _WS_VISIBLE OR _ES_MULTILINE OR _ES_WANTRETURN OR _WS_VSCROLL
The _ES_WANTRETURN did the trick and the _WS_VSCROLL gives me vertical scrollbars
|
| « Last Edit: Jun 24th, 2014, 01:10am by Sean » |
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Impressed
« Reply #6 on: Jun 24th, 2014, 1:36pm » |
|
on Jun 24th, 2014, 12:30am, Sean wrote:| No, the above code works fine using normal LB. |
|
To reiterate, LB's TEXTEDITOR is not a standard Windows GUI control, therefore it will not respond to STYLEBITS as you might expect. In particular, LB's texteditor cannot do wordwrap at all.
LBB's TEXTEDITOR is a standard Windows GUI control, therefore it will respond to STYLEBITS as documented in MSDN, including wordwrap if the style is carefully chosen.
The LBB code I listed works by clearing two of the STYLEBITS which are otherwise set by default when a TEXTEDITOR is created.
Richard.
|
|
Logged
|
|
|
|
|