The family of schoolgirl killed by a teenager known to her has successfully fought for an inquest to examine the circumstances leading up to her death.