  Hot subdwarfs are helium burning objects in late stages of their evolution.
These stars can develop winds driven by light absorption in the lines of
heavier elements. The wind strength depends on chemical composition which can
significantly vary from star to star. We aim to understand the influence of
metallicity on the strength of the winds of the hot hydrogen-rich subdwarfs HD
49798 and BD+18$^\circ\,$2647. We used UV and optical spectra to derive stellar
parameters and abundances. For derived stellar parameters, we predicted wind
structure (including mass-loss rates and terminal velocities) with our METUJE
code. We derived effective temperature $T_\text{eff}=45\,900\,$K and mass
$M=1.46\,M_\odot$ for HD 49798 and $T_\text{eff}=73\,000\,$K and
$M=0.38\,M_\odot$ for BD+18$^\circ\,$2647. The abundances can be interpreted as
a result of interplay between stellar evolution and diffusion. HD 49798 has a
strong wind that does not allow for chemical separation and consequently it
shows solar chemical composition modified by hydrogen burning. On the other
hand, we did not find any wind in BD+18$^\circ\,$2647 and its abundances are
therefore most likely affected by radiative diffusion. Accurate abundances do
not lead to a significant modification of wind mass-loss rate for HD 49798,
because the increase of the contribution of Fe and Ni to the radiative force is
compensated by the decrease of the force due to other elements. The resulting
wind mass-loss rate $\dot M=2.1\times10^{-9}\,M_\odot\,\text{yr}^{-1}$ predicts
an X-ray light curve during the eclipse which closely agrees with observations.
On the other hand, the absence of the wind in BD+18$^\circ\,$2647 for accurate
abundances is a result of its peculiar chemical composition. Wind models with
accurate abundances provide more reliable wind parameters, but the influence of
abundances on the wind parameters is limited in many cases.
