if (!GetMessage(&msg, NULL, 0, 0))
 return msg.wParam;

if(msg.message == WM_QUIT)
 break;

どう違うんですか?