function GetListBoxText(mHandle: THandle; mStrings: TStrings): Boolean;<br>var<br> vItemCount: Integer;<br> I: Integer;<br> S: string;<br>begin<br> Result := False;<br> if not Assigned(mStrings) then<br> Exit;<br> mStrings.BeginUpdate;<br> try<br> mStrings.Clear;<br> vItemCount := SendMessage(mHandle, LB_GETCOUNT, 0, 0);<br> for I := 0 to vItemCount - 1 do<br> begin<br> SetLength(S, SendMessage(mHandle, LB_GETTEXTLEN, I, 0));<br> SendMessage(mHandle, LB_GETTEXT, I, Integer(@S[1]));<br> mStrings.Add(S);<br> end;<br> SetLength(S, 0);<br> finally<br> mStrings.EndUpdate;<br> end;<br> Result := True;<br>end; <br><br>兄弟.别忘了给分啊.