/* This file is part of PSPFormat, a File Format plugin for Adobe Photoshop Copyright (C) 2003-2011 Toby Thain, toby@telegraphics.com.au This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Win32 user interface routines for cross-platform plugin */ #include "world.h" #include "PIAbout.h" #include "PIFormat.h" #include #include #include "pspformat.h" #include "ui.h" #include "ui_defs.h" #include "version.h" extern HANDLE hDllInstance; void DoAbout(AboutRecordPtr pb){ PlatformData *p = (PlatformData*)pb->platformData; MessageBox((HWND)p->hwnd, "Paint Shop Pro Format, version " VERSION_STR "\n\ Copyright 2003-2011 Toby Thain .\n\n\ http://www.telegraphics.com.au/sw/\n\n\ Uses zlib by Jean-loup Gailly & Mark Adler, http://www.zlib.org/\n\n\ Please contact the author with any bug reports, suggestions or comments.", "About Paint Shop Pro Format", MB_APPLMODAL|MB_ICONINFORMATION|MB_OK); } void alert(char *s){ PlatformData *p = (PlatformData*)gpb->platformData; MessageBox((HWND)p->hwnd, s, "Paint Shop Pro Format", MB_APPLMODAL|MB_ICONINFORMATION|MB_OK); } INT_PTR CALLBACK layerdlgproc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam){ int item, cmd; switch(wMsg){ case WM_INITDIALOG: centre_window(hDlg); layerdlg_init(hDlg); break; case WM_COMMAND: item = LOWORD(wParam); cmd = HIWORD(wParam); if(cmd == BN_CLICKED && !layerdlg_item(hDlg, item)) EndDialog(hDlg, item); break; default: return false; } return true; } Boolean layerdlg(){ PlatformData *p = (PlatformData*)gpb->platformData; return DialogBoxParam(hDllInstance, MAKEINTRESOURCE(ID_LAYERDLG), (HWND)p->hwnd, layerdlgproc, 0) == IDOK; } INT_PTR CALLBACK savedlgproc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam){ int item, cmd; switch(wMsg){ case WM_INITDIALOG: centre_window(hDlg); savedlg_init(hDlg); break; case WM_COMMAND: item = LOWORD(wParam); cmd = HIWORD(wParam); if(cmd == BN_CLICKED && !savedlg_item(hDlg, item)) EndDialog(hDlg, item); break; default: return false; } return true; } Boolean savedlg(){ PlatformData *p = (PlatformData*)gpb->platformData; return DialogBoxParam(hDllInstance, MAKEINTRESOURCE(ID_SAVEDLG), (HWND)p->hwnd, savedlgproc, 0) == IDOK; }