![]() |
Anzeige:
|
|
|||||||
| XProfan Alles rund um die Programmiersprache XProfan. |
|
![]() |
|
|
LinkBack | Themen-Optionen | Ansicht |
|
|
#1 (Direktlink) |
|
Super-Moderator
![]() Registriert seit: 15.02.2009
Beiträge: 10.786
|
Ich möchte gerne über COM einen "OpenFile"-Dialog erstellen. Leider fehlen mir wohl ein paar Konstanten (zum Beispiel zum Erhalten der Rückgabe) - wo bekommt man die her?
Hier mein unqualifizierter Ansatz: Code:
'##################################################################################### '######### Code von AHT ######### '######### Gepostet für Startseite - Paules-PC-Forum.de ######### '##################################################################################### Def CoCreateInstance(5) !"OLE32","CoCreateInstance" DEF CoInitialize(1) ! "OLE32","CoInitialize" DEF CoInitialize(1) ! "OLE32","CoInitialize" DEF CoUnInitialize(0) ! "OLE32","CoUninitialize" Def GetLastError(0) !"Kernel32","GetLastError" Def SetLastError(1) !"Kernel32","SetLastError" Declare HRESULT&, CLSID_FileOpenDialog$, pfd&, CLSID_FileOpenDialog# Declare IID_IFileOpenDialog$, IID_IFileOpenDialog#, Command& Declare IFileOpenDialog&, Result#, result& IID_IFileOpenDialog$ = "d57c7288-d4ad-4768-be02-9d969532d960" CLSID_FileOpenDialog$ = "DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7" WindowStyle 31+512 WindowTitle "Vista Fileload-Dialog" Window 0, 0 - %MAXX - 20, 440 UserMessages $10 DIM IID_IFileOpenDialog#, 16 DIM CLSID_FileOpenDialog#, 16 Long CLSID_FileOpenDialog#, 0 = $DC1C5A9C Word CLSID_FileOpenDialog#, 4 = $E88A Word CLSID_FileOpenDialog#, 6 = $4dde Byte CLSID_FileOpenDialog#, 8 = $A5 Byte CLSID_FileOpenDialog#, 9 = $A1 Byte CLSID_FileOpenDialog#, 10 = $60 Byte CLSID_FileOpenDialog#, 11 = $F8 Byte CLSID_FileOpenDialog#, 12 = $2A Byte CLSID_FileOpenDialog#, 13 = $20 Byte CLSID_FileOpenDialog#, 14 = $AE Byte CLSID_FileOpenDialog#, 15 = $F7 Long IID_IFileOpenDialog#, 0 = $d57c7288 Word IID_IFileOpenDialog#, 4 = $d4ad Word IID_IFileOpenDialog#, 6 = $4768 Byte IID_IFileOpenDialog#, 8 = $BE Byte IID_IFileOpenDialog#, 9 = $02 Byte IID_IFileOpenDialog#, 10 = $9D Byte IID_IFileOpenDialog#, 11 = $96 Byte IID_IFileOpenDialog#, 12 = $95 Byte IID_IFileOpenDialog#, 13 = $32 Byte IID_IFileOpenDialog#, 14 = $D9 Byte IID_IFileOpenDialog#, 15 = $60 CoInitialize(0) HRESULT& = CoCreateInstance(CLSID_FileOpenDialog#, 0, 1, IID_IFileOpenDialog#, addr(pfd&)) Print pfd& IF HRESULT& = 0 Command& = Long(pfd&,0) Print Command& CALL(LONG(COMMAND&,12),pfd&,%HWND) 'Dialog öffnen endif CoUnInitialize() Dispose IID_IFileOpenDialog# Dispose CLSID_FileOpenDialog# While %Umessage <> $10 Waitinput EndWhile
__________________
______________ Bitte Schnelltest durchführen: Neuer Virus, ahnungslose User seit Monaten infiziert! Mfg AHT |
|
|
|
|
|
|
#2 (Direktlink) |
|
Super-Moderator
![]() Registriert seit: 15.02.2009
Beiträge: 10.786
|
Hab was gefunden, das mir vielleicht weiter hiolft:
https://cfx.svn.codeplex.com/svn/Vis...FileDialog.cpp
__________________
______________ Bitte Schnelltest durchführen: Neuer Virus, ahnungslose User seit Monaten infiziert! Mfg AHT |
|
|
|
|
|
#3 (Direktlink) |
|
Super-Moderator
![]() Registriert seit: 15.02.2009
Beiträge: 10.786
|
Ja, das war es, was mir fehlte - so langsam wirds was:
Code:
'##################################################################################### '######### Code von AHT ######### '######### Gepostet für http://www.paules-pc-forum.de ######### '##################################################################################### Def CoCreateInstance(5) !"OLE32","CoCreateInstance" DEF CoInitialize(1) ! "OLE32","CoInitialize" DEF CoInitialize(1) ! "OLE32","CoInitialize" DEF CoUnInitialize(0) ! "OLE32","CoUninitialize" Def GetLastError(0) !"Kernel32","GetLastError" Def SetLastError(1) !"Kernel32","SetLastError" Def CoTaskMemFree(1) !"OLE32","CoTaskMemFree" Declare HRESULT&, CLSID_FileOpenDialog$, pfd&, CLSID_FileOpenDialog# Declare IID_IFileOpenDialog$, IID_IFileOpenDialog#, Command& Declare IFileOpenDialog&, Result#, result&, Str& IID_IFileOpenDialog$ = "d57c7288-d4ad-4768-be02-9d969532d960" CLSID_FileOpenDialog$ = "DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7" WindowStyle 31+512 WindowTitle "Vista Fileload-Dialog" Window 0, 0 - %MAXX - 20, 440 UserMessages $10 DIM IID_IFileOpenDialog#, 16 DIM CLSID_FileOpenDialog#, 16 Long CLSID_FileOpenDialog#, 0 = $DC1C5A9C Word CLSID_FileOpenDialog#, 4 = $E88A Word CLSID_FileOpenDialog#, 6 = $4dde Byte CLSID_FileOpenDialog#, 8 = $A5 Byte CLSID_FileOpenDialog#, 9 = $A1 Byte CLSID_FileOpenDialog#, 10 = $60 Byte CLSID_FileOpenDialog#, 11 = $F8 Byte CLSID_FileOpenDialog#, 12 = $2A Byte CLSID_FileOpenDialog#, 13 = $20 Byte CLSID_FileOpenDialog#, 14 = $AE Byte CLSID_FileOpenDialog#, 15 = $F7 Long IID_IFileOpenDialog#, 0 = $d57c7288 Word IID_IFileOpenDialog#, 4 = $d4ad Word IID_IFileOpenDialog#, 6 = $4768 Byte IID_IFileOpenDialog#, 8 = $BE Byte IID_IFileOpenDialog#, 9 = $02 Byte IID_IFileOpenDialog#, 10 = $9D Byte IID_IFileOpenDialog#, 11 = $96 Byte IID_IFileOpenDialog#, 12 = $95 Byte IID_IFileOpenDialog#, 13 = $32 Byte IID_IFileOpenDialog#, 14 = $D9 Byte IID_IFileOpenDialog#, 15 = $60 CoInitialize(0) HRESULT& = CoCreateInstance(CLSID_FileOpenDialog#, 0, 1, IID_IFileOpenDialog#, addr(pfd&)) IF HRESULT& = 0 Command& = Long(pfd&,0) IF CALL(LONG(COMMAND&,12),pfd&,%HWND) = 0 'Dialog öffnen DIM Result#,6001 CALL(LONG(COMMAND&,80),pfd&,addr(Result&)) Command& = Long(Result&,0) CALL(LONG(COMMAND&,20),Result&,$80058000,addr(Str&)) External("kernel32.dll","WideCharToMultiByte",0,0,Str&,-1,Result#,6000,0,0) CoTaskMemFree(Str&) Print String$(Result#, 0) Dispose Result# endif endif CoUnInitialize() Dispose IID_IFileOpenDialog# Dispose CLSID_FileOpenDialog# While %Umessage <> $10 Waitinput EndWhile
__________________
______________ Bitte Schnelltest durchführen: Neuer Virus, ahnungslose User seit Monaten infiziert! Mfg AHT |
|
|
|
|
|
#4 (Direktlink) |
|
Super-Moderator
![]() Registriert seit: 15.02.2009
Beiträge: 10.786
|
Code:
'##################################################################################### '######### Code von AHT ######### '######### Gepostet für http://www.paules-pc-forum.de ######### '##################################################################################### Def CoCreateInstance(5) !"OLE32","CoCreateInstance" DEF CoInitialize(1) ! "OLE32","CoInitialize" DEF CoInitialize(1) ! "OLE32","CoInitialize" DEF CoUnInitialize(0) ! "OLE32","CoUninitialize" Def GetLastError(0) !"Kernel32","GetLastError" Def SetLastError(1) !"Kernel32","SetLastError" Def CoTaskMemFree(1) !"OLE32","CoTaskMemFree" Declare HRESULT&, CLSID_FileOpenDialog$, pfd&, CLSID_FileOpenDialog# Declare IID_IFileOpenDialog$, IID_IFileOpenDialog#, Command& Declare IFileOpenDialog&, Result#, result&, Str&, Text#, Text$ IID_IFileOpenDialog$ = "d57c7288-d4ad-4768-be02-9d969532d960" CLSID_FileOpenDialog$ = "DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7" WindowStyle 31+512 WindowTitle "Vista Fileload-Dialog" Window 0, 0 - %MAXX - 20, 440 UserMessages $10 DIM IID_IFileOpenDialog#, 16 DIM CLSID_FileOpenDialog#, 16 Long CLSID_FileOpenDialog#, 0 = $DC1C5A9C Word CLSID_FileOpenDialog#, 4 = $E88A Word CLSID_FileOpenDialog#, 6 = $4dde Byte CLSID_FileOpenDialog#, 8 = $A5 Byte CLSID_FileOpenDialog#, 9 = $A1 Byte CLSID_FileOpenDialog#, 10 = $60 Byte CLSID_FileOpenDialog#, 11 = $F8 Byte CLSID_FileOpenDialog#, 12 = $2A Byte CLSID_FileOpenDialog#, 13 = $20 Byte CLSID_FileOpenDialog#, 14 = $AE Byte CLSID_FileOpenDialog#, 15 = $F7 Long IID_IFileOpenDialog#, 0 = $d57c7288 Word IID_IFileOpenDialog#, 4 = $d4ad Word IID_IFileOpenDialog#, 6 = $4768 Byte IID_IFileOpenDialog#, 8 = $BE Byte IID_IFileOpenDialog#, 9 = $02 Byte IID_IFileOpenDialog#, 10 = $9D Byte IID_IFileOpenDialog#, 11 = $96 Byte IID_IFileOpenDialog#, 12 = $95 Byte IID_IFileOpenDialog#, 13 = $32 Byte IID_IFileOpenDialog#, 14 = $D9 Byte IID_IFileOpenDialog#, 15 = $60 CoInitialize(0) HRESULT& = CoCreateInstance(CLSID_FileOpenDialog#, 0, 1, IID_IFileOpenDialog#, addr(pfd&)) IF HRESULT& = 0 Command& = Long(pfd&,0) DIM Text#, 4001 Text$ = "*.EXE" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, Text#, 2000) CALL(LONG(COMMAND&,60),pfd&,text#) 'Dateivorgabe Dispose Text# DIM Text#, 4001 Text$ = "Datei öffnen..." External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, Text#, 2000) CALL(LONG(COMMAND&,68),pfd&,text#) 'Title Dispose Text# DIM Text#, 4001 Text$ = "Dateinämchen" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, Text#, 2000) CALL(LONG(COMMAND&,76),pfd&,text#) 'Text vor Auswahl Dispose Text# IF CALL(LONG(COMMAND&,12),pfd&,%HWND) = 0 'Dialog öffnen DIM Result#,6001 CALL(LONG(COMMAND&,80),pfd&,addr(Result&)) 'Result Callbackadresse holen Command& = Long(Result&,0) CALL(LONG(COMMAND&,20),Result&,$80058000,addr(Str&)) 'Displayname holen External("kernel32.dll","WideCharToMultiByte",0,0,Str&,-1,Result#,6000,0,0) CoTaskMemFree(Str&) Print String$(Result#, 0) Dispose Result# endif endif CoUnInitialize() Dispose IID_IFileOpenDialog# Dispose CLSID_FileOpenDialog# While %Umessage <> $10 Waitinput EndWhile
__________________
______________ Bitte Schnelltest durchführen: Neuer Virus, ahnungslose User seit Monaten infiziert! Mfg AHT |
|
|
|
|
|
#5 (Direktlink) |
|
Super-Moderator
![]() Registriert seit: 05.02.2009
Ort: Westliches NRW
Alter: 44
Beiträge: 5.094
|
Kommt, der Dialog. Wird der Ordner so richtig dargestellt?
__________________
Gruß, Frank ![]() Webpage http://frabbing.bplaced.net mit Freeware - Tools, Spiele und Grafiken. |
|
|
|
|
|
|
#6 (Direktlink) |
|
Super-Moderator
![]() Registriert seit: 15.02.2009
Beiträge: 10.786
|
Nein, der Ordner wird weiterhin umgeleitet.
So sieht es bislang aus (ab Vista): Die Dialoge über COM scheinen sich besser anpassen zu lassen.
__________________
______________ Bitte Schnelltest durchführen: Neuer Virus, ahnungslose User seit Monaten infiziert! Mfg AHT Geändert von AHT (26.01.2010 um 22:27 Uhr) |
|
|
|
|
|
#7 (Direktlink) |
|
Super-Moderator
![]() Registriert seit: 15.02.2009
Beiträge: 10.786
|
Und weiter gehts...
Code:
'##################################################################################### '######### Code von AHT ######### '######### Gepostet für http://www.paules-pc-forum.de ######### '##################################################################################### Def CoCreateInstance(5) !"OLE32","CoCreateInstance" DEF CoInitialize(1) ! "OLE32","CoInitialize" DEF CoInitialize(1) ! "OLE32","CoInitialize" DEF CoUnInitialize(0) ! "OLE32","CoUninitialize" Def GetLastError(0) !"Kernel32","GetLastError" Def SetLastError(1) !"Kernel32","SetLastError" Def CoTaskMemFree(1) !"OLE32","CoTaskMemFree" Declare HRESULT&, CLSID_FileOpenDialog$, pfd&, CLSID_FileOpenDialog# Declare IID_IFileOpenDialog$, IID_IFileOpenDialog#, Command& Declare IFileOpenDialog&, Result#, result&, Str&, Text#, Text$ Declare Flags&, COMDLG_FILTERSPEC# IID_IFileOpenDialog$ = "d57c7288-d4ad-4768-be02-9d969532d960" CLSID_FileOpenDialog$ = "DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7" WindowStyle 31+512 WindowTitle "Vista Fileload-Dialog" Window 0, 0 - %MAXX - 20, 440 UserMessages $10 DIM IID_IFileOpenDialog#, 16 DIM CLSID_FileOpenDialog#, 16 Long CLSID_FileOpenDialog#, 0 = $DC1C5A9C Word CLSID_FileOpenDialog#, 4 = $E88A Word CLSID_FileOpenDialog#, 6 = $4dde Byte CLSID_FileOpenDialog#, 8 = $A5 Byte CLSID_FileOpenDialog#, 9 = $A1 Byte CLSID_FileOpenDialog#, 10 = $60 Byte CLSID_FileOpenDialog#, 11 = $F8 Byte CLSID_FileOpenDialog#, 12 = $2A Byte CLSID_FileOpenDialog#, 13 = $20 Byte CLSID_FileOpenDialog#, 14 = $AE Byte CLSID_FileOpenDialog#, 15 = $F7 Long IID_IFileOpenDialog#, 0 = $d57c7288 Word IID_IFileOpenDialog#, 4 = $d4ad Word IID_IFileOpenDialog#, 6 = $4768 Byte IID_IFileOpenDialog#, 8 = $BE Byte IID_IFileOpenDialog#, 9 = $02 Byte IID_IFileOpenDialog#, 10 = $9D Byte IID_IFileOpenDialog#, 11 = $96 Byte IID_IFileOpenDialog#, 12 = $95 Byte IID_IFileOpenDialog#, 13 = $32 Byte IID_IFileOpenDialog#, 14 = $D9 Byte IID_IFileOpenDialog#, 15 = $60 CoInitialize(0) HRESULT& = CoCreateInstance(CLSID_FileOpenDialog#, 0, 1, IID_IFileOpenDialog#, addr(pfd&)) IF HRESULT& = 0 Command& = Long(pfd&,0) DIM Text#, 4001 Text$ = "*.*" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, Text#, 2000) CALL(LONG(COMMAND&,60),pfd&,text#) 'Dateivorgabe Dispose Text# DIM Text#, 4001 Text$ = "Datei öffnen..." External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, Text#, 2000) CALL(LONG(COMMAND&,68),pfd&,text#) 'Title Dispose Text# DIM Text#, 4001 Text$ = "Dateinämchen" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, Text#, 2000) CALL(LONG(COMMAND&,76),pfd&,text#) 'Text vor Auswahl Dispose Text# DIM Text#, 8001 DIM COMDLG_FILTERSPEC#,24 Text$ = "Programme" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, Text#, 250) Text$ = "*.EXE" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, int(Text# + 200), 100) Text$ = "DLLs" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, int(Text# + 400), 100) Text$ = "*.DLL" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, int(Text# + 600), 100) Text$ = "Alle Dateien" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, int(Text# + 800), 100) Text$ = "*.*" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, int(Text# + 1000), 100) Long COMDLG_FILTERSPEC#, 0 = Text# Long COMDLG_FILTERSPEC#, 4 = int(Text# + 200) Long COMDLG_FILTERSPEC#, 8 = int(Text# + 400) Long COMDLG_FILTERSPEC#, 12 = int(Text# + 600) Long COMDLG_FILTERSPEC#, 16 = int(Text# + 800) Long COMDLG_FILTERSPEC#, 20 = int(Text# + 1000) CALL(LONG(COMMAND&,16),pfd&,3,COMDLG_FILTERSPEC#) 'Dateifilter Dispose Text# IF CALL(LONG(COMMAND&,12),pfd&,%HWND) = 0 'Dialog öffnen DIM Result#,6001 CALL(LONG(COMMAND&,80),pfd&,addr(Result&)) 'Result Callbackadresse holen Command& = Long(Result&,0) CALL(LONG(COMMAND&,20),Result&,$80058000,addr(Str&)) 'Displayname holen External("kernel32.dll", "WideCharToMultiByte", 0, 0, Str&, -1, Result#, 6000, 0, 0) CoTaskMemFree(Str&) Print String$(Result#, 0) Dispose Result# endif endif CoUnInitialize() Dispose IID_IFileOpenDialog# Dispose CLSID_FileOpenDialog# While %Umessage <> $10 Waitinput EndWhile
__________________
______________ Bitte Schnelltest durchführen: Neuer Virus, ahnungslose User seit Monaten infiziert! Mfg AHT Geändert von AHT (31.01.2010 um 11:52 Uhr) |
|
|
|
|
|
#8 (Direktlink) |
|
Super-Moderator
![]() Registriert seit: 15.02.2009
Beiträge: 10.786
|
...und noch einen Pointer gefunden...
Code:
'##################################################################################### '######### Code von AHT ######### '######### Gepostet für http://www.paules-pc-forum.de ######### '##################################################################################### Def CoCreateInstance(5) !"OLE32","CoCreateInstance" DEF CoInitialize(1) ! "OLE32","CoInitialize" DEF CoInitialize(1) ! "OLE32","CoInitialize" DEF CoUnInitialize(0) ! "OLE32","CoUninitialize" Def GetLastError(0) !"Kernel32","GetLastError" Def SetLastError(1) !"Kernel32","SetLastError" Def CoTaskMemFree(1) !"OLE32","CoTaskMemFree" Declare HRESULT&, CLSID_FileOpenDialog$, pfd&, CLSID_FileOpenDialog# Declare IID_IFileOpenDialog$, IID_IFileOpenDialog#, Command& Declare IFileOpenDialog&, Result#, result&, Str&, Text#, Text$ Declare Flags&, COMDLG_FILTERSPEC# IID_IFileOpenDialog$ = "d57c7288-d4ad-4768-be02-9d969532d960" CLSID_FileOpenDialog$ = "DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7" WindowStyle 31+512 WindowTitle "Vista Fileload-Dialog" Window 0, 0 - %MAXX - 20, 440 UserMessages $10 DIM IID_IFileOpenDialog#, 16 DIM CLSID_FileOpenDialog#, 16 Long CLSID_FileOpenDialog#, 0 = $DC1C5A9C Word CLSID_FileOpenDialog#, 4 = $E88A Word CLSID_FileOpenDialog#, 6 = $4dde Byte CLSID_FileOpenDialog#, 8 = $A5 Byte CLSID_FileOpenDialog#, 9 = $A1 Byte CLSID_FileOpenDialog#, 10 = $60 Byte CLSID_FileOpenDialog#, 11 = $F8 Byte CLSID_FileOpenDialog#, 12 = $2A Byte CLSID_FileOpenDialog#, 13 = $20 Byte CLSID_FileOpenDialog#, 14 = $AE Byte CLSID_FileOpenDialog#, 15 = $F7 Long IID_IFileOpenDialog#, 0 = $d57c7288 Word IID_IFileOpenDialog#, 4 = $d4ad Word IID_IFileOpenDialog#, 6 = $4768 Byte IID_IFileOpenDialog#, 8 = $BE Byte IID_IFileOpenDialog#, 9 = $02 Byte IID_IFileOpenDialog#, 10 = $9D Byte IID_IFileOpenDialog#, 11 = $96 Byte IID_IFileOpenDialog#, 12 = $95 Byte IID_IFileOpenDialog#, 13 = $32 Byte IID_IFileOpenDialog#, 14 = $D9 Byte IID_IFileOpenDialog#, 15 = $60 CoInitialize(0) HRESULT& = CoCreateInstance(CLSID_FileOpenDialog#, 0, 1, IID_IFileOpenDialog#, addr(pfd&)) IF HRESULT& = 0 Command& = Long(pfd&,0) DIM Text#, 4001 Text$ = "*.*" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, Text#, 2000) CALL(LONG(COMMAND&,60),pfd&,text#) 'Dateivorgabe Dispose Text# DIM Text#, 4001 Text$ = "Datei öffnen..." External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, Text#, 2000) CALL(LONG(COMMAND&,68),pfd&,text#) 'Title Dispose Text# DIM Text#, 4001 Text$ = "Dateinämchen" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, Text#, 2000) CALL(LONG(COMMAND&,76),pfd&,text#) 'Text vor Auswahl Dispose Text# DIM Text#, 8001 DIM COMDLG_FILTERSPEC#,24 Text$ = "Programme" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, Text#, 250) Text$ = "*.EXE" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, int(Text# + 200), 100) Text$ = "DLLs" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, int(Text# + 400), 100) Text$ = "*.DLL" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, int(Text# + 600), 100) Text$ = "Alle Dateien" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, int(Text# + 800), 100) Text$ = "*.*" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, int(Text# + 1000), 100) Long COMDLG_FILTERSPEC#, 0 = Text# Long COMDLG_FILTERSPEC#, 4 = int(Text# + 200) Long COMDLG_FILTERSPEC#, 8 = int(Text# + 400) Long COMDLG_FILTERSPEC#, 12 = int(Text# + 600) Long COMDLG_FILTERSPEC#, 16 = int(Text# + 800) Long COMDLG_FILTERSPEC#, 20 = int(Text# + 1000) CALL(LONG(COMMAND&,16),pfd&,3,COMDLG_FILTERSPEC#) 'Dateifilter Dispose Text# DIM Text#, 4001 Text$ = "gewählte Datei aufmachen" External("kernel32.dll", "MultiByteToWideChar", 0, 0, addr(Text$), -1, Text#, 2000) CALL(LONG(COMMAND&,72),pfd&,text#) 'Text auf Öffnen-Button Dispose Text# IF CALL(LONG(COMMAND&,12),pfd&,%HWND) = 0 'Dialog öffnen DIM Result#,6001 CALL(LONG(COMMAND&,80),pfd&,addr(Result&)) 'Result Callbackadresse holen Command& = Long(Result&,0) CALL(LONG(COMMAND&,20),Result&,$80058000,addr(Str&)) 'Displayname holen External("kernel32.dll", "WideCharToMultiByte", 0, 0, Str&, -1, Result#, 6000, 0, 0) CoTaskMemFree(Str&) Print String$(Result#, 0) Dispose Result# endif endif CoUnInitialize() Dispose IID_IFileOpenDialog# Dispose CLSID_FileOpenDialog# While %Umessage <> $10 Waitinput EndWhile
__________________
______________ Bitte Schnelltest durchführen: Neuer Virus, ahnungslose User seit Monaten infiziert! Mfg AHT |
|
|
|
![]() |
|
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
|
|
Ähnliche Themen
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| MS09-061 - Kritisch: Sicherheitsanfälligkeiten in Microsoft .NET Common Language Runt | Info | Microsoft Updates & Patches | 0 | 13.10.2009 21:20 |
| Dialog für Wechseldatenträger | Wiii | Hardware - Problemlösungen | 4 | 28.11.2008 10:28 |
| Bit Map im Dialog | Der_Fremde | C/C++, Visual C++, Visual C++.NET | 0 | 28.12.2005 16:42 |
| Item im Unterholz | Fette Henne | Allgemein | 0 | 26.10.2005 23:40 |
| ITEM Datei | 3_sternchen_3@web.de | Office-Anwendungen | 4 | 10.01.2005 15:18 |