How do I turn on wordwrap in the Richedit control?
I thought there might be a setting in the "Properties" "WindowStyles" for the Richedit Control. But I am not seeing it. Shouldn't that property be settable there?
Ok,
I found this method... Seems to work.
'Set the RTF control to have word wrap on
SendMessage HWND_FORM1_RICHEDIT1, %EM_SETTARGETDEVICE, 0, 0
But now I need to know if there is a way to programmatically turn on or off the Horizontal ScrollBar?
See the EM_SHOWSCROLLBAR message:
http://msdn.microsoft.com/en-us/library/bb774298%28VS.85%29.aspx
This little tool by Microsoft might also be very handy.
Control Spy 2.0 is a tool that helps developers understand common controls: how to apply styles to them, and how they respond to messages and notifications. Using Control Spy, you can immediately see how different styles affect the behavior and appearance of each control, and also how you can change the state of each control by sending messages.
http://msdn.microsoft.com/en-us/library/bb773165(v=VS.85).aspx (http://msdn.microsoft.com/en-us/library/bb773165(v=VS.85).aspx)
Jose' would this be correct usage.
SendMessage HWND_FORM1_RICHEDIT1, %EM_SHOWSCROLLBAR , wParam, lParam
where:
wParam
Identifies which scroll bar to display: horizontal or vertical. This parameter must be %SB_VERT or %SB_HORZ.
lParam
Specifies whether to show the scroll bar or hide it. Specify TRUE to show the scroll bar and FALSE to hide it.
That seems simple enough. i will give it a try ... Thanks
Rolf,
Yes, ControlSpy is very handy. Thanks for the reference. And by adding this tool to FireFly's Tools List it become very handy indeed! :D
I love WinSpector, although finding links to it to give to people is becoming harder. We need a Files/Utilities section here.