World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Файл WinApiWindow.cpp

См. исходные тексты.

Функции

voidWinApiMsgRouter (HWND hwnd, int msg, int wparam, void *lparam)
 

Функции

◆ WinApiMsgRouter()

void* WinApiMsgRouter ( HWND  hwnd,
int  msg,
int  wparam,
void lparam 
)

См. определение в файле WinApiWindow.cpp строка 193

193  {
194  if (msg == WM_NCCREATE) {
195  CREATESTRUCTA *cs = (CREATESTRUCTA *)(lparam);
196  SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)cs->lpCreateParams);
197  return (void *)DefWindowProcW(hwnd, msg, wparam, (LPARAM)lparam);
198  }
199 
200  auto window = (WinApiWindow *)GetWindowLongPtrW(hwnd, GWLP_USERDATA);
201  if (window) {
202  void *result;
203  if (window->WinApiMessageProc(msg, wparam, lparam, &result))
204  return result;
205  }
206  return (void *)DefWindowProcW(hwnd, msg, (WPARAM)wparam, (LPARAM)lparam);
207 }
result
GLuint64EXT * result
Definition: SDL_opengl_glext.h:9435
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
WinApiWindow
Definition: WinApiWindow.h:9