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

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

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

Post 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 1575 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:
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

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

Post 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 :?:
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

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

Post 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 !
have fun
Jimmy
User avatar
serge_girard
Posts: 3420
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

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

Post by serge_girard »

Hi Jimmy,

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

Serge
There's nothing you can do that can't be done...
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

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

Post 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
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

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

Post 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
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

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

Post 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
have fun
Jimmy
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

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

Post 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 1365 times
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

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

Post 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
have fun
Jimmy
Post Reply