How to get other thread´s device contexts?

Started by
8 comments, last by XBTC 23 years, 9 months ago
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!
Advertisement
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 ...
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!
naja
hehe
2 deutsche die englisch miteinander reden
Die amis sollen ja auch vom immensen wissen der deutschen profitieren können....
Wer sagte, daß wir nicht gut uns verstehen können?

------------------------------------
That's just my 200 bucks!

..-=gLaDiAtOr=-..
Wenn ist das Nunstruck git und Slotermeyer? Ja! ... Beiherhund das Oder die Flipperwaldt gersput!
Gladiator:Wo hast du deutsch gelernt?Es ist schon erstaunlich dass jemand aus Bulgarien deutsch kann.Respekt!

Greets,XBTC!

Edited by - XBTC on July 19, 2000 8:16:36 AM
Nicht wissen Sie? Alle wir können Deutsches lesen, schreiben und sprechen...
hahahahaha

This topic is closed to new replies.

Advertisement