Drag'n'Drop whitout MaxGui

Übersicht BlitzMax, BlitzMax NG Beginners-Corner

Neue Antwort erstellen

 

Guamtmsou G.

Betreff: Drag'n'Drop whitout MaxGui

BeitragDo, Mai 19, 2011 0:33
Antworten mit Zitat
Benutzer-Profile anzeigen
On Bmax(D3d win32) without Maxgui/Wxmax there is any chance to retrieve a file-name(EVENT_WINDOWACCEPT) using the Drag'n'Drop ?
Maybe using win-api

thanks in advance for any solutions / suggestions

grafe

BeitragDo, Mai 19, 2011 11:49
Antworten mit Zitat
Benutzer-Profile anzeigen
hi,
BlitzMax: [AUSKLAPPEN]
SuperStrict

Import maxgui.drivers

'Window

Local Flags:Int

FLAGS:| WINDOW_TITLEBAR
FLAGS:| WINDOW_RESIZABLE
FLAGS:| WINDOW_MENU
FLAGS:| WINDOW_STATUS
FLAGS:| WINDOW_CLIENTCOORDS
'FLAGS:| WINDOW_HIDDEN
Flags:|WINDOW_ACCEPTFILES '<---- Important ###############################################
'FLAGS:| WINDOW_TOOL
FLAGS:| WINDOW_CENTER

Local Main_Window:TGadget = CreateWindow("Test", 100, 100, 320, 240, Null, Flags)

While WaitEvent()
Select EventID()
Case EVENT_APPTERMINATE, EVENT_WINDOWCLOSE
End

Case EVENT_WINDOWACCEPT
Print EventExtra().ToString()

End Select
Wend
 

Guamtmsou G.

Betreff: Re: Drag'n'Drop whitout MaxGui

BeitragDo, Mai 19, 2011 13:29
Antworten mit Zitat
Benutzer-Profile anzeigen
Guamtmsou G. hat Folgendes geschrieben:
without Maxgui

noway to use win-apis on standard d3d app?
i've an high-frame rate app (working on bmax d3d9) and i think maxgui slow-down app performance... Sad

mpmxyz

BeitragDo, Mai 19, 2011 18:34
Antworten mit Zitat
Benutzer-Profile anzeigen
Why do you think that MaxGUI slows down your application?
As far as I know there is no difference between Max2D in a canvas and Max2D in a window created by "Graphics" except the way the window is created and the fact that you should paint a canvas on EVENT_GADGETPAINT. (You can force repainting with "RedrawGadget".)
PS: I don't know a way how to do it without maxgui but if you really don't want to use MaxGUI you should look at the Windows API. (Maybe "DragAcceptFiles" and the _hwnd field of the TD3D9Graphics object returned by "GetGraphicsDriver" can help you. Then you don't need the Windows API.)
 

Guamtmsou G.

BeitragDo, Mai 19, 2011 21:34
Antworten mit Zitat
Benutzer-Profile anzeigen
Zitat:
"DragAcceptFiles" and the _hwnd field of the TD3D9Graphics object returned by "GetGraphicsDriver" can help you. Then you don't need the Windows API.

i'll try this way...

Neue Antwort erstellen


Übersicht BlitzMax, BlitzMax NG Beginners-Corner

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group