I really have no idea what I need to do.
I want it to work locally inside the current form, I have a dbControlgrid
with images, these images are stored in a special format and so instead of a
normal hyperlink to a file I use this:
<IMG border=0 src="Exibit:30">
So basically that is all I am wanting to paste into the control. I can get
the data in there, but it goes at the current cursor position.
I wanted it to go where I specify with the mouse. The DHTML has nice drop
ability, moving the cursor to the insersion point but I can not work out how
to do it.
I can live without that, but I still can't work out how to move the cursor
to the point under the mouse.
When I use to use a DBMemo I used this code in the Drop event.
QuestionsTable.Edit;
Position := x+ (Y shl 16);
SendMessage(Question.Handle, WM_LBUTTONDOWN, MK_LBUTTON, Position);
SendMessage(Question.Handle, WM_LBUTTONUP, MK_LBUTTON, Position);
Text := #13#10+'<P>'+#13#10+'<img border="0"
src="Exibit:'+ExibitTable.FieldBYName('ID').AsString+'">'+#13#10+'<P>'+#13#1
0;
Question.SelText := Text;
Question.SelStart := Question.SelStart-Length(Text);
Question.SelLength := Length(Text);
And that worked wuite well. The two send message function positioned the
cursor at the point of the mouse in the control. This code does not work
with the DHTML control, I do not understand why, because it is still a
window control, and faking a mouse click (which is what the above does)
should work.
I thought I would do a bit of checking (after writing the previous
paragrpah) and found something interesting, if I use Spy++ it returns a
different window handle than does MyControl.Handle, but the one with SPY++
works whereas the one I get from MyControl.Handle does not!
Any ideas?
Chris
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Myles Penlington
Sent: Monday, 14 February 2000 11:37
To: Multiple recipients of list Delphi
Subject: RE: [DUG]: More problems with the DHTML edit control.
Then if I am correct from what you said, you have to implement drag and
drop using COM - (for stuff between applications).
I have done it for drag and drop of files - but can't find my examples
anywhere ...
Myles.
> -----Original Message-----
> From: Chris Crowe [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, 14 February 2000 11:28
> To: Multiple recipients of list Delphi
> Subject: RE: [DUG]: More problems with the DHTML edit control.
>
> I found the article and found a couple of things that I did not know.
>
> But with the accellerators they now only work for menu items, buttons do
> not
> work at all.
>
> Internal drag & drop works because you need to add OLEInitialize, and
> OLEUnInitialize to the form.
>
> But I still have no idea about external drag drop, I can drag and drop
> from
> IE5 directly into the edit control, but I need to do it from a delphi
> control and insert HTML source code.
>
> Chris
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Dennis Chuah
> Sent: Monday, 14 February 2000 09:37
> To: Multiple recipients of list Delphi
> Subject: RE: [DUG]: More problems with the DHTML edit control.
>
>
>
> Delphi Informant had an article on using DHTML with Delphi - there is a
> bug
> in Delphi's COM implementation that causes all sorts of problems with
> accelerator keys (this also happens with the IE browser control). I
> compiled the source from the article and it appeared to work OK. I even
> use
> it as a quick HTML editor at times. If you searched the DI web site, I'm
> sure you can find the source.
>
> Regards,
> Dennis.
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > Behalf Of Chris Crowe
> > Sent: Monday, 14 February 2000 08:33
> > To: Multiple recipients of list Delphi
> > Subject: [DUG]: More problems with the DHTML edit control.
> >
> >
> > When you drop a DHTML edit control on a form, and a tbuttonm,
> > for the button
> > give it a caption of "&button" and on the click event just go
> > showmessage('Test');
> >
> > Run the app, and when you type into the DHTML edit control
> > and type a B it
> > will trigger the buttons on click event.
> >
> > I have no way of knowing if you can stop this behaviour.
> >
> > Chris
> >
> > --------------------------------------------------------------
> > -------------
> > New Zealand Delphi Users group - Delphi List -
> > [EMAIL PROTECTED]
> > Website: http://www.delphi.org.nz
> >
>
> --------------------------------------------------------------------------
> -
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
> --------------------------------------------------------------------------
> -
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz