- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using that project for my purpose; I want to go little bit beyond-that is I want to open and edit a file from the list using say wordpad, word etc. What should I add after-
status = GetOpenFileName(ofn)
if (status .eq. 0) then
type *,'No file name specified'
else
! Get length of file_spec by looking for trailing NUL
ilen = INDEX(file_spec,CHAR(0))
type *,'Filespec is ',file_spec(1:ilen-1)
! Example of how to see if user said "Read Only"
!
if (IAND(ofn%flags,OFN_READONLY) /= 0) &
type *,'Readonly was requested'
end if
status = GetOpenFileName(ofn)
if (status .eq. 0) then
type *,'No file name specified'
else
! Get length of file_spec by looking for trailing NUL
ilen = INDEX(file_spec,CHAR(0))
type *,'Filespec is ',file_spec(1:ilen-1)
! Example of how to see if user said "Read Only"
!
if (IAND(ofn%flags,OFN_READONLY) /= 0) &
type *,'Readonly was requested'
end if
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See my Win32 Corner column in Visual Fortran Newsletter Issue 8, which discusses the use of ShellExecute. In your case, use the "edit" action, and it will automatically open the file in the application registered for that file type.
Steve
Steve
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page