Visiting the cockpit during a flight is not allowed due to security regulations. From my experience with BA, visits to the flight deck after landing are more likely with flight crews being very welcoming. Pre-flight a crew's priority is getting the plane ready for departure.