It depends which state you are in. In some states, you are not required to ID yourself to the officer -- and there's some debate about whether or not you should ID under those circumstances. I do so, but understand and partially agree with the reasonings of those who don't. Your life, your call.
When pulled over:
1) Turn on your inside light if it is dark out, so the officer can see your actions as he approaches the car. He won't be as tense and that makes for a more pleasant encounter for both of you.
2) Usually, when you are pulled over, the officer will sit there for a moment or two, watching you, noting down your license, whatever. Use that time to dig out your driver's license and your CPL.
3) After getting out your license, put it on the dashboard and keep your hands on the wheel as the officer approaches.
4) When the officer asks for your driver's license, hand him both pieces of ID, keeping your hands in plain sight and placing them back on the wheel after you hand over the ID. Usually the officer will ask if you are currently armed. Without taking your hands off the wheel, let him know that you are in fact carrying: "Yes, officer, it's on my right hip." (Don't grab at your waistline and say, "Right here!" as you reach for your gun. For some reason they don't like that much.)
5) Follow any instructions the officer gives you regarding the disposition of your weapon. He may want to disarm you and retain control of the weapon, or he may tell you to leave it on your hip. Don't get snippy if he wants to hold onto the weapon for the duration of the stop, because when you are first pulled over he has no idea whether you have an outstanding warrant against you. He won't know that until he runs your ID, and it's reasonable for him to be unhappy about coming back up to your window to tell you he has to arrest you if he knows you are armed. So some officers choose to sidestep that possibility by disarming pullovers at the beginning of the stop.
6) Don't keep a gun in your glove box, and if you DO keep a gun in your glove box don't, don't, don't open that glovebox unless you have told the officer what is in there and gotten his permission and instructions to do so. If there's a gun sitting on top of your vehicle registration and insurance papers, the officer deserves to be warned in advance -- this prevents heart attacks for the LEOs and potential lead poisoning for the citizen.
Usual disclaimers apply: YMMV, FWIW, IANAL.
pax