Solved

Using Windows' WinHelp in Java

Posted on 1997-09-03
1
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

732 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