Drop files from Explorer to HMG Control

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 665
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 85 times
Been thanked: 161 times

Re: Drop files from Explorer to HMG Control

Post by AUGE_OHR »

hi,
andyglezl wrote:
Mon Mar 23, 2020 5:18 am
What makes the difference / advantage when using Drag & Drop instead of
the Technique :idea:
there are many Way and DragDrop is the Windows Way which i can use on Table-PC without Keyboard.

DragAcceptFiles() does exist in FiveWin v1.7 for Cl*pper from 1994 (!) which Code i use now with HMG.
have a look at those Code
DragQueryFiles.jpg
DragQueryFiles.jpg (161.21 KiB) Viewed 76 times
so it is no new Windows API Function.
Next was DDE before OLE-DragDrop (what i still search)

---

i´m sure that

Code: Select all

  ON MOUSEMOVE DragMove( ThisWindow.Name ) ;
  ON MOUSEDRAG DragHere( ThisWindow.Name ) ;
does work when 1st HBFM Release ... but since some Time it does not work any more ... hm
so i search for DragAcceptFiles and found c:\MiniGUI\SOURCE\c_winapimisc.c which run under HMG

Demo show that DRAGQUERYFILES work and i can assign it to EditBox or Textbox.
For Media-File you got File-Name to use it as IMAGE or "play" Media-file

---

as you see Demo work ... but it is only a Demo so what about hole App :?:

in a normal Window i have more than 1 x Control so i need to know "where" i drop.
i got the Tip from Andrés to use "Hover" ... i have to EVAL Sample to find out how to implement it

but even it i found out "where" i drop i need some "extra" to identify if it "allow" on "that" Control
under Xbase++ we have a Property DropZone := .T. so only on those Control User "can" drop.

so i like to ask for new Property "DropZone" in next HMG Release
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 665
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 85 times
Been thanked: 161 times

Post by AUGE_OHR »

hi

i made a new Sample with 4 Controls. when Drop it will assign it to "that" Control
Drop4.jpg
Drop4.jpg (40.81 KiB) Viewed 66 times
i have limited it to EDITbox and Textbox, both are Type "EDIT"

Question : is there a overview for GetControlTypeByIndex() which Type are possible :?:

i have delete MiniGUI Source as i don´t understand how to use it.
DragAccept02.zip
(3.04 KiB) Downloaded 10 times
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 665
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 85 times
Been thanked: 161 times

Post by AUGE_OHR »

hi,
Question : is there a overview for GetControlTypeByIndex() which Type are possible
found in DragDrop Sample from edk, Thx

Code: Select all

FUNCTION HMG_ValidControlTypeDragAndDrop( cCtrlType )
RETURN cCtrlType == 'GRID' .OR. cCtrlType == 'MULTIGRID' .OR. cCtrlType == 'EDIT' .OR. cCtrlType == 'LIST' .OR. ;
cCtrlType == 'MULTILIST' .OR. cCtrlType == 'RICHEDIT' .OR. cCtrlType == 'TEXT' .OR. cCtrlType == 'NUMTEXT' .OR. ;
cCtrlType == 'MASKEDTEXT' .OR. cCtrlType == 'CHARMASKTEXT' .OR. cCtrlType == 'TREE'
have fun
Jimmy

Post Reply