Archived

This topic is now archived and is closed to further replies.

How to get other thread´s device contexts?

This topic is 6354 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 ...

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites