I suggest you look at GetOpenFileName too, which saves a bit of work.