Past perfect continuous: hoe?
Bevestigend: had + been + ww + ing
I had been waiting for a long time when she decided to show up.
Vragend: had vooraan in de zin
Had I been waiting for a long time when she decided to show up?
Ontkennend: hadn't been + ww + ing
I hadn't been waiting for a long time when she decided to show up.