Jason
I'm not sure where you're getting the strings from. I made a form containing
only Memo1 and a ComboBox1.
Clicking any Item in memo1 copies that item to the combobox.

procedure TForm1.Memo1Click(Sender: TObject);
var LineBeg,LineEnd:integer;
begin
   LineBeg:=SendMessage(Memo1.handle,EM_LINEINDEX,-1,0);             {-1
points to the 1st character

on the line clicked in the memo}
   LineEnd:=LineBeg+SendMessage(Memo1.handle,EM_LINELENGTH,LineBeg,0);
{Poimts to the last

character in that line }
   SendMessage(Memo1.handle,EM_SETSEL,LineBeg,LineEnd);
{Selects the line}
   Combobox1.Items[3]:=Memo1.seltext;
{Copies the selected text to Items[3]

in the comboBox}
end;

It works cause I just ran it. Obviously not exactly what you want, but you
probably can take it from here.
Regards
Graham Mayes

----- Original Message -----
From: "Jason L. Coley" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Wednesday, February 07, 2001 3:30 PM
Subject: [DUG]: SendMessage and strings


Hi,

I still haven't got this working yet, I still cannot send a string using
the SendMessage command, so can anyone help me, I need it to add strings
to a combo box in a properties dialog.

How do I send a string as the lparam in the sendmessage command?

          SendMessage(GetDlgItem(hdlg, DLG_HELPSIZE), CB_ADDSTRING, 0,
MyString);

Regards
>Jason Coley
>Manawatu Software Solutions
>http://www.software-solutions.co.nz
<http://www.software-solutions.co.nz/>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to