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
1,615 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
  • 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 7

Accepted Solution

by:
help-info earned 500 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

777 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