English
Opportunities and suggestions

Proposals for future versions

Drag&Drop

 

H.Brill
there one without Drag&Drop in the PC-working day almost not
More auskommt, ought to this too in XProfan (X3)
absolutely integrate go. Sowohl inside the own
Profanfenster + Controls (Listboxes etc.)as well as of Fremdprogrammen gedragte Files etc.

at least 3 Formate wären me there important :
Texts, Files and Images.

Perhaps can Roland there Yes what einsteiger or. User-
freundliches basteln. with the suitable API-
functions and the CallBack-functions of XProfan
might something like machbar his.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
11/16/15  
 




ByteAttack
goes but already really relatively simply...
CompileMarkSeparation
 $H windows.ph
 $H messages.ph
Def DragAcceptFiles(2) !"SHELL32","DragAcceptFiles"
Def DragFinish(1) !"SHELL32","DragFinish"
Def DragQueryFile(4) !"SHELL32","DragQueryFileA"
Declare Anzahl&,Zähler&,PFilename#
Windowstyle 31
Windowtitle "Listbox with File Drag and Drop"' not To confuse with Plug&Pray
Window 0,0-640,440
var Filelistbox&=Create("ListBox",%hwnd,"",20,20,500,300)
DragAcceptFiles(FileListbox&,1)
User Messages ~wm_close,563' 563 <---- Drag&Drop

