Ferromagnetic nanocomposites as spintronic materials with controlled magnetic structure