aint there examples in the work folder? i think so.
look at D3DSample02.c