Category : Files from Magazines
Archive   : JUN91.ZIP
Filename : 2N06071A

 
Output of file : 2N06071A contained in archive : JUN91.ZIP

/******************************************************************
* PrintDlgProc - Print status window dialog window
*
* Global:
* bUserAbort
* hDlgPrint
*
* Copyright:
* Original code by William H. Roetzheim (619) 669-6970
* Copyright 1990 by William H. Roetzheim
* All rights reserved.
**********************************************************************/

BOOL FAR PASCAL PrintDlgProc (HWND hDlg, unsigned iMessage, WORD wParam, LONG lParam)
{
switch (iMessage)
{
case WM_COMMAND:
switch (wParam)
{
case IDD_CANCEL:
bUserAbort = TRUE;
EnableWindow (GetParent (hDlg), TRUE);
DestroyWindow (hDlg);
hDlgPrint = 0;
break;

default:
return FALSE;
}
break;

default:
return FALSE;
}
return TRUE;
}


/******************************************************************
* AbortDlgProc - Dialog procedure for abort print
*
* Global:
* bUserAbort
* hDlgPrint
*
* Copyright:
* Original code by William H. Roetzheim (619) 669-6970
* Copyright 1990 by William H. Roetzheim
* All rights reserved.
**********************************************************************/

BOOL FAR PASCAL AbortDlgProc (HDC hPrinterDC, short nCode)
{
MSG msg;

while (!bUserAbort && PeekMessage (&msg, (HWND) (WORD)
NULL, 0, 0, (WORD) PM_REMOVE))
{
if (!hDlgPrint || !IsDialogMessage (hDlgPrint, &msg))
{
TranslateMessage (&msg);
DispatchMessage (&msg);
}
}
return !bUserAbort;
}





/******************************************************************
* PrintNetwork - Print entire network, one page at a time.
*
* Parameters:
*
* Global:
* hInstance
* spProject
* rBlock
*
* Copyright:
* Original code by William H. Roetzheim (619) 669-6970
* Copyright 1990 by William H. Roetzheim
* All rights reserved.
**********************************************************************/

void PrintNetwork (void)
{
HDC hPrnDC;
FARPROC lpfnAbortDlgProc, lpfnPrintDlgProc;

if (NULL == (hPrnDC = GetPrinterDC (hNetworkWnd)))
{
return;
}

bUserAbort = FALSE;
lpfnPrintDlgProc = MakeProcInstance (PrintDlgProc, hInstance);
hDlgPrint = CreateDialog (hInstance, "PRINTDLGBOX", hNetworkWnd, lpfnPrintDlgProc);
lpfnAbortDlgProc = MakeProcInstance (AbortDlgProc, hInstance);
Escape (hPrnDC, SETABORTPROC, 0, (LPSTR) lpfnAbortDlgProc, (LPSTR) NULL);

/* Output actual data */
Escape (hPrnDC, STARTDOC, 0, 0, NULL);

for (first page; next page; < last page)
{
Print out page worth of data
Escape (hPrnDC, NEWFRAME, 0, 0, NULL);
}
Escape (hPrnDC, ENDDOC, 0, NULL, NULL);

if (!bUserAbort)
{
EnableWindow (hNetworkWnd, TRUE);
DestroyWindow (hDlgPrint);
}
DeleteDC (hPrnDC);
}


  3 Responses to “Category : Files from Magazines
Archive   : JUN91.ZIP
Filename : 2N06071A

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/