Adding popup event handler on windows