?
+gjm+ schrieb:
Oh, sehe ich jetzt erst. Nimm mal folgende Zeile raus:
(...)
mov ofn.lStructSize, sizeof ofn
m2m ofn.lpstrFile, offset szFile
; mov ofn.lpstrFile[0], 0 ; <- die hier
mov ofn.nMaxFile, nMaxFile
m2m ofn.lpstrFilter, offset szFilter
(...)
invoke MessageBoxA, 0, ofn.lpstrFile, 0, 0 ; <- soll so bleiben
Ist irgendwie unlogisch, "ofn.lpstrFile" zu initialisieren und gleich danach wieder zu verändern.
besten dank, so klappts! hatte das falsch aus dem C-code übertragen. dort muss man ofn.lpstrFile[0] = '\0'; schreiben, da string sonst zur initialisierung verwendet wird.
msdn schrieb:
// Set lpstrFile[0] to '\0' so that GetOpenFileName does not
// use the contents of szFile to initialize itself.