I have a richedit control defined as follows:
# define Message richedit
$MainWindow->AddRichEdit(
-name => "Message",
-top =>125,
-left => 10,
-width => $MainWindow->ScaleWidth - 25,
-height => 65,
-tabstop => 1,
-addstyle=> WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_LEFT |
ES_AUTOVSCROLL,
-addexstyle=> WS_EX_CLIENTEDGE,
);
I want this control to word-wrap but it isn't. Do I need to add something
to one of the style options?
Also I had posted a message earlier about another richedit control needing
to be refreshed properly but it still isn't. Here is the control definition:
# define Results richedit
$MainWindow->AddRichEdit(
-name => "Results",
-top => 215,
-left => 10,
-width => $MainWindow->ScaleWidth - 25,
-height => 65,
-addstyle=> WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_LEFT | ES_AUTOVSCROLL
| ES_READONLY,
-addexstyle=> WS_EX_CLIENTEDGE,
);
and here is the code that does the updating:
sub UpdateResults {
my ($text,$format) = @_;
$MainWindow->Results->SetCharFormat(@{$ResultsTextFormat{$format}});
$MainWindow->Results->Select(999999,999999);
$MainWindow->Results->ReplaceSel("$text\n", 1);
select(undef, undef, undef, 0.25);
$MainWindow->Results->SendMessage(0x115, 1, 0) while $text =~ /\n|$/g;
Win32::GUI::PeekMessage(0,0,0);
Win32::GUI::DoEvents();
return;
}
The text gets to the last position in the richedit control fine but the
whole control isn't refreshed properly. There are grey lines through the
control and the vertical scroll bar doesn't display properly. If I
minimize my window and then restore it then it displays properly.
Jonathan