-2

i have simple video player.

https://github.com/sailfish009/sample_video

now i want to port it to windows template library 9.1.

Edit: solved, CWindowImpl's handler compatible with CWnd's.

//screen = SDL_CreateWindowFrom(this->m_hWnd); //HWND from CWnd previous working code
screen = SDL_CreateWindowFrom(m_hWndClient);   //HWND from CWindowImpl
sailfish009
  • 2,561
  • 1
  • 24
  • 31

1 Answers1

2

The question is asked incorrectly. You don't look for compatibility, you just look for a way to access HWND window handle.

No, the classes are not compatible and more to that they are different conceptually. In ATL/WTL CWindowImpl is a class that implements a window procedure. Such procedure is typically a static function, and the helper class does the job of "attaching" it to C++ class, connects it to specific thin window wrapper such as CWindow, offers easy way to connect message handlers etc. m_hWndClient is not even a member of CWindowImpl and belongs to WTL frame window related classes.

Roman R.
  • 68,205
  • 6
  • 94
  • 158