Jump to content
  • Advertisement

Archived

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

XBTC

How to get other thread´s device contexts?

This topic is 6521 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

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!

Share this post


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

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
Die amis sollen ja auch vom immensen wissen der deutschen profitieren können....

Share this post


Link to post
Share on other sites
Wer sagte, daß wir nicht gut uns verstehen können?

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

..-=gLaDiAtOr=-..

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
Nicht wissen Sie? Alle wir können Deutsches lesen, schreiben und sprechen...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!