cb->getWindow changed to cb->gfxinterface->getWindow()