Because the fixed rows may have a hierarchical structure, they can not be determined only by their absolute number (they can be collapsed or filtered). So, the grid has two contexts: fixed and scrollable. The frozen rows belong to fixed context.
Dapfor::GUI::HITEM hItem = m_Grid.GetItem(0);
m_Grid.Detach(hItem);
m_Grid.Attach(hItem, Dapfor::GUI::GI_FIXED_ROOT);
m_Grid.MoveAfter(hItem, Dapfor::GUI::GI_FIXED_ROOT, Dapfor::GUI::GI_LAST);