|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: Düsseldorf, Germany
|
Posted: Fri Jan 30, 2015 4:19 pm Post subject: |
|
|
Steve,
in my first posting to this topic I meant what Paul described more exactly: Not "greyed" but "read-only". In the Clearwin documentation (clearwin.pdf from Salford times) you find this together with an example on page 41.
Wilfried |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Sat Jan 31, 2015 5:54 am Post subject: |
|
|
Paul,
1) JPG and BMP are OK but GIF or PNG are not. Other types were not checked
2) The code i made in the hurry has some defect: Program crashes when you push esc, no time to investigate why. Just ignore
3) Some additional suggestions: confusing diagnostics.
if you by mistake do not declare hres and vres as integer the compiler gives confusing diagnostics below instead of clearly saying that it expected integers
0024) allocate ( ImageArr(3,hres, vres), stat = kAllocOK)
*** Operand incompatible with opcode
Here is code
Code: |
INTEGER , EXTERNAL :: DropFiles
i=winio@('%ww[no_border]&')
i=winio@('%bg[#cc9999]&')
i=winio@('%si! Drag-n-drop BMP file here %ff %ff&')
i=winio@('%dr&', DropFiles)
i=winio@('%ac[Alt+X]&','exit')
i=winio@(' %ff %cn%tt[OK]')
END PROGRAM
integer function DropFiles()
use clrwin
character*128 filename1
integer*1, dimension(:,:,:), allocatable :: ImageArr
integer hres, vres, colours, ier
filename1 = clearwin_string@ ('DROPPED_FILE')
call get_dib_size@(filename1, hres, vres, nb_colours, ier)
print*,' hres,vres,nb_colours=',hres, vres, nb_colours
kAllocOK=0
allocate ( ImageArr(3,hres, vres), stat = kAllocOK)
if (kAllocOK /= 0) write (*,*) 'Allocation problem #', kAllocOK, hres, vres
call get_dib_block@(filename1,ImageArr,hres, vres,0,0,hres, vres,0,0,ier)
if(ier.ne.0) Print*, 'get Err=',ier
i=winio@('%ww&')
i=winio@('%gr[full_mouse_input,rgb_colours,popup]&',hres,vres)
i=winio@('%ac[Alt+X]&','exit')
i=winio@('%ac[esc]&','set', LWwindow_control,0) ! 'exit')
i=winio@('%lw', LWwindow_control)
call display_dib_block@(0,0,ImageArr,hres,vres,0,0,hres,vres,0,0,ier)
if(ier.ne.0) Print*, 'Display Err=',ier
! deallocate(ImageArr, stat = ios)
! if (ios /= 0) then
! print *, "Was nothing to deallocate"
! end if
DropFiles=2
end function
|
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Sat Jan 31, 2015 5:38 pm Post subject: |
|
|
You need a call to USE_GDIPLUS_IMAGE_FILES@ in order to activate the new feature. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Sun Feb 01, 2015 6:41 pm Post subject: |
|
|
Added two lines
istate=1
istate0= USE_GDIPLUS_IMAGE_FILES@(istate)
got that this function is missing
NO ERRORS, 2 WARNINGS FTN95/Win32 v7.10.0]
WARNING the following symbols are missing:
USE_GDIPLUS_IMAGE_FILES# |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Mon Feb 02, 2015 11:27 am Post subject: |
|
|
My apologies for the omission, you will need
Code: | C_EXTERNAL USE_GDIPLUS_IMAGE_FILES@ '__use_gdiPlusForImageFiles' &
&(VAL):INTEGER*4
|
in your clearwin.ins or as temporary line in your program. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Tue Feb 03, 2015 8:20 am Post subject: |
|
|
Works like charm. And does not crash
ADDITION: inserted that into a bit larger code and it does not work. Same story like with LexicalSort. Devilry. Anyone wants to tell me where error is if i post the whole code? Interesting why this @#$% always happen, specifically when i'm in the hurry and pay a lot of attention to not make any mistakes? Nothing works, even posting of this message took several attempts (forum showed just empty post - does not like my OneDrive link)
Last edited by DanRRight on Wed Feb 04, 2015 11:04 am; edited 2 times in total |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Wed Feb 04, 2015 10:08 am Post subject: |
|
|
I have not looked closely at the logic but maybe you need to call USE_GDIPLUS_IMAGE_FILES@(1) at other points in the program as well.
As a test try putting this in every subprogram. |
|
Back to top |
|
|
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: Düsseldorf, Germany
|
Posted: Sat Feb 07, 2015 1:03 pm Post subject: |
|
|
Paul,
I added the line
Code: | C_EXTERNAL USE_GDIPLUS_IMAGE_FILES@ '__use_gdiPlusForImageFiles'
* (VAL):integer*4 |
in one of my subroutines as you mentioned, but when linking I get the error message "WARNING the following symbols are missing __use_gdiPlusForImageFiles". What is wrong?
Wilfried |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Sat Feb 07, 2015 1:49 pm Post subject: |
|
|
Are you sure that you are still using the salflibc.dll beta version? |
|
Back to top |
|
|
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: Düsseldorf, Germany
|
Posted: Sat Feb 07, 2015 5:04 pm Post subject: |
|
|
Yes, after installing the actual FTN95 version, I copied the latest salflibc.dll (dated from 28th of January) into c:\program files (x86)\silverforst\ftn95. I've just controlled that. Should I copy the DLL also into another path?
The error message didn't result from the line C_EXTERNAL ... but from the call to this function (j = use_gdiplus_...).
Wilfried |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Sat Feb 07, 2015 5:50 pm Post subject: |
|
|
Maybe there is an old copy of salflibc.dll that is getting in the way.
As a test, try copying the beta DLL to the folder that holds the current executable. |
|
Back to top |
|
|
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: Düsseldorf, Germany
|
Posted: Sat Feb 07, 2015 6:03 pm Post subject: |
|
|
It makes no difference... I just scanned my PC for the DLL, I copied the actual one also into the subdirectory ...\redist, but again no difference. I wrote a small test program, same result. I have no idea about the reason.
Wilfried |
|
Back to top |
|
|
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: Düsseldorf, Germany
|
Posted: Sat Feb 07, 2015 6:10 pm Post subject: |
|
|
Paul,
I found the solution. I only copied the DLL but not the LIB... Sorry for the trouble I made
Wilfried |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Sun Feb 08, 2015 10:04 am Post subject: |
|
|
I still make the same mistake from time to time. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|