Rev 402 | Rev 413 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 402 | Rev 412 | ||
---|---|---|---|
Line 76... | Line 76... | ||
76 | "suggestions or comments.\n" |
76 | "suggestions or comments.\n" |
77 | "If you use this program and like it, please consider\n" |
77 | "If you use this program and like it, please consider\n" |
78 | "making a donation."); |
78 | "making a donation."); |
79 | } |
79 | } |
80 | 80 | ||
81 | MessageBox((HWND)p->hwnd, text, title, MB_APPLMODAL|MB_ICONINFORMATION|MB_OK); |
81 | MessageBox((HWND)p->hwnd, text, title, MB_TASKMODAL|MB_ICONINFORMATION|MB_OK); |
82 | } |
82 | } |
83 | 83 | ||
84 | Boolean simplealert(char *s){ |
84 | Boolean simplealert(char *s){ |
85 | HWND hwnd; |
85 | HWND hwnd; |
86 | char* title; |
86 | char* title; |
Line 299... | Line 299... | ||
299 | return true; |
299 | return true; |
300 | } |
300 | } |
301 | 301 | ||
302 | Boolean maindialog(FilterRecordPtr pb){ |
302 | Boolean maindialog(FilterRecordPtr pb){ |
303 | PlatformData *p; |
303 | PlatformData *p; |
304 | WNDCLASSEX clx; |
304 | WNDCLASS clx; |
305 | Boolean res; |
305 | INT_PTR res; |
306 | 306 | ||
307 | // For the preview image, we register a class, so that we can assign a mouse cursor to this class. |
307 | // For the preview image, we register a class, so that we can assign a mouse cursor to this class. |
308 | clx.cbSize = sizeof(WNDCLASSEX); |
- | |
309 | GetClassInfoEx(hDllInstance, "STATIC", &clx); |
308 | GetClassInfo(hDllInstance, "STATIC", &clx); |
310 | clx.lpszClassName = "Preview"; |
309 | clx.lpszClassName = "Preview"; |
311 | RegisterClassEx(&clx); |
310 | RegisterClass(&clx); |
312 | 311 | ||
313 | // For the caution images, we register a class, so that we can assign a mouse cursor to this class. |
312 | // For the caution images, we register a class, so that we can assign a mouse cursor to this class. |
314 | clx.cbSize = sizeof(WNDCLASSEX); |
- | |
315 | GetClassInfoEx(hDllInstance, "STATIC", &clx); |
313 | GetClassInfo(hDllInstance, "STATIC", &clx); |
316 | clx.lpszClassName = "CautionSign"; |
314 | clx.lpszClassName = "CautionSign"; |
317 | RegisterClassEx(&clx); |
315 | RegisterClass(&clx); |
318 | 316 | ||
319 | // Now show the dialog |
317 | // Now show the dialog |
320 | p = (PlatformData*)pb->platformData; |
318 | p = (PlatformData*)pb->platformData; |
321 | res = DialogBoxParam(hDllInstance,MAKEINTRESOURCE(gdata->standalone ? ID_PARAMDLG : ID_MAINDLG), |
319 | res = DialogBoxParam(hDllInstance,MAKEINTRESOURCE(gdata->standalone ? ID_PARAMDLG : ID_MAINDLG), |
322 | (HWND)p->hwnd,maindlgproc,0) == IDOK; |
320 | (HWND)p->hwnd,maindlgproc,0); |
- | 321 | if (res == 0) { |
|
- | 322 | simplealert("DialogBoxParam in valid parent window handle"); |
|
- | 323 | } |
|
- | 324 | if (res == -1) { |
|
- | 325 | char s[100]; |
|
- | 326 | strcpy(s, "DialogBoxParam failed: "); |
|
- | 327 | FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, s + strlen(s), 0x100, NULL); |
|
- | 328 | dbg(s); |
|
- | 329 | } |
|
323 | 330 | ||
324 | // Clean up after the dialog has been closed |
331 | // Clean up after the dialog has been closed |
325 | UnregisterClass("Preview", hDllInstance); |
332 | UnregisterClass("Preview", hDllInstance); |
326 | UnregisterClass("CautionSign", hDllInstance); |
333 | UnregisterClass("CautionSign", hDllInstance); |
327 | 334 | ||
328 | return res; |
335 | return res == IDOK; |
329 | } |
336 | } |
330 | 337 |