[windoc] Backport changes from macdoc