Subversion Repositories filter_foundry

Compare Revisions

Regard whitespace Rev 444 → Rev 445

/trunk/CHANGELOG.md
1,5 → 1,9
# Changelog
 
## 1.7.0.14 [Work-In-Progress]
- Made an Unicode variant of Filter Foundry which is able to read and write files with Unicode directory names. Note that the Plugin and Parameter structure of Photoshop/FilterFactory is not Unicode ready, so please use ANSI or better ASCII for them.
- Windows NT 3.x: Preview is now showed when the dialog is opened.
 
## 1.7.0.13 [04-Dec-2021]
- Internal change: PARM resource inside memory works now with C-Strings instead of Pascal-Strings.
- The released 32-bit version is now optimized by the compiler.
/trunk/TODO.md
135,6 → 135,8
Regarding Macintosh
-------------------
 
* Please make a port to the latest Apple versions (and possible builds for older MacOS versions, too?)
 
* Unsure regarding AppleScript !
https://developer.apple.com/library/archive/documentation/mac/pdf/Interapplication_Communication/AE_Term_Resources.pdf
1. Do we need an 'auet' resource?
/trunk/WinNT31Compat.md
47,6 → 47,7
Therefore, the zoom icons and the caution icons are now Buttons classes (or subclasses).
 
- WinNT311: "msctls_trackbar32" is not supported by Windows NT 3.1. `DialogBoxParamA` crashes with the confusing error code "Invalid Cursor Handle".
 
Note: msctls_trackbar32 seems to be defined in COMCTL32.DLL, but Win NT 3.1 has no REGSVR32.EXE, so there can't be any controls added??
Windows NT 3.51 has COMCTL32.DLL and works perfectly with the trackbars!
Fixed in SVN Revision 422: We are now using the sliders of Photoshop using PLUGIN.DLL (like Filter Factory 3.0.4 does).
55,6 → 56,13
and let the user enter the control values via keyboard only (SVN Revision 419).
Note that you can copy PLUGIN.DLL to any host application. It is not bound to Photoshop. However, it is copyrighted by Adobe!
 
- WinNT311+WinNT351: The preview image is not drawn at dialog box opening. You need to enter something first.
 
Nothing seems to work. Already tried doing a `recalc_preview` and `drawpreview` in `WM_SHOWWINDOW` or
`WM_ACTIVATE` or `WM_WINDOWPOSCHANGES`, or sending a message `SendMessage(hDlg, WM_USER + 123, 0, 0);` inside `WM_INITDIALOG`,
but the code seems to be executed while the dialog is still hidden (you can see this by showing a messagebox).
So, I have finally solved it with a `WM_TIMER` in SVN Revision445.
 
Things couldn't solve yet:
--------------------------
 
65,11 → 73,6
- WinNT351: Help button does not work
=> Maybe WinExec helps? But can we open an URL there? Unlikely...
 
- WinNT311+WinNT351: The preview image is not drawn at dialog box opening. You need to enter something first.
Nothing seems to work. Already tried doing a `recalc_preview` and `drawpreview` in `WM_SHOWWINDOW`,
or sending a message `SendMessage(hDlg, WM_USER + 123, 0, 0);` inside `WM_INITDIALOG`, but the code
seems to be executed while the dialog is still hidden (you can see this by showing a messagebox).
 
Open questions:
---------------
 
/trunk/make_win.c
670,9 → 670,9
sprintf(errA, "Could not create %d bit standalone plugin (doresources failed).", bits);
#ifdef UNICODE
mbstowcs(errW, errA, MAX_PATH + 200);
alertuser(&errW[0], (TCHAR*)TEXT(""));
simplealert(&errW[0]);
#else
alertuser(&errA[0], (TCHAR*)TEXT(""));
simplealert(&errA[0]);
#endif
}
}
684,9 → 684,9
sprintf(errA, "Could not create %d bit standalone plugin (File extraction failed).", bits);
#ifdef UNICODE
mbstowcs(errW, errA, MAX_PATH + 200);
alertuser(&errW[0], (TCHAR*)TEXT(""));
simplealert(&errW[0]);
#else
alertuser(&errA[0], (TCHAR*)TEXT(""));
simplealert(&errA[0]);
#endif
}
 
/trunk/preview.c
482,6 → 482,16
}
 
