-
November 12th, 2019, 02:12 AM
#1
How to retrieve the address of the surface of a HWND?
I've got a little Directdraw application, that currently is rendering into the desktop (the listview), but I want to divert it to another window, How can I get the surface address of the HWND?
Code:
DDSURFACEDESC ddsd;
ddsd.lpSurface=???
Currently, it is rendering into the desktop because when I create the Directdraw object, I also create a new surface for it.
When I do
Code:
m_pDDF->CreateDirectDraw(NULL, ::GetDesktopWindow(), DDSDL_NORMAL, NULL, NULL, &m_pDD);
When I swap the application window with my HWND, it still render into the desktop..
thanks
Jack
-
November 12th, 2019, 04:19 AM
#2
Re: How to retrieve the address of the surface of a HWND?
Originally Posted by luckiejacky
...
Currently, it is rendering into the desktop because when I create the Directdraw object, I also create a new surface for it.
When I do
Code:
m_pDDF->CreateDirectDraw(NULL, ::GetDesktopWindow(), DDSDL_NORMAL, NULL, NULL, &m_pDD);
When I swap the application window with my HWND, it still render into the desktop..
Did you try to pass in your HWND handle rather than desktop one?
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|