| 1004 | } |
| 1005 | |
| 1006 | static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
| 1007 | { |
| 1008 | CMpcVideoRenderer* pThis = reinterpret_cast <CMpcVideoRenderer*>(GetWindowLongPtrW(hwnd, 0)); |
| 1009 | if (!pThis) { |
| 1010 | if ((uMsg != WM_NCCREATE) |
| 1011 | || (nullptr == (pThis = (CMpcVideoRenderer*)((LPCREATESTRUCTW)lParam)->lpCreateParams))) { |
| 1012 | return DefWindowProcW(hwnd, uMsg, wParam, lParam); |
| 1013 | } |
| 1014 | |
| 1015 | SetWindowLongPtrW(hwnd, 0, (LONG_PTR)pThis); |
| 1016 | } |
| 1017 | |
| 1018 | return pThis->OnReceiveMessage(hwnd, uMsg, wParam, lParam); |
| 1019 | } |
| 1020 | |
| 1021 | HRESULT CMpcVideoRenderer::Init(const bool bCreateWindow/* = false*/) |
| 1022 | { |
nothing calls this directly
no test coverage detected