C++ Changing HWND Window Procedure in runtime
问题 I'm working in an IDE which creates a hwnd and its respective WndProc LRESULT CALLBACK . I need to change the WndProc to a custom one. I've read that SetWindowLong would do the job but I can't find any working example. For example: HWND hwnd; //My window SetWindowLong(hwnd, GWL_WNDPROC, myNewWndProc); Third parameter for SetWindowLong is a Long as the name of the function names it. How can I make a reference from my WndProc function to a Long ? My WndProc : LRESULT CALLBACK WndProcedure(HWND