fix compilation of wince

git-svn-id: trunk@13376 -
This commit is contained in:
paul 2007-12-18 14:22:14 +00:00
parent 3e90dbfc51
commit 2b2627a234
2 changed files with 6 additions and 5 deletions

View File

@ -398,7 +398,7 @@ function TWinCECheckListBoxStrings.GetState(AIndex: Integer): TCheckBoxState;
var
Data: PWinCECheckListBoxItemRecord;
begin
Data := GetItemRecord(Index, false);
Data := GetItemRecord(AIndex, False);
Result := Data^.State
end;
@ -426,9 +426,9 @@ procedure TWinCECheckListBoxStrings.SetState(AIndex: Integer;
var
ItemRecord: PWinCECheckListBoxItemRecord;
begin
ItemRecord := GetItemRecord(Index, true);
ItemRecord := GetItemRecord(AIndex, True);
ItemRecord^.State := AValue;
SetItemRecord(Index, ItemRecord);
SetItemRecord(AIndex, ItemRecord);
end;
procedure TWinCECheckListBoxStrings.Clear;

View File

@ -46,6 +46,7 @@ type
private
protected
public
class function GetStrings(const ACustomListBox: TCustomListBox): TStrings; override;
class function GetState(const ACheckListBox: TCustomCheckListBox;
const AIndex: integer): TCheckBoxState; override;
class procedure SetState(const ACheckListBox: TCustomCheckListBox;
@ -55,7 +56,7 @@ type
implementation
class function TWinCEWSCustomCheckListBox.GetStrings(const ACustomListBox: TCustomListBox): TStrings;
class function TWinCEWSCustomCheckListBox.GetStrings(const ACustomListBox: TCustomListBox): TStrings;
var
Handle: HWND;
begin
@ -78,7 +79,7 @@ var
SizeRect: Windows.RECT;
Handle: HWND;
begin
TWinCECheckListBoxStrings(ACheckListBox.Items).State[AIndex] := AChecked;
TWinCECheckListBoxStrings(ACheckListBox.Items).State[AIndex] := AState;
// redraw control
Handle := ACheckListBox.Handle;