The changes to the Cairo context must be done before wxGC::CreateFromNative() is called, otherwise they will be overwritten