Page 1 of 1

"shell.explorer.2" and "Drop" from Outlook

Posted: Wed Nov 17, 2021 7:41 am
by AUGE_OHR
hi,

"shell.explorer.2" -> IE-Engine can handle almost all Format which you "Drop" into it.

for HMG you need to "enable" it with

Code: Select all

   DragAcceptFiles( Form.Control.HANDLE )
also a Event is need when something was "Drop"

Code: Select all

   CREATE EVENT PROCNAME Drop_Detect(cForm, cControl) HWND Form.Control.HANDLE
now we can "wait" for

Code: Select all

FUNCTION Drop_Detect(cDropForm, cDropCont)
LOCAL nMsg    := EventMSG()
LOCAL nWParam := EventWPARAM()

   DO CASE
      CASE nMsg == WM_DROPFILES
and "Query" what was "Drop"

Code: Select all

         aFiles := DragQueryFileS( nWParam )
at that Point HMG Version work different to Xbase++
DragDropIE.gif
DragDropIE.gif (44.74 KiB) Viewed 1579 times
my HMG Version fail when try to Drop Email from Outlook :(
it does not show "+" at Cursor like under Xbase++ which allow "Drop" so something is missing ...

can someone tell me what i´m doing wrong under HMG :idea:

Re: "shell.explorer.2" and "Drop" from Outlook

Posted: Thu Nov 18, 2021 11:42 pm
by AUGE_OHR
hi,

i have ask in FiveWin Forum and Otto show me a Sample using RICHTEXT and "drop" Qutlook Email to it

so i look into FiveWin Source and found in \fwh\source\classes\triched5.prg -> \fwh\source\classes\window.prg

Code: Select all

   METHOD SetOleInit()      INLINE RESetOleInit5()
   METHOD SetOleUnInit()    INLINE RESetOleUnInit5( ::hWnd )
   METHOD SetOleCallback()  INLINE RESetOleCallback5( ::hWnd )
   METHOD GetOleInterface() INLINE REGetOleInterface5( ::hWnd )
i guess it is like under Xbase++ (using Ot4Xb Syntax)

Code: Select all

   @ole32:OleInitialize(0)
   ...
   @ole32:OleUninitialize()
Question : does HMG or MiniGUI Version use OLE :?:

Re: "shell.explorer.2" and "Drop" from Outlook

Posted: Fri Nov 19, 2021 11:20 am
by AUGE_OHR
hi,

have found out that i have to use "other" HMG Control to "drop" Email from Outlook to HMG :)

but i only got 1st Step so i need some time to figure out how to "add Code" to Access Outlook those Way
p.s. it should also work Outlook Calendar !

Re: "shell.explorer.2" and "Drop" from Outlook

Posted: Fri Nov 19, 2021 4:07 pm
by serge_girard
Hi Jimmy,

Keep us informed about this 'drag and drop' issue !

Serge

Re: "shell.explorer.2" and "Drop" from Outlook

Posted: Fri Nov 19, 2021 5:11 pm
by andyglezl
AUGE_OHR wrote: Fri Nov 19, 2021 11:20 am hi,

have found out that i have to use "other" HMG Control to "drop" Email from Outlook to HMG :)

but i only got 1st Step so i need some time to figure out how to "add Code" to Access Outlook those Way
p.s. it should also work Outlook Calendar !
Quizá...

https://www.hmgforum.com/viewtopic.php?p=67567#p67567

En el navegador EDGE si funciona... (lo descarga)
Teniendo el archivo: "Audífonos ASUS_ todo para tus juegos _ Viaja a las Vegas CES _ Ver más ofertas CVA (1).msg"
*-----------------------------------------------------------------------------------------------------------
Maybe ...

https://www.hmgforum.com/viewtopic.php?p=67567#p67567

In the EDGE browser if it works ... (download it)
Having the file: "ASUS headphones_ everything for your games _ Travel to Vegas CES _ See more offers CVA (1) .msg "

Code: Select all

cMsg := "Audífonos ASUS_ todo para tus juegos _ Viaja a las Vegas CES _ Ver más ofertas CVA (1).msg"
ShellExecute(0, "open", "rundll32.exe", cMsg, , 1)
C

Re: "shell.explorer.2" and "Drop" from Outlook

Posted: Sat Nov 20, 2021 7:10 am
by AUGE_OHR
hi Serge,
serge_girard wrote: Fri Nov 19, 2021 4:07 pm Keep us informed about this 'drag and drop' issue !
i got Sample working ... but it only work with German Version yet.

is it while i ask for

Code: Select all

FUNCTION CheckHeaderLine(cTest)
LOCAL lRet := .F.
LOCAL nCountry := HB_bitAND( GETKEYBOARDLAYOUT(), 0xFFFF )

   DO CASE
      CASE nCountry = 1031   // Germany
         IF "Von"        $ cTest .AND. ;
            "Betreff"    $ cTest .AND. ;
            "Erhalten"   $ cTest .AND. ;
            "Kategorien" $ cTest
            lRet := .T.
         ENDIF
   ENDCASE	
RETURN lRet
so i need sone help from User of this Forum

---

use any RICHEDITBOX Control and "drop" Email from Outlook into it ;)

you need NO other Code or "Trick" to "drop" Email from Outlook into RICHEDITBOX :!:
you will become some Text which i need for "Keywords"

as i say this is the "Start-Point" to get hole Email and Attachment(s)

please copy "that" Line and post it here in Forum
also write what this Line give you fir nCountry

Code: Select all

LOCAL nCountry := HB_bitAND( GETKEYBOARDLAYOUT(), 0xFFFF )
thx for help

Re: "shell.explorer.2" and "Drop" from Outlook

Posted: Sat Nov 20, 2021 9:44 pm
by AUGE_OHR
hi

i have made a Demo EXE Version which will work (or not) without "Check"
"Check" does "only" work with German Message, other Language i can not test
OLRICH.zip
(1.46 MiB) Downloaded 65 times
please use this Demo "only" for Outlook Email :!:
"other" may work .. but it can also crash.

---

App will display at upper/left and "wait" for "drop"
as it is a "normal" RICHEDITBOX so you can use it in your App without any change

if you like it please post Snapshot of MessageBox for you Language

Re: "shell.explorer.2" and "Drop" from Outlook

Posted: Sat Nov 20, 2021 10:21 pm
by andyglezl
En español, parece OK
*----------------------------------
In Spanish, it seems OK
imagen_2021-11-20_161830.png
imagen_2021-11-20_161830.png (245.75 KiB) Viewed 1369 times

Re: "shell.explorer.2" and "Drop" from Outlook

Posted: Sat Nov 20, 2021 10:39 pm
by AUGE_OHR
hi

as i say "this" Version is "un-lock" ... but you can "drop" more than Outlook Email which may crash ...

so please try "normal" RICHEDITBOX like \SAMPLES\Applications\MiniWriter\ and "drop" Email from Outlook to it
in German Version i got this in 1st Line
"Von Betreff Erhalten Größe Kategorien"
but as "Größe" have "special" Sign i use only 4 "Keywords" to identify Outlook Email

this is what i need from User of this Forum to made it "safe" before release Source