forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Beta release of ClearWin+
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Fri Jan 30, 2015 4:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Sat Jan 31, 2015 5:54 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sat Jan 31, 2015 5:38 pm    Post subject: Reply with quote

You need a call to USE_GDIPLUS_IMAGE_FILES@ in order to activate the new feature.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Sun Feb 01, 2015 6:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Feb 02, 2015 11:27 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Tue Feb 03, 2015 8:20 am    Post subject: Reply with quote

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
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Wed Feb 04, 2015 12:06 am    Post subject: Reply with quote

Here is the link, use it all including by some reason not highlighted end: https://onedrive.live.com/?cid=51A5F9B536E1368D&id=51A5F9B536E1368D!105
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Feb 04, 2015 10:08 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Sat Feb 07, 2015 1:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sat Feb 07, 2015 1:49 pm    Post subject: Reply with quote

Are you sure that you are still using the salflibc.dll beta version?
Back to top
View user's profile Send private message AIM Address
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Sat Feb 07, 2015 5:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sat Feb 07, 2015 5:50 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Sat Feb 07, 2015 6:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Sat Feb 07, 2015 6:10 pm    Post subject: Reply with quote

Paul,

I found the solution. I only copied the DLL but not the LIB... Sorry for the trouble I made Embarassed

Wilfried
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sun Feb 08, 2015 10:04 am    Post subject: Reply with quote

I still make the same mistake from time to time.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
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