Uses real code instead of macros.
open_with_check is now a real function
FILE_OPEN_DIALOG is now a real function