add window proc