No, that didn't work either. Here's what I tried:
Code:
//Set the new window process
consoleOldProc = (WNDPROC)SetWindowLongPtr(consoleWindow, GWLP_WNDPROC, (LONG_PTR)ConsoleProc);
//Here's the processes code:
BOOL ConsoleProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_CLOSE:
return TRUE;
break;
default:
CallWindowProc(consoleOldProc,
hWnd,
uMsg,
wParam,
lParam);
return TRUE;
break;
}
return FALSE;
}
///////////////////////////////////////////////////////////////////////////////////////////
Interestingly though, the code for the custom process I wrote never seems to actually get executed...