Hmmm. Jim, I've just been looking back at something and made the change you suggested and now the windows aren't working at all right, they can't be dragged, the buttons don't work and I don't get feedback from the mouse. Should it have been:
if (GetMessage(&msg, fetch_project()->window, 0, 0)<0)
break;
as that appears to get everything working.
EDIT:
Sorry to anyone trying to run that code as it would've just given a blank screen