|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Bartl
Joined: 16 Oct 2009 Posts: 58 Location: M�nchen
|
Posted: Mon May 23, 2011 1:07 pm Post subject: display a .jpg file |
|
|
Hallo, who can help me,
the program stop with "control is too big for window" in line ...%im....
test.jpg is a simple .jpg file with 770 KB(one page).
Is there a better possibility to display a help-file with F1?
Thank you for your help.
Johann
Code: |
winapp 0,0
program jpg
include<windows.ins>
integer*4 i
external help
i=winio@('%ca[jpg]&')
i=winio@('display a jpg file as help with F1 key&')
i=winio@('%ac[F1]',help)
stop
end
integer*4 function help()
include <windows.ins>
integer*4 i
i=winio@('%im[myimage]')
help=1
end
resources
myimage IMAGE test.jpg
|
|
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2390 Location: Yateley, Hants, UK
|
Posted: Mon May 23, 2011 3:09 pm Post subject: |
|
|
Hi Bartl,
There is always a better way!
You can create a hypertext help file, and compile it into a file of type .chm (Compiled Hypertext Markup). All windows systems contain the hypertext help display program, HH.EXE. Once you have your CHM file (say BARTL.CHM), you launch it with:
START_PPROCESS@('HH.EXE', 'BARTL.CHM')
You don't need to bother about the path to HH.EXE, because it resides in the standard windows directory.
Most of the compilation into CHM is done by standard downloadable Microsoft programs, but they are ugly and unhelpful in their raw form. There are several free, and many commercial, front-ends to this process. I use a free one called HelpMaker, although the originator (Vizacc) seems to have withdrawn it recently. You would need to find one that you liked. HelpMaker has its issues.
I haven't mastered the options which permit you to launch the CHM file "open at the right page". This is possible, but not by me, and involves adding some extra parameters into the character string of the second parameter to START_PPROCESS@.
You could always use HTML ... although when I tried to go down this route, I didn't much like the result. FTN95/Clearwin does have some facilities which relate to the previous Microsoft standard for help files (.HLP) - but then you are developing old technology.
The time that HH.EXE takes to load is appreciable, but then you do get a searchable hypertext system with links to other topics. You can always pop up a standard modal window with an OK close button, several lines of text and small illustrations done as bitmaps.
Regards
Eddie |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Mon May 23, 2011 9:34 pm Post subject: |
|
|
program works fine.
As to the Help you can use FTN95 own HTML parser, though when i was using it more then 10 year ago it was a bit primitive. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Tue May 24, 2011 7:55 am Post subject: |
|
|
Without detracting from the replies above, if a control is too big for the screen then it needs scroll bars or be displayed in part. ClearWin+ does not automatically provide scroll bars in this context and assumes you want to see the whole.
There may be a direct ClearWin+ solution to the problem (%gr maybe) but, as has been noted above, there are other ways of producing help files. |
|
Back to top |
|
|
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: D�sseldorf, Germany
|
Posted: Thu May 26, 2011 1:20 pm Post subject: |
|
|
A very simple way to display a jpg image is to use
imagefile = 'c:\...\test.jpg'
call USE_URL@(imagefile)
Regards - Wilfried |
|
Back to top |
|
|
Bartl
Joined: 16 Oct 2009 Posts: 58 Location: M�nchen
|
Posted: Fri May 27, 2011 9:35 am Post subject: |
|
|
Hi,
thank you very much for your help,
the solution with %im� and USE_URL now works fine.
I am also very interested in the solution with hypertext help but have no time in the moment to try it, a first test has failed.
Have someone a simple example?
Johann |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2390 Location: Yateley, Hants, UK
|
Posted: Fri May 27, 2011 10:01 pm Post subject: |
|
|
Johann,
Your PC Windows folders will have plenty of CHM files. Copy one of them into your working directory, and you can then start it with HH.EXE from the command prompt. You should be able to start it using START_PPROCESS@ as well. The big problem is getting the path to the chm file right. Here is my routine, which is a callback for a HELP menu item:
Code: | INTEGER FUNCTION IHELPSYS()
C --------------------------
CHARACTER*(256) PNAME
INCLUDE <WINDOWS.INS>
C -----------------------------------------------------------------
IHELPSYS = 1
CALL GET_PROGRAM_NAME@ (PNAME)
CALL UPCASE@ (PNAME)
N = LEN_TRIM (PNAME)
IF (PNAME (N-5:N) .EQ. 'XX.EXE') THEN
N = N - 6 ! Assumes XX.EXE
CALL START_PPROCESS@('HH.EXE',PNAME(1:N)//'XXHelp.chm')
ELSE
DO 10 I=1,N
J = N + 1 - I
IF (PNAME(J:J) .EQ. '\') GO TO 20
10 CONTINUE
RETURN
20 CALL START_PPROCESS@('HH.EXE',PNAME(1:J)//'XXHelp.chm')
ENDIF
END |
Not elegant, not foolproof - but finds the CHM file in the folder where the program XX.EXE was installed. Maybe, (and I can't remember) it even finds the path if the program file was renamed!
Now the problem is to create your own CHM. I tracked down Vizacc HelpMaker to www.softpedia.com where it is still available for download. After downloading and installing it, you need to create a project, and compile it. This application can create other help formats as well, but CHM is the one you want. How sophisticated you get with cross references (hyperlinks), keywords, colours, images, fonts etc is up to you.
In principle, you can open this helpfile at any topic you choose, but I have never persevered long enough to find out how.
My routine above assumes that you have installed your application somewhere like C:\Program Files\XX. Installation (or Setup) is an important part of giving your application a professional feel. I also use a freeware program for this called Innosetup (Jordan Russell software), and this puts my CHM files into the same folder as my EXE.
If you want me to send you any example files etc, send me a private message with where to send it...
Eddie |
|
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
|