Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CHM File generated with Robohelp: How do I retain the user size and placement of the help window?

Posted on 2007-11-28
6
Medium Priority
?
1,634 Views
Last Modified: 2012-06-21
I have generated a CHM file using RoboHelp for Word 6 build 099. I am able to open the help file from my C# project and I can open with context sensitivity. My problem is that the help window always opens to the original size. That is,  if the user resizes the help window, closes it, and then reopens the help window, it does not retain the user's resizing information.
Is there a setting in RoboHelp (or elsewhere) that will retain the user's resetting of the help file winow size/placement information?
0
Comment
Question by:cupper
[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
  • 3
  • 2
6 Comments
 

Expert Comment

by:Sephrial
ID: 20367905
No, there is no setting in RoboHelp to retain window size placement/size.  For WinHelp projects you can define the window as a percentage of the screen size or with an absolute pixel size.  For HTML Help and other output formats, the placement of the window is determined by the viewer or browser for that file format (clients can use different viewers).  If there is no way for those browsers to pass in the placement and the viewer doesn't retain those settings automatically, you may be out of luck.
0
 

Author Comment

by:cupper
ID: 20367963
Is there something that can be done outside of RoboHelp? I've seen postings on other forums related to a file in the documents and settings directory with the name HH.DAT.  It seems like this file stores information related to the coordinates for the help window. I thought maybe there was a way to set this in Robohelp but if not, I would accept a solution that is external to Robohelp. I know I have used CHM files from software distributors that remember the screen settings.
 
0
 

Expert Comment

by:Sephrial
ID: 20368481
Hum, actually it looks like you CAN set the persistance of the window size using HHW:

Check out Char James-Tanny's HTML Help Workshop tutorial (Customizing the Window Section):
http://frogleg.mvps.org/helptechnologies/htmlhelp/pdfs/char_hhw.zip
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 7

Accepted Solution

by:
help-info earned 2000 total points
ID: 20368570
I'm not using RoboHelp and I'm not quite sure but expecting RoboHelp has such options to store the help window's user settings. So I'd recommend to look deep into all options of RoboHelp.

You are right the settings are saved in the hh.dat file. But you cannot edit this file. You can do that by HTMLHelp Workshop *before* compiling your HTMLHelp (CHM) project. . At the window size and definiton here is a option "Save user defined window position after first use". Look for something like this at RoboHelp.
In a *.hhp file you can edit the window default values (decimal) by a plain text editor like Notepad. For the "save position" option you need to add hex values (see: 0x23520 changed to 0x63520)
example1:
[WINDOWS]
main="Online Help","CHM-example.hhc","CHM-example.hhk","index.htm","index.htm",,,,,0x23520,275,0x1046,[317,243,947,683],0xb0000,,,,,,0
example2:
[WINDOWS]
main="Online Help","CHM-example.hhc","CHM-example.hhk","index.htm","index.htm",,,,,0x63520,275,0x1046,[317,243,947,683],0xb0000,,,,,,0

You maybe intested in following link:
http://www.help-info.de/en/xml/maml_faq.xml#htmlhelp

HTH
Best regards
Ulrich Kulle
Microsoft MVP - Windows Help
***********************************
http://www.help-info.de
***********************************
0
 

Expert Comment

by:Sephrial
ID: 20369088
In conclusion, your best bet is to compile the CHM file with a default value for the window size/position, and check the apply persistence option.

If you did not have access to change the CHM's properties, or they were overridden by the application, than you would want to call the CHM file viewer from an API and attempt to modify the size of the window using the window handle.  The only problem is the viewer may override this by reading from that DAT file for example.  On the page that help-info provided, you see they have a HTML Help API for C++/MFC and they call the HTMLHelp() constructor and pass in a HWND pointer.  So, you may be able to change the size of the window programatically as well.  I don't know if there is a C# equivalent API for HTMLHelp though.
0
 

Author Closing Comment

by:cupper
ID: 31411488
Ulrich,
Thank you. While your answer didn't provide direct information on RoboHelp(I was never able to find a Robohelp equivalent for "Save user defined window position after first use"), I was able to modify the *.hhp file produced by Robohelp as you described. Once that was done, I was able to recompile using HTML Help workshop after I changed the hhp file produced by Robohelp.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

618 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