Is there some message which I could use to send a special message which should bear information about HDC handle to external Window? I have application to capture Window and I need to tell to the destination window where is should copy pixels. I tried to ise SC_MINIMIZE but his wParam has different type than HDC.
That is not what I mean. I ask which message can I use? I send messages with function like SendMessage(HWindow, SC_MINIMIZE, 0, 0);
But I need to fill the wparam or lparam with handler (HDC). Problem is that when sending SC_MINIMIZE message, I cannot send SendMessage(HWindow, SC_MINIMIZE, HDC, 0);
because it expects different type. So I need some message which will pass through the WindowProc but will be able to keep the handle....
To answer your question. We found that PrintWindow() with WM_PRINTCLIENT doesn't work. There is not any message WM_PRINTCLIENT recieved by the external app. There is message WM_NCPAINT instead of WM_PRINTCLIENT/WM_PRINT which has wparam = 1 and lparam = 0.
How can I send HDC within message?SendMessage(HWindow, WM_PRINTCLIENT, HDC, 0);
prints error cannot convert parameter 3 from 'HDc' to 'WPARAM'
Or I tryied: 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