Solved

Using Windows' WinHelp in Java

Posted on 1997-09-03
1
293 Views
Last Modified: 2006-11-17
Hello,
I am a new Java programmer wanting to create a Java email application for use ONLY on the Windows platform.  I want to create as part of it a Windows help function using the  WinHelp compiler to create .hlp files.

Question:-
What is the syntax for running a context-sensitive Windows help file from within Java?

I would use the following (apparently) in C:-
WinHelp(hwnd, "c:\myapp\myhelp.hlp", HELP_COMMAND, (DWORD)(LPSTR)"JI(`',`TOPIC_2')")

which loads the indicated Help file and executes the JI() macro to jump to the topic TOPIC_2 within that Help file.

I would much appreciate the Java version of the above.

Thanks,

Trimtrom
0
Comment
Question by:trimtrom
1 Comment
 
LVL 1

Accepted Solution

by:
fadl earned 100 total points
ID: 1226275
Since Java is designed as a platform independent language
and environment, every attempt to e.g.

PlatformA x PlatformB
Win* x Unix

* read directory file lists
new File("c:\documents\joe\") x  new File("/home/joe/doc")
or

* execute program
Runtime.exec("c:\windows\scandisk")   Runtime.vs exec("/bin/rm -rf /tmp/joes")

is a pletform DEPENDENT. So is your problem.

I see the only one solution
Put the C code you mentioned into Java native methods
and do sth like

if( getProperty("os.name").startsWith("Win") {
      // call you native method
      }
else{
      // new BadLuckDialog("Sorry my programs is
      // for Win users only"); {:)
}
Hope it helped
Michal
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This video teaches viewers about errors in exception handling.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question