mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 08:49:57 +02:00
fix combobox text selection methods according to msdn specs
git-svn-id: trunk@6152 -
This commit is contained in:
parent
ece83ca9df
commit
124f878dd9
@ -568,12 +568,15 @@ end;
|
||||
|
||||
function TWin32WSCustomComboBox.GetSelStart(const ACustomComboBox: TCustomComboBox): integer;
|
||||
begin
|
||||
Result := Low(SendMessage(ACustomComboBox.Handle, CB_GETEDITSEL, Windows.WPARAM(nil), Windows.LPARAM(nil)));
|
||||
SendMessage(ACustomComboBox.Handle, CB_GETEDITSEL, Windows.WPARAM(@Result), Windows.LPARAM(nil));
|
||||
end;
|
||||
|
||||
function TWin32WSCustomComboBox.GetSelLength(const ACustomComboBox: TCustomComboBox): integer;
|
||||
var
|
||||
startPos, endPos: dword;
|
||||
begin
|
||||
Result := SendMessage(ACustomComboBox.Handle, CB_GETEDITSEL, Windows.WPARAM(nil), Windows.LPARAM(nil));
|
||||
SendMessage(ACustomComboBox.Handle, CB_GETEDITSEL, Windows.WPARAM(@startPos), Windows.LPARAM(@endPos));
|
||||
Result := endPos - startPos;
|
||||
end;
|
||||
|
||||
procedure TWin32WSCustomComboBox.SetStyle(const ACustomComboBox: TCustomComboBox; NewStyle: TComboBoxStyle);
|
||||
|
Loading…
Reference in New Issue
Block a user