Esempio n. 1
0
static BOOL CALLBACK printer_dialog_proc(unsigned int num, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    int command;

    switch (msg) {
        case WM_COMMAND:
            command = LOWORD(wparam);
            switch (command) {
                case IDC_PRINTER_TYPE:
                case IDC_PRINTER_USEIECDEVICE:
                    enable_printer_controls(num, hwnd);
                    break;
                case IDC_PRINTER_FORMFEED:
                    switch (num) {
                        case 4:
                            printer_formfeed(0);
                            break;
                        case 5:
                            printer_formfeed(1);
                            break;
                        case 6:
                            printer_formfeed(2);
                            break;
                        case 0:
                            printer_formfeed(3);
                            break;
                    }
                    break;
            }
            return FALSE;
        case WM_NOTIFY:
            {
                NMHDR FAR *nmhdr = (NMHDR FAR *)(lparam);

                switch (nmhdr->code) {
                    case PSN_APPLY:
                        SetWindowLongPtr(hwnd, DWLP_MSGRESULT, store_printer_dialog_results(hwnd, num) ? PSNRET_NOERROR : PSNRET_INVALID);
                        return TRUE;
                    case PSN_SETACTIVE:
                        printer_set_active(hwnd);
                        return TRUE;
                    case PSN_KILLACTIVE:
                        printer_kill_active(hwnd);
                        return TRUE;
                }
                break;
            }
        case WM_CLOSE:
            EndDialog(hwnd, 0);
            return TRUE;
        case WM_INITDIALOG:
            system_init_dialog(hwnd);
            init_printer_dialog(num, hwnd);
            return TRUE;
    }

    return FALSE;
}
Esempio n. 2
0
void uiperipheral_command(HWND hwnd, WPARAM wparam)
{
    switch (wparam & 0xffff) {
        case IDM_DEVICEMANAGER:
            uiperipheral_dialog(hwnd);
            break;
        case IDM_FORMFEED_PRINTERIEC4:
            printer_formfeed(0);
            break;
        case IDM_FORMFEED_PRINTERIEC5:
            printer_formfeed(1);
            break;
        case IDM_FORMFEED_PRINTERIEC6:
            printer_formfeed(2);
            break;
    }
}
Esempio n. 3
0
static TUI_MENU_CALLBACK(form_feed_callback)
{
    if (been_activated) {
        printer_formfeed((unsigned int)param);
    }

    *become_default = 0;

    return NULL;
}
Esempio n. 4
0
static UI_MENU_CALLBACK(uiprinter_formfeed_callback)
{
    printer_formfeed(vice_ptr_to_uint(param));
    return NULL;
}
Esempio n. 5
0
static ULONG formfeed_userport(struct Hook *hook, Object *obj, APTR arg)
{
    printer_formfeed(3);
    return 0;
}
Esempio n. 6
0
static ULONG formfeed_6(struct Hook *hook, Object *obj, APTR arg)
{
    printer_formfeed(2);
    return 0;
}