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; }
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; } }
static TUI_MENU_CALLBACK(form_feed_callback) { if (been_activated) { printer_formfeed((unsigned int)param); } *become_default = 0; return NULL; }
static UI_MENU_CALLBACK(uiprinter_formfeed_callback) { printer_formfeed(vice_ptr_to_uint(param)); return NULL; }
static ULONG formfeed_userport(struct Hook *hook, Object *obj, APTR arg) { printer_formfeed(3); return 0; }
static ULONG formfeed_6(struct Hook *hook, Object *obj, APTR arg) { printer_formfeed(2); return 0; }