Formation of rafts and other domains in cell membranes is considered as wetting of proteins by lipids. The membrane is modeled as a continuous elastic medium. Thermodynamic functions of the lipid films that wet proteins are calculated using a mean-field theory of liquid crystals as adapted to biomembranes. This approach yields the conditions necessary for a macroscopic wetting film to form; its thickness could also be determined. It is shown that films of macroscopic thicknesses form around large (tens nanometers in diameter) lipid-protein aggregates; only thin adsorption films form around single proteins or small complexes. The means by which wetting films can facilitate the merger of these aggregates is considered. It is shown that a wetting film prevents a protein from leaving an aggregate. Using experimentally derived values of elastic moduli and spontaneous curvatures as well as height mismatch between aggregates and bulk membrane, we obtained numerical results, which can be compared with the experimental data.