The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Farabi on June 16, 2009, 11:41:57 AM

Title: WM_PRINT does not work
Post by: Farabi on June 16, 2009, 11:41:57 AM
Anyone know why WM_PRINT does not work on my app?
I used it like this


invoke SendMessage,hEdit,WM_PRINT,main_screen.DC, PRF_CLIENT or PRF_ERASEBKGND
; hEdit is RichEdit Handle

[attachment deleted by admin]
Title: Re: WM_PRINT does not work
Post by: PBrennick on June 17, 2009, 05:11:12 AM
Your DC is set to be the screen and not the printer which means it 'may' be working just fine, how would you know otherwise? If you wish to send output to the printer you need to do so by setting the DC correctly. Not happening in that code sample.

Paul
Title: Re: WM_PRINT does not work
Post by: Farabi on June 18, 2009, 03:13:41 AM
Quote from: PBrennick on June 17, 2009, 05:11:12 AM
Your DC is set to be the screen and not the printer which means it 'may' be working just fine, how would you know otherwise? If you wish to send output to the printer you need to do so by setting the DC correctly. Not happening in that code sample.

Paul


No Im not gonna use the printer, Im just want to print the RichEdit content to the main screen.