Click here to Skip to main content
15,914,488 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPS - sorry, here's the link to that other post... Pin
AnotherProgrammer26-May-04 6:29
AnotherProgrammer26-May-04 6:29 
GeneralNetwork Order cponversion Pin
Stan the man26-May-04 6:17
Stan the man26-May-04 6:17 
GeneralRe: Network Order cponversion Pin
Ryan Binns26-May-04 19:05
Ryan Binns26-May-04 19:05 
GeneralGrabbing standard out to a pipe Pin
Anonymous26-May-04 5:57
Anonymous26-May-04 5:57 
GeneralRe: Grabbing standard out to a pipe Pin
Antti Keskinen26-May-04 11:46
Antti Keskinen26-May-04 11:46 
Generalwaiting for something to finished Pin
pnpfriend26-May-04 5:47
pnpfriend26-May-04 5:47 
GeneralRe: waiting for something to finished Pin
valikac26-May-04 13:22
valikac26-May-04 13:22 
GeneralRe: waiting for something to finished Pin
pnpfriend27-May-04 8:50
pnpfriend27-May-04 8:50 
Ok. Here what I want.
I have to print the files (sending to the printer).
I want to send next file after the current file is finished printing.

To do so, I can catch the messages that sent from printer (the printer that can send the messages to application) and respond differently to different messages like
. record the time of the file starts printing when application recieves STARTDOC message,
. record the time of the file finished printing, number of pages printed, and print the next one when application recieves ENDDOC message.

How to recieve the messages from printer.
The printer sends the messages like window messages to the application.
I used RegisterWindowMessage() and add ON_REGISTER_MESSAGE(printermsg,OnPrinterMessage) in the MESSAGE_MAP. I have no problem getting messages from printer.

Here the prolem comes,
My application has the button called "PRINT" and "STOP".
When user click on PRINT all the files get printed one after another. but it stop printing immediately when STOP button get hits.
So what should I do to look at printer messages to print one file after another, and at the same time, whatching if the STOP button get hited to stop printing immediately.

Thank you.
GeneralListView: XP - 2000 CPU usage Pin
Dan Hill26-May-04 5:35
Dan Hill26-May-04 5:35 
GeneralRe: ListView: XP - 2000 CPU usage Pin
Ryan Binns26-May-04 19:08
Ryan Binns26-May-04 19:08 
GeneralOCCMGR.CPP Assertion Error Line 410 Pin
sweep12326-May-04 5:13
sweep12326-May-04 5:13 
GeneralRe: OCCMGR.CPP Assertion Error Line 410 Pin
jmkhael26-May-04 5:28
jmkhael26-May-04 5:28 
GeneralRe: OCCMGR.CPP Assertion Error Line 410 Pin
sweep12326-May-04 5:40
sweep12326-May-04 5:40 
GeneralRe: OCCMGR.CPP Assertion Error Line 410 Pin
jmkhael26-May-04 5:42
jmkhael26-May-04 5:42 
GeneralRe: OCCMGR.CPP Assertion Error Line 410 Pin
sweep12326-May-04 5:48
sweep12326-May-04 5:48 
GeneralRe: OCCMGR.CPP Assertion Error Line 410 Pin
jmkhael26-May-04 5:57
jmkhael26-May-04 5:57 
GeneralRe: OCCMGR.CPP Assertion Error Line 410 Pin
sweep12326-May-04 6:09
sweep12326-May-04 6:09 
GeneralRe: OCCMGR.CPP Assertion Error Line 410 Pin
sweep12326-May-04 6:20
sweep12326-May-04 6:20 
GeneralRe: OCCMGR.CPP Assertion Error Line 410 Pin
jmkhael26-May-04 7:05
jmkhael26-May-04 7:05 
GeneralRe: OCCMGR.CPP Assertion Error Line 410 Pin
sweep12326-May-04 21:29
sweep12326-May-04 21:29 
GeneralDynamic compilation in c/c++ Pin
mooze26-May-04 4:48
mooze26-May-04 4:48 
GeneralRe: Dynamic compilation in c/c++ Pin
Navin26-May-04 6:42
Navin26-May-04 6:42 
GeneralRe: Dynamic compilation in c/c++ Pin
mooze26-May-04 20:57
mooze26-May-04 20:57 
GeneralUsing a DLL Pin
monrobot1326-May-04 4:47
monrobot1326-May-04 4:47 
GeneralRe: Using a DLL Pin
Diddy26-May-04 5:51
Diddy26-May-04 5:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.