Rev 18 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | toby | 1 | /* Win32 user interface routines |
2 | Copyright (C) 2003-4 Toby Thain <toby@telegraphics.com.au> */ |
||
3 | |||
4 | #include "world.h" |
||
5 | |||
6 | #include "piabout.h" |
||
7 | |||
8 | #include <windows.h> |
||
9 | #include <commctrl.h> |
||
10 | |||
11 | #include "ff.h" |
||
12 | #include "version.h" |
||
13 | |||
14 | extern HANDLE hDllInstance; |
||
15 | |||
16 | BOOL CALLBACK builddlgproc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam); |
||
17 | |||
18 | BOOL CALLBACK builddlgproc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam){ |
||
19 | int item; |
||
20 | |||
21 | switch(wMsg){ |
||
22 | case WM_INITDIALOG: |
||
23 | centre_window(hDlg); |
||
24 | builddlginit(hDlg); |
||
25 | break; |
||
26 | case WM_COMMAND: |
||
27 | item = LOWORD(wParam); |
||
28 | switch(HIWORD(wParam)){ |
||
29 | case BN_CLICKED: |
||
30 | if(!builddlgitem(hDlg,item)) |
||
31 | EndDialog(hDlg,item); |
||
32 | break; |
||
33 | } |
||
34 | break; |
||
35 | default: |
||
36 | return false; |
||
37 | } |
||
38 | |||
39 | return true; |
||
40 | } |
||
41 | |||
42 | Boolean builddialog(FilterRecordPtr pb){ |
||
43 | PlatformData *p = pb->platformData; |
||
44 | return DialogBoxParam(hDllInstance,MAKEINTRESOURCE(ID_BUILDDLG), |
||
45 | (HWND)p->hwnd,builddlgproc,0) == IDOK; |
||
46 | } |