How to get other thread´s device contexts?
Is it possible?I need to get the DC of another thread´s window under win32 how do I do it?
Thanx in advance,XBTC!
hmm
i think a thread doesnt "have" a device context ....
but the window of a thread does have one ... if u can get the hwnd or the name of the window, that the thread created ... u can get the dc ...
if u know the name of the window u can use FindWindow to get the Hwnd ...
HWND FindWindow(
LPCTSTR lpClassName, // class name
LPCTSTR lpWindowName // window name
);
then use getDC
HDC GetDC(
HWND hWnd // handle to window
);
i hope that helps ...
i think a thread doesnt "have" a device context ....
but the window of a thread does have one ... if u can get the hwnd or the name of the window, that the thread created ... u can get the dc ...
if u know the name of the window u can use FindWindow to get the Hwnd ...
HWND FindWindow(
LPCTSTR lpClassName, // class name
LPCTSTR lpWindowName // window name
);
then use getDC
HDC GetDC(
HWND hWnd // handle to window
);
i hope that helps ...
Thanx for replying!
"hmm i think a thread doesnt "have" a device context ....
but the window of a thread does have one ..."
Look at my post exactly and you´ll see that I wrote exactly what you say....
Anyway I think the FindWindow thing looks good for me.
Thanx!
Greets,XBTC!
"hmm i think a thread doesnt "have" a device context ....
but the window of a thread does have one ..."
Look at my post exactly and you´ll see that I wrote exactly what you say....
Anyway I think the FindWindow thing looks good for me.
Thanx!
Greets,XBTC!
Wer sagte, daß wir nicht gut uns verstehen können?
------------------------------------
That's just my 200 bucks!
..-=gLaDiAtOr=-..
------------------------------------
That's just my 200 bucks!
..-=gLaDiAtOr=-..
Wenn ist das Nunstruck git und Slotermeyer? Ja! ... Beiherhund das Oder die Flipperwaldt gersput!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement