吐啊!吐啊的就习惯了。 ^_^function TCustomCombo.GetItemIndex: Integer; begin if csLoading in ComponentState then Result := FItemIndex else Result := SendMessage(Handle, CB_GETCURSEL, 0, 0); end;procedure TCustomCombo.SetItemIndex(const Value: Integer); begin if csLoading in ComponentState then FItemIndex := Value else if GetItemIndex <> Value then SendMessage(Handle, CB_SETCURSEL, Value, 0); end;function TCustomCombo.GetSelStart: Integer; begin SendMessage(Handle, CB_GETEDITSEL, Longint(@Result), 0); end;procedure TCustomCombo.SetSelStart(Value: Integer); var Selection: TSelection; begin Selection.StartPos := Value; Selection.EndPos := Value; SendMessage(Handle, CB_SETEDITSEL, 0, MakeLParam(Selection.StartPos, Selection.EndPos)); end;
begin
if csLoading in ComponentState then
Result := FItemIndex
else
Result := SendMessage(Handle, CB_GETCURSEL, 0, 0);
end;procedure TCustomCombo.SetItemIndex(const Value: Integer);
begin
if csLoading in ComponentState then
FItemIndex := Value
else
if GetItemIndex <> Value then
SendMessage(Handle, CB_SETCURSEL, Value, 0);
end;function TCustomCombo.GetSelStart: Integer;
begin
SendMessage(Handle, CB_GETEDITSEL, Longint(@Result), 0);
end;procedure TCustomCombo.SetSelStart(Value: Integer);
var
Selection: TSelection;
begin
Selection.StartPos := Value;
Selection.EndPos := Value;
SendMessage(Handle, CB_SETEDITSEL, 0, MakeLParam(Selection.StartPos,
Selection.EndPos));
end;
没有过这种感觉,一直很热爱编程,从10岁
真是厉害
就跟其它工作差不多.
做多了你就会烦.
烦了再做.
这就是我们男人---喜新厌旧.(女人我不知道)
写程序有意思的原因就是: 你的 代码 永远 有改进的空间;
你的 设计 永远 有更好的解决方案;
你的 程序 永远 存在有Bug;
所以你的程序永远都是新的。
当一个困扰了你n天的bug.
突然你吃饭时想到了,你会"呀"的一声.
别人会用疑惑的眼光看着你.(程序员除外)