/* This file is part of SGI Format, a File Format plugin for Adobe Photoshop Copyright (C) 2003-2010 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 #include "sgiformat.h" #include "ui.h" #include "version.h" extern HANDLE hDllInstance; void DoAbout(AboutRecordPtr pb){ PlatformData *p = (PlatformData*)pb->platformData; MessageBox((HWND)p->hwnd,"SGI Format, version " VERSION_STR "\n\ Copyright 2003-2010 Toby Thain .\n\n\ http://www.telegraphics.com.au/sw/\n\n\ Please contact the author with any bug reports, suggestions or comments.", "About SGI Format",MB_APPLMODAL|MB_ICONINFORMATION|MB_OK); } INT_PTR CALLBACK compdlgproc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam){ int item,cmd; switch(wMsg){ case WM_INITDIALOG: centre_window(hDlg); compdlg_init(hDlg); break; case WM_COMMAND: item = LOWORD(wParam); cmd = HIWORD(wParam); if(cmd == BN_CLICKED && !compdlg_item(hDlg,item)) EndDialog(hDlg,item); break; default: return false; } return true; } Boolean compdlg(){ PlatformData *p = (PlatformData*)gpb->platformData; return DialogBoxParam(hDllInstance,MAKEINTRESOURCE(ID_COMPDLG),(HWND)p->hwnd,compdlgproc,0) == IDOK; }