void Element::ClientPos2ScreenPos(int32_t &riX, int32_t &riY) { // apply all parent offsets Container *pCont = pParent; while (pCont) { pCont->ApplyInvElementOffset(riX, riY); pCont = pCont->GetParent(); } // apply own offset riX += rcBounds.x; riY += rcBounds.y; }