Context : According to previous investigations , the effect of diffusion in the stellar atmospheres and envelopes of hot white dwarfs and subdwarf B ( sdB ) stars strongly depends on the presence of weak winds with mass-loss rates \dot { M } < 10 ^ { -11 } M _ { \odot } / yr . Aims : As in most of these stars with luminosities L / L _ { \odot } \la 100 , no wind signatures have been detected , the mass-loss rates are unknown . In the present paper mass-loss rates are predicted from the original theory of radiatively driven winds . Methods : The method of solution is modified so that the usual parametrization of the line force multipliers is not necessary . This is important especially for very thin winds . In addition we checked whether a one-component description is justified . As a consequence of various simplifications , the mass-loss rates are expected to be overestimated . Results : Results are presented for effective temperatures in the range 25000 K \leq T _ { eff } \leq 50000 K and for various metallicities between solar and Z / Z _ { \odot } = 0.01 . For ( pre- ) white dwarfs and sdB stars a stellar mass of M _ { * } = 0.5 M _ { \odot } is assumed . For fixed values of T _ { eff } , M _ { * } , and Z , the results predict decreasing mass-loss rates with increasing surface gravity and an increasing dependence of the mass-loss rates on the metallicity . For white dwarfs with \log g > 7.0 no wind solution exists even if the metallicity would be solar . Winds with mass-loss rates around 10 ^ { -11 } to 10 ^ { -10 } M _ { \odot } / yr are predicted for the most luminous sdB stars with surface gravities of \log g \la 5.5 , if the metallicity is not significantly lower than solar . For lower values of \dot { M } metals decouple from hydrogen and helium . Conclusions : If weak winds with \dot { M } \la 10 ^ { -12 } M _ { \odot } / yr exist , the metals can not be coupled to hydrogen and helium . This should lead to additional changes in the surface composition , which have not yet been taken into account in the diffusion calculations with and without mass-loss . A possible scenario is the existence of pure metallic winds with mass-loss rates of \dot { M } \la 10 ^ { -16 } M _ { \odot } / yr and with hydrostatic hydrogen and helium .