Page 1 of 1

How to pass HDC within Message?

Posted: 12 May 2014, 08:35
by brandonhotkey
How can I send HDC within message?

Code: Select all

SendMessage(HWindow, WM_PRINTCLIENT, HDC, 0);
prints error cannot convert parameter 3 from 'HDC' to 'WPARAM' (C++)

Or I tryied:

Code: Select all

SendMessage(HCapture, WM_COMMAND, 0, HDc);
and recieved error:
C2664: 'SendMessageW' : cannot convert parameter 4 from 'HDC' to 'LPARAM'
There is no context in which this conversion is possible

Re: How to pass HDC within Message?

Posted: 12 May 2014, 08:50
by HotKeyIt
SendMessage(HWindow, WM_PRINTCLIENT, (WPARAM)HDC, 0);