Production of W plus heavy-quark pairs in hadronic collisions