Subversion Repositories filter_foundry

Rev

Rev 29 | Rev 106 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. /*
  2.     This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
  3.     Copyright (C) 2003-5 Toby Thain, toby@telegraphics.com.au
  4.  
  5.     This program is free software; you can redistribute it and/or modify
  6.     it under the terms of the GNU General Public License as published by  
  7.     the Free Software Foundation; either version 2 of the License, or
  8.     (at your option) any later version.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License  
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18. */
  19.  
  20. /* Win32 user interface routines */
  21.  
  22. #include "world.h"
  23.  
  24. #include "PIAbout.h"
  25.  
  26. #include <windows.h>
  27. #include <commctrl.h>
  28.  
  29. #include "ff.h"
  30. #include "version.h"
  31.  
  32. extern HANDLE hDllInstance;
  33.  
  34. BOOL CALLBACK builddlgproc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  35.  
  36. BOOL CALLBACK builddlgproc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam){
  37.         int item;
  38.  
  39.         switch(wMsg){
  40.         case WM_INITDIALOG:
  41.                 centre_window(hDlg);
  42.                 builddlginit(hDlg);
  43.                 break;
  44.         case WM_COMMAND:
  45.                 item = LOWORD(wParam);
  46.                 switch(HIWORD(wParam)){
  47.                 case BN_CLICKED:
  48.                         if(!builddlgitem(hDlg,item))
  49.                                 EndDialog(hDlg,item);
  50.                         break;
  51.                 }
  52.                 break;
  53.         default:
  54.                 return false;
  55.         }
  56.  
  57.         return true;
  58. }
  59.  
  60. Boolean builddialog(FilterRecordPtr pb){
  61.         PlatformData *p = pb->platformData;
  62.         return DialogBoxParam(hDllInstance,MAKEINTRESOURCE(ID_BUILDDLG),
  63.                                                   (HWND)p->hwnd,builddlgproc,0) == IDOK;
  64. }
  65.