WhileNot (%Umessage = ~wm_close) & (&uWnd = %hWnd)

    WaitInput

    IF %UMESSAGE=563' DragDrop incident

        DIM PFilename#,1024
        ANZAHL&=DragQueryFile(&UWParam,$FFFFFFFF,PFilename#,1024)
        Usecursor 2

        While Zähler&<Anzahl&

            Clear PFilename#
            DragQueryFile(&UWParam,Zähler&,PFilename#,1024)
            AddStrings(FileListbox&,String $(PFilename#,0))
            Inc ZÄHLER&

        EndWhile

        Usecursor 0
        Dispose PFilename#
        DragFinish(&UWParam)

    Endif

EndWhile

 
XProfan X3
Website:  [...] 
Facebook:  [...] 
11/16/15  
 




ByteAttack
with
CompileMarkSeparation
DEF PathFindExtension(1) ! "shlwapi","PathFindExtensionA"
DEF GetFileTitle(3) ! "COMDLG32","GetFileTitleA"

can You then The Files integrally simply detect, which type this is.

example:
CompileMarkSeparation
 $H windows.ph
 $H messages.ph
 $H shellapi.ph
User Messages ~wm_close,563' 563 <---- Drag&Drop
DEF PathFindExtension(1) ! "shlwapi","PathFindExtensionA"
DEF GetFileTitle(3) ! "COMDLG32","GetFileTitleA"
Declare PFilename#,ext#
DIM PFilename#,1024
Dim ext#,20

Proc DateiSplit

    Parameters File$
    ' only File
    var NurDatei$=Space$(1024)
    GetFileTitle(Addr(File$), Addr(NurDatei$), Len(NurDatei$))
    NurDatei$=Trim $(NurDatei$)
    ' Extension
    Clear ext#
    ext# = PathFindExtension(addr(File$))
    var ext$ = string $(ext#,0)
    ' only way
    var NurPfad$=left$(File$,len(File$)-len(NurDatei$))
    AddStrings(Filelistbox&,NurDatei$+"|"+NurPfad$+"|"+ext$)

ENDPROC

Proc DragDrop

    Clear PFilename#
    var ANZAHL&=~DragQueryFile(&UWParam,$FFFFFFFF,PFilename#,1024)
    var Zähler&=0
    Usecursor 2

    While Zähler&<Anzahl&

        Clear PFilename#
        ~DragQueryFile(&UWParam,Zähler&,PFilename#,1024)
        DateiSplit String $(PFilename#,0)
        Inc ZÄHLER&

    EndWhile

    Usecursor 0
    ~DragFinish(&UWParam)

ENDPROC

Windowstyle 24
Windowtitle "Drag and Drop"
Window ((%maxX/2)-260),((%maxY/2)-175)-520,350
Cls ~GetSysColor(15)
var listdef$="Datei;0;100;Pfad;0;310;Endung;0;60"
var Filelistbox&=Create("GridBox",%hwnd,listdef$,0,5,5,500,300)
~DragAcceptFiles(%hwnd,1)

WhileNot (%Umessage = ~wm_close) & (&uWnd = %hWnd)

    WaitInput

    If %UMESSAGE=563' DragDrop incident

        DragDrop

    Endif

EndWhile

Dispose PFilename#
dispose ext#
 
XProfan X3
Website:  [...] 
Facebook:  [...] 
11/16/15  
 




H.Brill
thanks,
I meant now sooner, that the activities (Drag
and Drop) in the own Program come off.
means z.B. Text a Listbox to others
or Images and Buttons on one Static.

i want gladly Images, The in a Toolbar
through ImageList showing, on one
Static - Control copy.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
11/17/15  
 




ByteAttack
But this is already ardent...
one can The commctrl.ph benefit circa z.B.
CompileMarkSeparation
for Image List To benefit, but in how far to the for a Toolbar benefit can, entzieht itself me straight. I setting me time ran...
 
XProfan X3
Website:  [...] 
Facebook:  [...] 
11/17/15  
 




ByteAttack
so far I the now in my small brain understood have, goes that what You to have only with a Rebar-Control...
 
XProfan X3
Website:  [...] 
Facebook:  [...] 
11/17/15  
 




H.Brill
Well, I thought on something like, as most
IDE's with a Visualdesigner offer, z.B.
VisualBasic. there can indeed a Button
touch and the bars platzieren.

for my tack I will too so a Bitmap
or Icon touch can and one Static with
one bars punktgenau place can.

about Toolbar :
The number the Icons in the ImageList get
one Yes slight, if one of %MenuItem z.B. 2000
abzieht, if The items with @Create("Toolbar",...)
ex 2000 begin. means so far be I already. me missing
only yet the grafically effect of Drag&Drop.

PS: there Drag&Drop loudly API too benutzerdefinierte
data aktzeptiert, could evtl. something like possible his.
be hold unfortunately not so the expert in things API.
(with the the User Message 563 I had too yet
not known).
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
11/17/15  
 




ByteAttack
I Have there yet a something older code, Perhaps helps the you Yes...
CompileMarkSeparation
USERMESSAGES 16
 $H windows.ph
 $H Commctrl.ph
'################ Globale variables
var Bild&=create("HPIC", 0, "TOOLBAR32")
var IcoList& = create("ImageList",32,32,Bild&,rgb(192,192,192))
var AnzIcon%=73
var Zeilengrenze%=5
Declare EndeY%,IstNeuX%,px%,py%,Temp$,MX%,MY%,GI%

Proc UpdateWindow

    Case width(%hwnd,1)<800:SetWindowPos %hwnd=%WinLeft,%WinTop-800,height(%hwnd,1);0
    Case height(%hwnd,1)<600:SetWindowPos %hwnd=%WinLeft,%WinTop-width(%hwnd,1),600;0
    TB_AufBau

ENDPROC

'################################################################################################################# Toolbar set up
'###################################################################################################

Proc TB_AufBau

    Declare WL%
    ClearList GB&
    USEP 0,1,~GetSysColor(15)
    UseBrush 1,~GetSysColor(15)
    Rectangle 0,0-%maxX,42
    USEP 0,1,~GetSysColor(22)
    Line 0,42-%maxX,42
    var AnzProZeile%=width(%hwnd)/39

    if AnzIcon%<AnzProZeile%

        WL%=AnzIcon%

    else

        WL%=AnzProZeile%

    endif

    var IcoX%=3
    var IcoIdx%=0

    WhileLoop WL%

        DrawIcon IcoList&,IcoIdx%,IcoX%,4
        AddStrings(GB&,Str $(IcoX%)+"|"+"4"+"|"+Str $(IcoIdx%))
        IcoX%=IcoX%+39
        Inc IcoIdx%

    EndWhile

ENDPROC

Proc DragDrop

    While %mousepressed'--Mouse button becomes held

        UseExtCursor %hinstance, "DRUCKER"
        ~ImageList_DragMove(%mousex,%mousey)

    EndWhile

    Window Title "iconIndex: "+Str $(GI%)+" - "+Str $(%mousex)+"|"+Str $(%mousey)

ENDPROC

Proc DrawRaster

    Parameters Rasterweite%
    USEP 0,1,0
    UseBrush 1,0
    var rx%=Rasterweite%
    var ry%=Rasterweite%+60

    WhileNot ry%>=%maxY

        WhileNot rx%>=%maxX

            SetPixel rx%,ry%,0
            rx%=rx%+Rasterweite%

        EndWhile

        rx%=Rasterweite%
        ry%=ry%+Rasterweite%

    EndWhile

ENDPROC

'###################### HAUPTFENSTER
Window Style 31
Window Title "ToolBarTool V 1.01"
Window %maxX+5,5 - 800,600
Cls ~GetSysColor(16)
UseFont "Verdana",16,0,0,0,0
var font&=Create("Font","Verdana",16,0,0,0,0)
SetDialogFont 1
var GB&=Create("Grid",3,0)
var GBNeu&=Create("Grid",3,0)
DrawRaster 10
UpdateWindow
SetWindowPos %hwnd=((%maxX/2)-400),((%maxY/2)-300)-800,600;0
var xOff&=~GetSystemMetrics(32)'-------fat the Fensterrandes
var yOff&=~GetSystemMetrics(4)+xOff&'--Höhe the Titelleiste + Fensterrand
' ################ HAUPTSCHLEIFE

WhileNot %Umessage=16

    WaitInput

    If %Key=4

        UpdateWindow

    EndIf

    WhileLoop 0, GetCount(GB&)-1

        Temp$=GetString$(GB&,&loop)
        MX%=val(SubStr$(Temp$,1,"|"))
        MY%=val(SubStr$(Temp$,2,"|"))

        if Mouse(MX%,MY%-MX%+32,MY%+32)

            GI%=val(SubStr$(Temp$,3,"|"))
            ~ImageList_BeginDrag(IcoList&,GI%,(%mousex-xOff&-MX%),(%mousey-yOff&-MY%))
            ~ImageList_DragEnter(%hwnd,%mousex,%mousey)
            DragDrop
            ~ImageList_EndDrag()
            UseCursor 0

        endif

    EndWhile

EndWhile

deleteobject IcoList&
 
XProfan X3
Website:  [...] 
Facebook:  [...] 
11/17/15  
 




H.Brill
thanks, the help me very.
CompileMarkSeparation
the bring me then the desired Result.

PS: The Toolbar need I Yes not absolutely.
I can The ImageListe indeed so draw.

mandatory me whom code times correctly reinziehen, so
I know, what there abgeht.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
11/17/15  
 




ByteAttack
Yes - this is one älterer Code me. Have it now none adjusted.
 
XProfan X3
Website:  [...] 
Facebook:  [...] 
11/17/15  
 




H.Brill
now must I only yet achieve, that one under
too The position correct can. one meets Yes
not always same in that black.

means another Drag&Drop inside the Rasters.

so You understand, I my :
about whom effect, How at windows Solitärspiel.
If one The ticket under anhängt, rastet The
under one, if is a etwaige Postion
access has.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
11/17/15  
 




Jörg
Sellmeyer
For this might then Between(....) the right candidate his. If you The Coordinates for your Raster have (in a aray or Grid), can you then with Between to check on, in welchem Raster You landest.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
11/17/15  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

14.742 Views

Untitledvor 0 min.
Gast.081501/27/25
Sven Bader03/31/23
funkheld12/12/22
Walter12/11/22
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie