Richtext

Richtext

Postby Otto » Tue Dec 30, 2008 1:38 pm

Hello Antonio,

For drag and drop to a RichTxt control I would like to distinguish between text and files.

drop a text or email fro outlook
Image

drop a file from explorer
Image

To detect a text drop I watch
GetWindowText( ::hWnd ) and changed the HandleEvent method.
This is working. But I can’t find out in which DATA a file drop is stored.

Could you please help me.


Thanks in advance
Otto



METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS xTRich
local nRow, nCol, nFlags
do case
case nMsg == WM_NCHITTEST
if ::cCargo = GetWindowText( ::hWnd ) .or. len(ALLTRIM(GetWindowText( ::hWnd )))=0

else
::MButtonDown( nRow, nCol, nFlags )
::cCargo := GetWindowText( ::hWnd )

endif
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Re: Richtext

Postby Antonio Linares » Tue Dec 30, 2008 7:54 pm

Otto,

We are reviewing docs related to your question.

Please expect an answer from us asap,
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Richtext

Postby Otto » Wed Dec 31, 2008 7:58 am

Hello Antonio,

I think I can find out with

cText1 := ::SaveAsRTF()

but I need the filename and the path.

Is it possible to save the HandleEvent in the

METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS xTRich

and if cText1 := ::SaveAsRTF() is not an email to post pack or forward the

HandleEvent to a DIALOG which DragAcceptFiles( oDlg:hWnd, .t. ) .

Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 73 guests

cron