Subversion Repositories filter_foundry

Rev

Rev 355 | Rev 402 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 355 Rev 393
Line 43... Line 43...
43
        char text[1000];
43
        char text[1000];
44
        char title[200];
44
        char title[200];
45
        PlatformData *p = (PlatformData*)pb->platformData;
45
        PlatformData *p = (PlatformData*)pb->platformData;
46
 
46
 
47
        if (gdata && gdata->standalone) {
47
        if (gdata && gdata->standalone) {
48
                sprintf(title, "About %s", INPLACEP2CSTR(gdata->parm.title));
48
                sprintf(title, "About %s", gdata->parm.szTitle);
49
                sprintf(text,  "%s by %s\n" /* {Title} by {Author} */
49
                sprintf(text,  "%s by %s\n" /* {Title} by {Author} */
50
                               "%s\n" /* {Copyright} */
50
                               "%s\n" /* {Copyright} */
51
                               "\n"
51
                               "\n"
52
                               "This plugin was built using Filter Foundry " VERSION_STR
52
                               "This plugin was built using Filter Foundry " VERSION_STR
53
                                #ifdef _WIN64
53
                                #ifdef _WIN64
Line 55... Line 55...
55
                                #else
55
                                #else
56
                               " (32 bit)\n"
56
                               " (32 bit)\n"
57
                                #endif
57
                                #endif
58
                               "(C) 2003-2009 Toby Thain, 2018-" RELEASE_YEAR " Daniel Marschall\n"
58
                               "(C) 2003-2009 Toby Thain, 2018-" RELEASE_YEAR " Daniel Marschall\n"
59
                               "available from " PROJECT_URL,
59
                               "available from " PROJECT_URL,
60
                               INPLACEP2CSTR(gdata->parm.title),
60
                               gdata->parm.szTitle,
61
                               INPLACEP2CSTR(gdata->parm.author),
61
                               gdata->parm.szAuthor,
62
                               INPLACEP2CSTR(gdata->parm.copyright));
62
                               gdata->parm.szCopyright);
63
        } else {
63
        } else {
64
                sprintf(title, "About Filter Foundry");
64
                sprintf(title, "About Filter Foundry");
65
                sprintf(text,  "Filter Foundry " VERSION_STR
65
                sprintf(text,  "Filter Foundry " VERSION_STR
66
                                #ifdef _WIN64
66
                                #ifdef _WIN64
67
                               " (64 bit)\n"
67
                               " (64 bit)\n"
Line 83... Line 83...
83
 
83
 
84
Boolean simplealert(char *s){
84
Boolean simplealert(char *s){
85
        HWND hwnd;
85
        HWND hwnd;
86
        char* title;
86
        char* title;
87
        if (gdata && gdata->standalone) {
87
        if (gdata && gdata->standalone) {
88
                title = INPLACEP2CSTR(gdata->parm.title);
88
                title = gdata->parm.szTitle;
89
        } else {
89
        } else {
90
                title = _strdup("Filter Foundry");
90
                title = _strdup("Filter Foundry");
91
        }
91
        }
92
        hwnd = gdata ? gdata->hWndMainDlg : NULL;
92
        hwnd = gdata ? gdata->hWndMainDlg : NULL;
93
        return MessageBox(hwnd,s,title,MB_TASKMODAL|MB_ICONERROR|MB_OK) == IDOK;
93
        return MessageBox(hwnd,s,title,MB_TASKMODAL|MB_ICONERROR|MB_OK) == IDOK;
Line 95... Line 95...
95
 
95
 
96
Boolean simplewarning(char* s) {
96
Boolean simplewarning(char* s) {
97
        HWND hwnd;
97
        HWND hwnd;
98
        char* title;
98
        char* title;
99
        if (gdata && gdata->standalone) {
99
        if (gdata && gdata->standalone) {
100
                title = INPLACEP2CSTR(gdata->parm.title);
100
                title = gdata->parm.szTitle;
101
        }
-
 
102
        else {
101
        } else {
103
                title = _strdup("Filter Foundry");
102
                title = _strdup("Filter Foundry");
104
        }
103
        }
105
        hwnd = gdata ? gdata->hWndMainDlg : NULL;
104
        hwnd = gdata ? gdata->hWndMainDlg : NULL;
106
        return MessageBox(hwnd,s,title,MB_TASKMODAL|MB_ICONEXCLAMATION|MB_OK) == IDOK;
105
        return MessageBox(hwnd,s,title,MB_TASKMODAL|MB_ICONEXCLAMATION|MB_OK) == IDOK;
107
}
106
}
108
 
107
 
109
Boolean showmessage(char *s) {
108
Boolean showmessage(char *s) {
110
        HWND hwnd;
109
        HWND hwnd;
111
        char* title;
110
        char* title;
112
        if (gdata && gdata->standalone) {
111
        if (gdata && gdata->standalone) {
113
                title = INPLACEP2CSTR(gdata->parm.title);
112
                title = gdata->parm.szTitle;
114
        } else {
113
        } else {
115
                title = _strdup("Filter Foundry");
114
                title = _strdup("Filter Foundry");
116
        }
115
        }
117
        hwnd = gdata ? gdata->hWndMainDlg : NULL;
116
        hwnd = gdata ? gdata->hWndMainDlg : NULL;
118
        return MessageBox(hwnd,s,title,MB_TASKMODAL|MB_ICONINFORMATION|MB_OK) == IDOK;
117
        return MessageBox(hwnd,s,title,MB_TASKMODAL|MB_ICONINFORMATION|MB_OK) == IDOK;
Line 177... Line 176...
177
        int item,i;
176
        int item,i;
178
        POINT newpos;
177
        POINT newpos;
179
        DRAWITEMSTRUCT *pdi;
178
        DRAWITEMSTRUCT *pdi;
180
        Point newscroll;
179
        Point newscroll;
181
        HGDIOBJ hfnt;
180
        HGDIOBJ hfnt;
182
        char s[0x100];
-
 
183
 
181
 
184
        extern Boolean doupdates;
182
        extern Boolean doupdates;
185
        extern Handle preview_handle;
183
        extern Handle preview_handle;
186
 
184
 
187
        switch(wMsg){
185
        switch(wMsg){
188
        case WM_INITDIALOG:
186
        case WM_INITDIALOG:
189
                gdata->hWndMainDlg = hDlg;
187
                gdata->hWndMainDlg = hDlg;
190
 
188
 
191
                if(gdata->standalone){
189
                if(gdata->standalone){
192
                        myp2cstrcpy(s,gdata->parm.title);
-
 
193
                        SetWindowText(hDlg,s); // window title bar
190
                        SetWindowText(hDlg,gdata->parm.szTitle); // window title bar
194
                }
191
                }
195
                centre_window(hDlg);
192
                centre_window(hDlg);
196
 
193
 
197
                hfnt = GetStockObject(ANSI_FIXED_FONT);
194
                hfnt = GetStockObject(ANSI_FIXED_FONT);
198
 
195