MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / DlgPrinterOK

Method DlgPrinterOK

source/Configuration/PageSlots.cpp:1139–1165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1137}
1138
1139void CPageSlots::DlgPrinterOK(HWND hWnd)
1140{
1141 ParallelPrinterCard& card = m_PropertySheetHelper.GetConfigNew().m_parallelPrinterCard;
1142
1143 // Update printer dump filename
1144 {
1145 char szFilename[MAX_PATH];
1146 memset(szFilename, 0, sizeof(szFilename));
1147 *(USHORT*)szFilename = sizeof(szFilename);
1148
1149 LRESULT nLineLength = SendDlgItemMessage(hWnd, IDC_PRINTER_DUMP_FILENAME, EM_LINELENGTH, 0, 0);
1150
1151 SendDlgItemMessage(hWnd, IDC_PRINTER_DUMP_FILENAME, EM_GETLINE, 0, (LPARAM)szFilename);
1152
1153 nLineLength = nLineLength > sizeof(szFilename) - 1 ? sizeof(szFilename) - 1 : nLineLength;
1154 szFilename[nLineLength] = 0x00;
1155
1156 card.SetFilename(szFilename);
1157 }
1158
1159 card.SetDumpToPrinter(IsDlgButtonChecked(hWnd, IDC_DUMPTOPRINTER) ? true : false);
1160 card.SetConvertEncoding(IsDlgButtonChecked(hWnd, IDC_PRINTER_CONVERT_ENCODING) ? true : false);
1161 card.SetFilterUnprintable(IsDlgButtonChecked(hWnd, IDC_PRINTER_FILTER_UNPRINTABLE) ? true : false);
1162 card.SetPrinterAppend(IsDlgButtonChecked(hWnd, IDC_PRINTER_APPEND) ? true : false);
1163
1164 card.SetIdleLimit((short)SendDlgItemMessage(hWnd, IDC_SPIN_PRINTER_IDLE, UDM_GETPOS, 0, 0));
1165}
1166
1167void CPageSlots::ConfigResetPrinter(UINT slot)
1168{

Callers

nothing calls this directly

Calls 6

SetFilenameMethod · 0.80
SetDumpToPrinterMethod · 0.80
SetConvertEncodingMethod · 0.80
SetFilterUnprintableMethod · 0.80
SetPrinterAppendMethod · 0.80
SetIdleLimitMethod · 0.80

Tested by

no test coverage detected