/* This file is part of "psdrecover", a File Format plugin for Adobe Photoshop Copyright (C) 2007-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 "ui.h" #include "version.h" extern HANDLE hDllInstance; void DoAbout(AboutRecordPtr pb){ PlatformData *p = (PlatformData*)pb->platformData; MessageBox((HWND)p->hwnd, "PSD Extract/Recover, version " VERSION_STR "\n\ Copyright 2007-2011 Toby Thain .\n\ Latest version available from http://www.telegraphics.com.au/\n\n\ If you use this program and like it, please use www.paypal.com to send the author \ what you think it is worth (US$5 suggested).\n\ Please contact the author with any bug reports, suggestions or comments.", "About PSD Extract/Recover", MB_APPLMODAL|MB_ICONINFORMATION|MB_OK); } Boolean warndialog(char *s){ return MessageBox(0, s, "Warning", MB_APPLMODAL|MB_ICONWARNING|MB_OK/*CANCEL*/) == IDOK; } INT_PTR CALLBACK picklayerdlgproc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam){ int item, cmd; switch(wMsg){ case WM_INITDIALOG: centre_window(hDlg); // an equivalent function can be found in PS6 SDK, WinUtilities.cpp picklayerinit(hDlg); break; case WM_COMMAND: item = LOWORD(wParam); cmd = HIWORD(wParam); if(cmd == BN_CLICKED && !picklayeritem(hDlg, item)) EndDialog(hDlg, item); break; default: return false; } return true; } Boolean picklayerdialog(FormatRecordPtr pb){ PlatformData *p = (PlatformData*)pb->platformData; return DialogBoxParam(hDllInstance, MAKEINTRESOURCE(ID_PICKLAYERDLG), (HWND)p->hwnd, picklayerdlgproc, 0) == IDOK; }