I just compiled and viewed a CHM file used in my project. I noticed that the viewer remembers the window size and position across sessions.
Where does the HTML help viewer save the window position for each CHM file?
These settings are stored in a file called HH.DAT. On Windows XP, this file can be found in:
C:\Documents and Settings\%username%\Application Data\Microsoft\HTML Help\hh.dat
Other OS versions put it in different places. There is one such file per user profile. On Windows 10 this file can be found in:
C:\Users\%username%\AppData\Roaming\Microsoft\HTML Help\hh.dat
Looking at the contents of the file, there seems to be a header, a list of help file names, some blank space to accommodate more file names, then some binary values that would most likely be the window size and position. If you're comfortable working with binary file formats, then with some experimentation it should be possible to work out the structure and extract the values for a given CHM file.
Here are some websites that talk about this file:
Adobe Support Community - formerly RoboHelp
talks about hh.dat
lots of history about help file formats, also many utilities to work with CHM files
Help-Info.de - Frequently Asked Questions
info about many help file formats, and examples of how to make use of them from code