1. Use
tags when posting code.

2. return GetOpenFileName(&ofn)
Read the manual page, and find out what CommDlgExtendedError is also set to; don't just assume success.

For one thing, you no...