Do you want it in a dialog or just as internal list for processing. If you want an internal list for processing, you need to set up
If you want a file dialog use CFileDialog (MFC). Set the filter to .txt. There is an equivalent in SDK but I can't remember what it is called.
For internal lists, look up findfirst and findnext or something very similar sounding on MSDN