Solved

Using Windows' WinHelp in Java

Posted on 1997-09-03
1
290 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now