Getting HWND from Surface for experimentation

--------------C5862F42CF3876F3F668B980
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Quick question:

Is there a way to extract the HWND structure from a DIB or DirectX
surface?

I know this is non-portable, but I’d like to do some experimentation and
need the windows handle.

Ciao
Andreas–
| Andreas Schiffler aschiffler at home.com |
| 4707 Eastwood Cres., Niagara Falls, Ont L2E 1B4, Canada |
| +1-905-371-3652 (private) - +1-905-371-8834 (work/fax) |

--------------C5862F42CF3876F3F668B980
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public “-//w3c//dtd html 4.0 transitional//en”>

Quick question:

Is there a way to extract the HWND structure from a DIB or DirectX surface?

I know this is non-portable, but I'd like to do some experimentation and need the windows handle.

Ciao
Andreas

-- 
|  Andreas Schiffler                    aschiffler at home.com  |
|  4707 Eastwood Cres., Niagara Falls, Ont  L2E 1B4, Canada  |
|  +1-905-371-3652 (private)  -  +1-905-371-8834 (work/fax)  |
 

--------------C5862F42CF3876F3F668B980–

er… neither HAS an hwnd, but this is the SDL list and you can get SDL’s
hwnd with:

#ifdef WIN32
#include <windows.h>
#include “SDL_syswm.h”
#endif

void* SWinDC::GetHwnd()
{
#ifdef WIN32

     SDL_SysWMinfo wmi;
     SDL_VERSION(&wmi.version);

     if(!SDL_GetWMInfo(&wmi)) return NULL;

     return wmi.window;

#else

     return NULL;

#endif
}

At 11:12 AM 12/20/2000 -0800, you wrote:>--------------C5862F42CF3876F3F668B980

Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Quick question:

Is there a way to extract the HWND structure from a DIB or DirectX
surface?

I know this is non-portable, but I’d like to do some experimentation and
need the windows handle.

Ciao
Andreas


| Andreas Schiffler aschiffler at home.com |
| 4707 Eastwood Cres., Niagara Falls, Ont L2E 1B4, Canada |
| +1-905-371-3652 (private) - +1-905-371-8834 (work/fax) |

--------------C5862F42CF3876F3F668B980
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public “-//w3c//dtd html 4.0 transitional//en”>
Quick question:

Is there a way to extract the HWND structure from a DIB or DirectX surface?

I know this is non-portable, but I’d like to do some experimentation and
need the windows handle.

Ciao
Andreas

| Andreas Schiffler aschiffler at home.com |
| 4707 Eastwood Cres., Niagara Falls, Ont L2E 1B4, Canada |
| +1-905-371-3652 (private) - +1-905-371-8834 (work/fax) |
--------------C5862F42CF3876F3F668B980–

Manny wrote:

er… neither HAS an hwnd, but this is the SDL list and you can get SDL’s
hwnd with:

#ifdef WIN32
#include <windows.h>
#include “SDL_syswm.h”
#endif

void* SWinDC::GetHwnd()
{
#ifdef WIN32

     SDL_SysWMinfo wmi;
     SDL_VERSION(&wmi.version);

     if(!SDL_GetWMInfo(&wmi)) return NULL;

     return wmi.window;

#else

     return NULL;

#endif
}

Thanks that works well!–
| Andreas Schiffler aschiffler at home.com |
| Senior Systems Engineer - Deskplayer Inc., Buffalo |
| 4707 Eastwood Cres., Niagara Falls, Ont L2E 1B4, Canada |
| +1-905-371-3652 (private) - +1-905-371-8834 (work/fax) |