(just now came across my post through a Google search, ... here's the solution for completeness sake)
"SelChange" event: quite right! That's what hooks are for.
$myRichEdit->Hook(EN_SELCHANGE, \&SelChangeEvents_Handler); sub SelChangeEvents_Handler { my ($object, $wParam, $lParam, $type, $msgcode) = @_; return unless($type == WM_NOTIFY); return unless($msgcode == EN_SELCHANGE); my ($hwndFrom, $idFrom, $code, $cpMin, $cpMax, $seltyp) = unpack("LLLLLL", unpack("P24", pack("L", $lParam))); return unless($hwndFrom == $object->{-handle}); my $haveSelection = ($cpMin != $cpMax); if($haveSelection){ print STDERR " we have a selection!"; } }
In reply to Re^2: Win32::GUI::Richedit strange results for deselecting a selection (events)
by tomsell
in thread Win32::GUI::Richedit strange results for deselecting a selection
by tomsell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |