Solved

Using Windows' WinHelp in Java

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groovy example issue 10 89
recursion example 16 111
Java Timer (static) 9 36
stackato and cloud 4 68
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

911 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

16 Experts available now in Live!

Get 1:1 Help Now