Element OSDialog Vars Self#.OFN OPENFILENAME Destroy OPENFILENAME.Clear Self PointWork doExecute0 \local fn,dir,ok ReadStr fn,data,data.type,Self#.FileName,Self#.prop.FileName mov_ex eax,fn lea edx,[Self#.OFN.lpstrFile] cmp eax,empty_string je @f call __strdup @@: mov eax,[Self#.OFN.nMaxFile] call __strsetlength ReadStr dir,data,data.type,Self#.StartDir,Self#.prop.StartDir mov_ex eax,dir cmp eax,empty_string je @f lea edx,[Self#.OFN.lpstrInitialDir] call __strdup @@: lea eax,[Self#.OFN] invoke ClassName#.Dialog,eax or eax,eax if Self#.onCancel.use eq 1 jne ok Self#.onCancel 0,data_null,exit jmp exit ok: else je exit end if mov eax,[Self#.OFN.lpstrFile] Self#.onExecute eax,data_str,exit EndPoint PointWork doExecute1 EndPoint EndElement