Subversion Repositories filter_foundry

Rev

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

Rev 459 Rev 460
Line 230... Line 230...
230
        HGDIOBJ hfnt;
230
        HGDIOBJ hfnt;
231
 
231
 
232
        extern Boolean doupdates;
232
        extern Boolean doupdates;
233
        extern Handle preview_handle;
233
        extern Handle preview_handle;
234
 
234
 
-
 
235
        WNDPROC wndProcStatic, wndProcButton;
-
 
236
 
235
        if ((gdata->pluginDllSliderMessageId != 0) && (wMsg == gdata->pluginDllSliderMessageId)) {
237
        if ((gdata->pluginDllSliderMessageId != 0) && (wMsg == gdata->pluginDllSliderMessageId)) {
236
                // This is for the PLUGIN.DLL sliders only
238
                // This is for the PLUGIN.DLL sliders only
237
                if (doupdates) {
239
                if (doupdates) {
238
                        int sliderNum = (int)wParam - FIRSTCTLITEM;
240
                        int sliderNum = (int)wParam - FIRSTCTLITEM;
239
                        int sliderVal = (lParam & 0xFFFF);
241
                        int sliderVal = (lParam & 0xFFFF);
Line 320... Line 322...
320
                        #endif
322
                        #endif
321
                }
323
                }
322
 
324
 
323
                maindlginit(hDlg);
325
                maindlginit(hDlg);
324
 
326
 
-
 
327
                // Win32s (Win3.11) compatibility fix: Since GetClassInfo("Button") and GetClassInfo("Static") won't work,
-
 
328
                // we had replaced the WndProc by a dummy. Now, we find out the real Button and Static WndProcs and give them
-
 
329
                // to our classes, making them the intended superclasses. Messages which have been sent in between were lost,
-
 
330
                // though...
-
 
331
 
-
 
332
                wndProcStatic = (WNDPROC)GetWindowLongPtr(GetDlgItem(hDlg, FIRSTCTLLABELITEM), GWLP_WNDPROC);
-
 
333
                SetWindowLongPtr(GetDlgItem(hDlg, PREVIEWITEM), GWLP_WNDPROC, (LONG)wndProcStatic);
-
 
334
 
-
 
335
                wndProcButton = (WNDPROC)GetWindowLongPtr(GetDlgItem(hDlg, OPENITEM), GWLP_WNDPROC);
-
 
336
                SetWindowLongPtr(GetDlgItem(hDlg, FIRSTICONITEM), GWLP_WNDPROC, (LONG)wndProcButton);
-
 
337
                SetWindowLongPtr(GetDlgItem(hDlg, FIRSTICONITEM + 1), GWLP_WNDPROC, (LONG)wndProcButton);
-
 
338
                SetWindowLongPtr(GetDlgItem(hDlg, FIRSTICONITEM + 2), GWLP_WNDPROC, (LONG)wndProcButton);
-
 
339
                SetWindowLongPtr(GetDlgItem(hDlg, FIRSTICONITEM + 3), GWLP_WNDPROC, (LONG)wndProcButton);
-
 
340
 
325
                // Some versions of Windows (NT 3.x) won't show the preview if it is calculated here.
341
                // Some versions of Windows (NT 3.x) won't show the preview if it is calculated here.
326
                // So we need to put it in a timer.
342
                // So we need to put it in a timer.
327
                // Note that 1 millisecond is enough, even if the window needs longer than 1 millisecond to load.
343
                // Note that 1 millisecond is enough, even if the window needs longer than 1 millisecond to load.
328
                //recalc_preview(gpb, hDlg);
344
                //recalc_preview(gpb, hDlg);
329
                SetTimer(hDlg, IDT_TIMER_INITPREVIEW_DRAW, 1, (TIMERPROC)NULL);
345
                SetTimer(hDlg, IDT_TIMER_INITPREVIEW_DRAW, 1, (TIMERPROC)NULL);
Line 426... Line 442...
426
                        Slider_Init_None(TEXT("FoundrySlider"));
442
                        Slider_Init_None(TEXT("FoundrySlider"));
427
                }
443
                }
428
        }
444
        }
429
 
445
 
430
        // For the preview image and caution symbols, we register subclasses, so that we can assign a mouse cursor to this class.
446
        // For the preview image and caution symbols, we register subclasses, so that we can assign a mouse cursor to this class.
431
        MakeSimpleSubclass(TEXT("Preview"), TEXT("STATIC"));
447
        MakeSimpleSubclass(TEXT("Preview"), WC_STATIC);
432
        MakeSimpleSubclass(TEXT("Caution"), TEXT("Button"));
448
        MakeSimpleSubclass(TEXT("Caution"), WC_BUTTON);
433
 
449
 
434
        // Now show the dialog
450
        // Now show the dialog
435
        p = (PlatformData*)pb->platformData;
451
        p = (PlatformData*)pb->platformData;
436
 
452
 
437
        // Note: "Invalid Cursor Handle" is the error when an unrecognized control class is detected
453
        // Note: "Invalid Cursor Handle" is the error when an unrecognized control class is detected
438
        // TODO: Win 3.1 mit Win32s: "The parameter is incorrect"
-
 
439
        res = DialogBoxParam(hDllInstance,MAKEINTRESOURCE(gdata->standalone ? ID_PARAMDLG : ID_MAINDLG),
454
        res = DialogBoxParam(hDllInstance,MAKEINTRESOURCE(gdata->standalone ? ID_PARAMDLG : ID_MAINDLG),
440
                             (HWND)p->hwnd,maindlgproc,0);
455
                             (HWND)p->hwnd,maindlgproc,0);
441
        if (res == 0) {
456
        if (res == 0) {
442
                simplealert((TCHAR*)TEXT("DialogBoxParam invalid parent window handle"));
457
                simplealert((TCHAR*)TEXT("DialogBoxParam invalid parent window handle"));
443
        }
458
        }