Jump to content
  • Advertisement
Sign in to follow this  
Love3DGraphiks

How to Draw to Another Windows

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

I Wrote a DLL used for Hooking Mouse And when never the Mouse Button is Clicked, the Hook Func will sent program A message(WM_MOUSEHOOK define as WM_USER+6) and the handle of window under the Mouse Cursor So when never I catch the Message WM_MOUSEHOOK I unhook FUnction and I get Handle DC from function GetDC(Handle of Windows Under Cursor) then I SetPixelFormat for that Handle DC ,then use hRGL=wglCreateContext(Handle DC) then wglMakeCurrent(Handle DC,hRGL); then I GetClientRect(handle of windows Under Cursor,lpRect); then I glViewport(0,0,lpRect->right,lpRect->bottom); Ok so when Never I draw and then SwapBuffer(Handle DC); it must Draw on Window that It catched the Handle But Acctually It aint work So can u help me please Thanks

Share this post


Link to post
Share on other sites
Advertisement
did you try checking for errors during those calls you described? I bet one of them failed somewhere along the line...

Share this post


Link to post
Share on other sites
Quote:
Original post by zppz
did you try checking for errors during those calls you described? I bet one of them failed somewhere along the line...


If I do it with the Handle of Window is running then it OK nothing wrong
but if I set GL context for foreign Windows that I get its Handle Device Context ,it aint work
Maybe we cant not draw sumthing in foreign windows with OPENGL excep using GDI
,I use GDI then it work fine

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!