thanks ken, that works, but when i tried to make it a bit more efficient, i ran into some trouble.
observe: (by the way, i allocated an extra byte to the window memory)
clearly, i'm trying to make it so i only ever have to retrieve a pointer once during the function. but the line:
LRESULT CALLBACK cBen::cBenProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
causes one of those annoying access violations.
If im not mistaken, the pointer i retrieved points to somewhere i shouldn't be changing. however, it works fine when the pointer is retrieved within the WM_CLOSE message capture, and the code has not been modified, just moved. so what is going on?
First-chance exception in class.exe: 0xC0000005: Access Violation.
damn i hate this static crap! if only the wndproc could avoid being static, then it would be easy. are you sure it has to be so difficult?