--- a/WinWorkstation.st Sat Nov 17 09:42:48 2018 +0100
+++ b/WinWorkstation.st Mon Nov 19 14:51:24 2018 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1996 by Claus Gittinger
All Rights Reserved
@@ -976,12 +978,7 @@
WCHAR filename[1000 * MAX_PATH]; // big buffer to support multiselect
WCHAR directory[MAX_PATH];
WCHAR title[MAX_PATH];
-#if 0
- DWORD owningWindow; // HWND as DWORD to be 32 and 64 bit compatible
-#else
- // cg: rubbish: don't fiddle around with HWND: a handle is a handle, not a DWORD
HWND owningWindow;
-#endif
WCHAR filter[10 * MAX_PATH]; // there could be many filters
DWORD filterIndex;
BOOL trueForSave;
@@ -1009,7 +1006,7 @@
ofn.lpstrTitle = pFdd->title;
ofn.lpstrFilter = pFdd->filter;
ofn.nFilterIndex = pFdd->filterIndex;
- ofn.hwndOwner = (HWND)(pFdd->owningWindow);
+ ofn.hwndOwner = pFdd->owningWindow;
if (pFdd->trueForSave) {
if (pFdd->trueForPromptOverwrite) {
@@ -2208,7 +2205,7 @@
}
goto again;
}
- /* fail evtl. später ändern und in st verzögert aufrufen
+ /* fail evtl. später ändern und in st verzögert aufrufen
*/
console_fprintf(stderr, "WinWorkstation [info]: UnregisterClass %s failed.\n",(char*)ev->ev_arg1);
}
@@ -17206,26 +17203,37 @@
nativeFileDialogBinaryPath
"
- Display nativeFileDialogBinaryPath
- "
-
- |directory|
+ Display nativeFileDialogBinaryPath
+ "
+
+ |directory pointerSize baseName|
Smalltalk isStandAloneApp ifTrue:[
- "if you have a standalone like expecco,
- copy the binary to your binary folder (by nsis or etc)"
- directory := OperatingSystem pathOfSTXExecutable asFilename directory.
+ "if you have a standalone like expecco,
+ copy the binary to your binary folder (by nsis or etc)"
+ directory := OperatingSystem pathOfSTXExecutable asFilename directory.
] ifFalse:[
- directory := (Smalltalk
- packageDirectoryForPackageId:self class package)
- directory
- / 'support/win32/nativeFileDialog'
- ].
-
- ^ (directory / 'nativeFileDialog.exe') pathName
+ directory := (Smalltalk
+ packageDirectoryForPackageId:self class package)
+ directory
+ / 'support/win32/nativeFileDialog'
+ ].
+
+ pointerSize := ExternalAddress pointerSize.
+ pointerSize == 4 ifTrue:[
+ baseName := 'nativeFileDialog32.exe'.
+ ] ifFalse:[
+ pointerSize == 8 ifTrue:[
+ baseName := 'nativeFileDialog64.exe'.
+ ] ifFalse:[
+ self notYetImplemented.
+ ].
+ ].
+
+ ^ (directory / baseName) pathName
"Created: / 08-11-2018 / 16:06:59 / sr"
- "Modified: / 09-11-2018 / 09:14:32 / sr"
+ "Modified: / 19-11-2018 / 14:50:05 / sr"
!
nativeFileDialogWithTitle:dialogTitleArg
@@ -17638,7 +17646,7 @@
pFdd->title[i] = 0;
};
if (__isExternalAddress(owningViewId)) {
- pFdd->owningWindow = (DWORD32)_HWNDVal(owningViewId);
+ pFdd->owningWindow = _HWNDVal(owningViewId);
};
if (__isUnicode16String(filterString)) {
for (i = 0; i < __unicode16StringSize(filterString); i++) {
@@ -20373,7 +20381,7 @@
}
%}
"
- (StandardSystemView new label:'äöü') open
+ (StandardSystemView new label:'äöü') open
"
!