#include <memory.h>#include "wresource.h"#include "wcommon.h"Include dependency graph for wprinter.c:

Go to the source code of this file.
Functions | |
| void | PrintRegister (LP_PRINT lpr) |
| LP_PRINT | PrintFind (HDC hdc) |
| void | PrintUnregister (LP_PRINT lpr) |
| EXPORT BOOL CALLBACK | PrintDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) |
| EXPORT BOOL CALLBACK | PrintAbortProc (HDC hdcPrn, int code) |
Variables | |
| static LP_PRINT | prlist = NULL |
| EXPORT BOOL CALLBACK PrintAbortProc | ( | HDC | hdcPrn, | |
| int | code | |||
| ) |
Definition at line 107 of file wprinter.c.
References tagPRINT::bUserAbort, tagPRINT::hDlgPrint, and PrintFind().
Referenced by CopyPrint().
00108 { 00109 MSG msg; 00110 LP_PRINT lpr; 00111 lpr = PrintFind (hdcPrn); 00112 while (!lpr->bUserAbort && PeekMessage (&msg, 0, 0, 0, PM_REMOVE)) 00113 { 00114 if (!lpr->hDlgPrint || !IsDialogMessage (lpr->hDlgPrint, &msg)) 00115 { 00116 TranslateMessage (&msg); 00117 DispatchMessage (&msg); 00118 } 00119 } 00120 return (!lpr->bUserAbort); 00121 }
Here is the call graph for this function:

Here is the caller graph for this function:

| EXPORT BOOL CALLBACK PrintDlgProc | ( | HWND | hDlg, | |
| UINT | message, | |||
| WPARAM | wParam, | |||
| LPARAM | lParam | |||
| ) |
Definition at line 84 of file wprinter.c.
References tagPRINT::bUserAbort, FALSE, tagPRINT::hDlgPrint, and TRUE.
Referenced by CopyPrint().
00085 { 00086 LP_PRINT lpr; 00087 HWND parent; 00088 parent = GetParent (hDlg); 00089 lpr = (LP_PRINT) GetWindowLong (parent, 4); 00090 switch (message) 00091 { 00092 case WM_INITDIALOG: 00093 lpr->hDlgPrint = hDlg; 00094 SetWindowText (hDlg, (LPSTR) lParam); 00095 EnableMenuItem (GetSystemMenu (hDlg, FALSE), SC_CLOSE, MF_GRAYED); 00096 return TRUE; 00097 case WM_COMMAND: 00098 lpr->bUserAbort = TRUE; 00099 lpr->hDlgPrint = 0; 00100 EnableWindow (GetParent (hDlg), TRUE); 00101 EndDialog (hDlg, FALSE); 00102 return TRUE; 00103 } 00104 return FALSE; 00105 }
Here is the caller graph for this function:

| LP_PRINT PrintFind | ( | HDC | hdc | ) |
Definition at line 50 of file wprinter.c.
References prlist.
Referenced by PrintAbortProc().
00051 { 00052 LP_PRINT this; 00053 this = prlist; 00054 while (this && (this->hdcPrn != hdc)) 00055 { 00056 this = this->next; 00057 } 00058 return this; 00059 }
Here is the caller graph for this function:

| void PrintRegister | ( | LP_PRINT | lpr | ) |
Definition at line 42 of file wprinter.c.
References tagPRINT::next, and prlist.
Referenced by CopyPrint().
00043 { 00044 LP_PRINT next; 00045 next = prlist; 00046 prlist = lpr; 00047 lpr->next = next; 00048 }
Here is the caller graph for this function:

| void PrintUnregister | ( | LP_PRINT | lpr | ) |
Definition at line 61 of file wprinter.c.
References tagPRINT::next, NULL, and prlist.
Referenced by CopyPrint().
00062 { 00063 LP_PRINT this, prev; 00064 prev = (LP_PRINT) NULL; 00065 this = prlist; 00066 while (this && (this != lpr)) 00067 { 00068 prev = this; 00069 this = this->next; 00070 } 00071 if (this && (this == lpr)) 00072 { 00073 /* unhook it */ 00074 if (prev) 00075 prev->next = this->next; 00076 else 00077 prlist = this->next; 00078 } 00079 }
Here is the caller graph for this function:

Definition at line 37 of file wprinter.c.
Referenced by PrintFind(), PrintRegister(), and PrintUnregister().
1.5.1