void recalc_preview(FilterRecordPtr pb, DIALOGREF dp) {
// TODO? When a formula has an error, the preview should not be changeable
// (This code does not work because you can still try to zoom)
/*
if (!gdata->standalone) {
int i;
for (i = 0; i < 4; i++)
if (!parseexpr(expr[i])) return;
}
*/
 
if (HAS_BIG_DOC(pb)) {
recalc_preview_bigdoc(pb, dp);
}
/trunk/ui.c
225,7 → 225,7
/* uh oh, couldn't parse one of the saved expressions...this is fatal */
DISABLEDLGITEM(dp,IDOK);
if(gdata->standalone){
alertuser((TCHAR*)TEXT("Can't run this filter (there is a problem with the saved expressions)."), (TCHAR*)TEXT(""));
simplealert((TCHAR*)TEXT("Can't run this filter (there is a problem with the saved expressions)."));
}else{
DISABLEDLGITEM(dp,SAVEITEM);
DISABLEDLGITEM(dp,MAKEITEM);
524,9 → 524,9
#ifdef UNICODE
TCHAR errW[0x300];
mbstowcs(errW, err[item], 0x300);
alertuser(errW, (TCHAR*)TEXT(""));
simplealert(errW);
#else
alertuser(err[item], (TCHAR*)TEXT(""));
simplealert(err[item]);
#endif
}
SELECTCTLTEXT(dp,FIRSTEXPRITEM+item,errstart[item],errpos[item]);
/trunk/ui_win.c
179,6 → 179,8
return hwndTip;
}
 
#define IDT_TIMER_INITPREVIEW_DRAW 1111
 
INT_PTR CALLBACK maindlgproc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam){
static POINT origpos;
static Point origscroll;
209,6 → 211,15
}
 
switch (wMsg) {
case WM_TIMER:
switch (wParam)
{
case IDT_TIMER_INITPREVIEW_DRAW:
recalc_preview(gpb, hDlg);
KillTimer(hDlg, 123);
return 0;
}
break;
case WM_INITDIALOG:
gdata->hWndMainDlg = hDlg;
 
261,6 → 272,12
}
 
maindlginit(hDlg);
 
// Some versions of Windows (NT 3.x) won't show the preview if it is calculated here.
// So we need to put it in a timer. For some reasons, 1ms is enough. We do 100, just to be sure
//recalc_preview(gpb, hDlg);
SetTimer(hDlg, IDT_TIMER_INITPREVIEW_DRAW, 100, (TIMERPROC)NULL);
 
break;
case WM_DESTROY:
gdata->hWndMainDlg = 0;
/trunk/visual_studio/FilterFoundry.vcxproj
119,7 → 119,7
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>WIN32;WIN_ENV;YY_SKIP_YYWRAP;YY_NO_UNISTD_H;_DEBUG;DLL3_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;_UNICODE;WIN32;WIN_ENV;YY_SKIP_YYWRAP;YY_NO_UNISTD_H;_DEBUG;DLL3_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary />
</ClCompile>
130,7 → 130,7
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\photoshop_sdk\pluginsdk\photoshopapi\pica_sp;..\photoshop_sdk\pluginsdk\photoshopapi\photoshop;..\telegraphics_common\adobeplugin;..\telegraphics_common\tt;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN_ENV;WIN32;_X86_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;_UNICODE;WIN_ENV;WIN32;_X86_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<PreBuildEvent>
<Command>cd ..
151,7 → 151,7
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>WIN32;WIN_ENV;YY_SKIP_YYWRAP;YY_NO_UNISTD_H;_DEBUG;DLL3_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;_UNICODE;WIN32;WIN_ENV;YY_SKIP_YYWRAP;YY_NO_UNISTD_H;_DEBUG;DLL3_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary />
</ClCompile>
162,7 → 162,7
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\photoshop_sdk\pluginsdk\photoshopapi\pica_sp;..\photoshop_sdk\pluginsdk\photoshopapi\photoshop;..\telegraphics_common\adobeplugin;..\telegraphics_common\tt;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN_ENV;WIN32;_WIN64;_AMD64_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;_UNICODE;WIN_ENV;WIN32;_WIN64;_AMD64_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<PreBuildEvent>
<Command>cd ..
185,7 → 185,7
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>WIN32;WIN_ENV;YY_SKIP_YYWRAP;YY_NO_UNISTD_H;NDEBUG;DLL3_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;_UNICODE;WIN32;WIN_ENV;YY_SKIP_YYWRAP;YY_NO_UNISTD_H;NDEBUG;DLL3_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary />
</ClCompile>
198,7 → 198,7
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>photoshop_sdk\pluginsdk\photoshopapi\pica_sp;photoshop_sdk\pluginsdk\photoshopapi\photoshop;telegraphics_common\adobeplugin;telegraphics_common\tt;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN_ENV;WIN32;_X86_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;_UNICODE;WIN_ENV;WIN32;_X86_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<PreBuildEvent>
<Command>cd ..
221,7 → 221,7
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>WIN32;WIN_ENV;YY_SKIP_YYWRAP;YY_NO_UNISTD_H;NDEBUG;DLL3_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;_UNICODE;WIN32;WIN_ENV;YY_SKIP_YYWRAP;YY_NO_UNISTD_H;NDEBUG;DLL3_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary />
</ClCompile>
234,7 → 234,7
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\photoshop_sdk\pluginsdk\photoshopapi\pica_sp;..\photoshop_sdk\pluginsdk\photoshopapi\photoshop;..\telegraphics_common\adobeplugin;..\telegraphics_common\tt;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN_ENV;WIN32;_WIN64;_AMD64_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;_UNICODE;WIN_ENV;WIN32;_WIN64;_AMD64_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<PreBuildEvent>
<Command>cd ..