Discussion:
Using HH_SET_WIN_TYPE in HTML Help SDK
(too old to reply)
Mark Hatsell
2005-06-08 14:41:07 UTC
Permalink
Hello

I am trying to open a .chm file in a window that has custom styles and is
initially hidden. To do this I am using the HH_SET_WIN_TYPE SDK command to
setup a window type with the relevant properties, before displaying the
topic. However, this command does not seem to work and the topic still pops
up in a normal window that is not initially hidden. My code is given below
and I have also listed the .hhp file used to generate the chm.

Am I misunderstanding how this command works?

Any help appreciated.

Mark


-Code----------------

TCHAR helpwindowtype[] = _T("main");
TCHAR helpfilestring[]= _T("c:\\Enlargement (Default Window).chm>main");

HH_WINTYPE wintype;
ZeroMemory(&wintype, sizeof(HH_WINTYPE));

wintype.cbStruct = sizeof(HH_WINTYPE);
#if defined (_UNICODE)
wintype.fUniCodeStrings = TRUE;
#else
wintype.fUniCodeStrings = FALSE;
#endif
wintype.pszType = helpwindowtype;
wintype.fsValidMembers = HHWIN_PARAM_EXSTYLES | HHWIN_PARAM_PROPERTIES |
HHWIN_PARAM_STYLES | HHWIN_PARAM_SHOWSTATE;
wintype.fsWinProperties = HHWIN_PROP_NODEF_EXSTYLES |
HHWIN_PROP_NODEF_STYLES | HHWIN_PROP_NOTITLEBAR | HHWIN_PROP_NO_TOOLBAR;
wintype.dwExStyles = WS_EX_STATICEDGE;
wintype.dwStyles = WS_CHILD;
wintype.nShowState = SW_HIDE;

HtmlHelp(parenthwnd, helpfilestring, HH_SET_WIN_TYPE, (DWORD)&wintype);

HWND chmhwnd = HtmlHelp(parenthwnd, helpfilestring, HH_DISPLAY_TOPIC, NULL);

-hhp file----------------

[OPTIONS]
Compatibility=1.1 or later
Compiled file=Enlargement (Default Window).chm
Default Window=main
Default topic=Enlargement.htm
Display compile progress=No
Error log file=_errorlog.txt
Full-text search=Yes
Language=0x809 English (United Kingdom)

[WINDOWS]
main="Instructions",,,"Enlargement.htm",,,,,,0x2000,,0x0,,,,,,,,0


[FILES]
Enlargement.htm

[INFOTYPES]
Mark Hatsell
2005-06-11 21:01:26 UTC
Permalink
No-one got any ideas on this one?

Is there a more appropriate newsgroup to ask this in?

Mark
Post by Mark Hatsell
Hello
I am trying to open a .chm file in a window that has custom styles and is
initially hidden. To do this I am using the HH_SET_WIN_TYPE SDK command to
setup a window type with the relevant properties, before displaying the
topic. However, this command does not seem to work and the topic still pops
up in a normal window that is not initially hidden. My code is given below
and I have also listed the .hhp file used to generate the chm.
Am I misunderstanding how this command works?
Any help appreciated.
Mark
-Code----------------
TCHAR helpwindowtype[] = _T("main");
TCHAR helpfilestring[]= _T("c:\\Enlargement (Default Window).chm>main");
HH_WINTYPE wintype;
ZeroMemory(&wintype, sizeof(HH_WINTYPE));
wintype.cbStruct = sizeof(HH_WINTYPE);
#if defined (_UNICODE)
wintype.fUniCodeStrings = TRUE;
#else
wintype.fUniCodeStrings = FALSE;
#endif
wintype.pszType = helpwindowtype;
wintype.fsValidMembers = HHWIN_PARAM_EXSTYLES | HHWIN_PARAM_PROPERTIES |
HHWIN_PARAM_STYLES | HHWIN_PARAM_SHOWSTATE;
wintype.fsWinProperties = HHWIN_PROP_NODEF_EXSTYLES |
HHWIN_PROP_NODEF_STYLES | HHWIN_PROP_NOTITLEBAR | HHWIN_PROP_NO_TOOLBAR;
wintype.dwExStyles = WS_EX_STATICEDGE;
wintype.dwStyles = WS_CHILD;
wintype.nShowState = SW_HIDE;
HtmlHelp(parenthwnd, helpfilestring, HH_SET_WIN_TYPE, (DWORD)&wintype);
HWND chmhwnd = HtmlHelp(parenthwnd, helpfilestring, HH_DISPLAY_TOPIC, NULL);
-hhp file----------------
[OPTIONS]
Compatibility=1.1 or later
Compiled file=Enlargement (Default Window).chm
Default Window=main
Default topic=Enlargement.htm
Display compile progress=No
Error log file=_errorlog.txt
Full-text search=Yes
Language=0x809 English (United Kingdom)
[WINDOWS]
main="Instructions",,,"Enlargement.htm",,,,,,0x2000,,0x0,,,,,,,,0
[FILES]
Enlargement.htm
[INFOTYPES]
Rob Chandler [MVP]
2005-06-14 12:24:22 UTC
Permalink
-- Sorry I though this posted but the NG will only take very small
attachments --
I have Delphi code that works. You could compare
your code with this. See http://helpware.net/xfer/example4.zip
Rob
--
Rob Chandler
MS Help MVP
http://helpware.net/FAR/
http://mshelpwiki.com/
Post by Mark Hatsell
No-one got any ideas on this one?
Is there a more appropriate newsgroup to ask this in?
Mark
Post by Mark Hatsell
Hello
I am trying to open a .chm file in a window that has custom styles and is
initially hidden. To do this I am using the HH_SET_WIN_TYPE SDK command to
setup a window type with the relevant properties, before displaying the
topic. However, this command does not seem to work and the topic still pops
up in a normal window that is not initially hidden. My code is given below
and I have also listed the .hhp file used to generate the chm.
Am I misunderstanding how this command works?
Any help appreciated.
Mark
-Code----------------
TCHAR helpwindowtype[] = _T("main");
TCHAR helpfilestring[]= _T("c:\\Enlargement (Default Window).chm>main");
HH_WINTYPE wintype;
ZeroMemory(&wintype, sizeof(HH_WINTYPE));
wintype.cbStruct = sizeof(HH_WINTYPE);
#if defined (_UNICODE)
wintype.fUniCodeStrings = TRUE;
#else
wintype.fUniCodeStrings = FALSE;
#endif
wintype.pszType = helpwindowtype;
wintype.fsValidMembers = HHWIN_PARAM_EXSTYLES | HHWIN_PARAM_PROPERTIES |
HHWIN_PARAM_STYLES | HHWIN_PARAM_SHOWSTATE;
wintype.fsWinProperties = HHWIN_PROP_NODEF_EXSTYLES |
HHWIN_PROP_NODEF_STYLES | HHWIN_PROP_NOTITLEBAR | HHWIN_PROP_NO_TOOLBAR;
wintype.dwExStyles = WS_EX_STATICEDGE;
wintype.dwStyles = WS_CHILD;
wintype.nShowState = SW_HIDE;
HtmlHelp(parenthwnd, helpfilestring, HH_SET_WIN_TYPE, (DWORD)&wintype);
HWND chmhwnd = HtmlHelp(parenthwnd, helpfilestring, HH_DISPLAY_TOPIC, NULL);
-hhp file----------------
[OPTIONS]
Compatibility=1.1 or later
Compiled file=Enlargement (Default Window).chm
Default Window=main
Default topic=Enlargement.htm
Display compile progress=No
Error log file=_errorlog.txt
Full-text search=Yes
Language=0x809 English (United Kingdom)
[WINDOWS]
main="Instructions",,,"Enlargement.htm",,,,,,0x2000,,0x0,,,,,,,,0
[FILES]
Enlargement.htm
[INFOTYPES]
Mark Hatsell
2005-06-14 17:47:51 UTC
Permalink
Thanks Rob!

Any chance of the help.chm file that is required for the sample and also the
project files used to create it?

Mark
Post by Rob Chandler [MVP]
-- Sorry I though this posted but the NG will only take very small
attachments --
I have Delphi code that works. You could compare
your code with this. See http://helpware.net/xfer/example4.zip
Rob
--
Rob Chandler
MS Help MVP
http://helpware.net/FAR/
http://mshelpwiki.com/
Rob Chandler [MVP]
2005-06-16 13:50:49 UTC
Permalink
http://helpware.net/delphi/index.html

Download all examples from http://groups.yahoo.com/group/DelphiHHKit/files/
Rob
--
Rob Chandler
MS Help MVP
http://helpware.net/FAR/
http://mshelpwiki.com/
Post by Mark Hatsell
Thanks Rob!
Any chance of the help.chm file that is required for the sample and also
the project files used to create it?
Mark
Post by Rob Chandler [MVP]
-- Sorry I though this posted but the NG will only take very small
attachments --
I have Delphi code that works. You could compare
your code with this. See http://helpware.net/xfer/example4.zip
Rob
--
Rob Chandler
MS Help MVP
http://helpware.net/FAR/
http://mshelpwiki.com/
f***@gmail.com
2015-12-11 22:13:39 UTC
Permalink
Post by Mark Hatsell
Hello
I am trying to open a .chm file in a window that has custom styles and is
initially hidden. To do this I am using the HH_SET_WIN_TYPE SDK command to
setup a window type with the relevant properties, before displaying the
topic. However, this command does not seem to work and the topic still pops
up in a normal window that is not initially hidden. My code is given below
and I have also listed the .hhp file used to generate the chm.
Am I misunderstanding how this command works?
Any help appreciated.
Mark
-Code----------------
TCHAR helpwindowtype[] = _T("main");
TCHAR helpfilestring[]= _T("c:\\Enlargement (Default Window).chm>main");
HH_WINTYPE wintype;
ZeroMemory(&wintype, sizeof(HH_WINTYPE));
wintype.cbStruct = sizeof(HH_WINTYPE);
#if defined (_UNICODE)
wintype.fUniCodeStrings = TRUE;
#else
wintype.fUniCodeStrings = FALSE;
#endif
wintype.pszType = helpwindowtype;
wintype.fsValidMembers = HHWIN_PARAM_EXSTYLES | HHWIN_PARAM_PROPERTIES |
HHWIN_PARAM_STYLES | HHWIN_PARAM_SHOWSTATE;
wintype.fsWinProperties = HHWIN_PROP_NODEF_EXSTYLES |
HHWIN_PROP_NODEF_STYLES | HHWIN_PROP_NOTITLEBAR | HHWIN_PROP_NO_TOOLBAR;
wintype.dwExStyles = WS_EX_STATICEDGE;
wintype.dwStyles = WS_CHILD;
wintype.nShowState = SW_HIDE;
HtmlHelp(parenthwnd, helpfilestring, HH_SET_WIN_TYPE, (DWORD)&wintype);
HWND chmhwnd = HtmlHelp(parenthwnd, helpfilestring, HH_DISPLAY_TOPIC, NULL);
-hhp file----------------
[OPTIONS]
Compatibility=1.1 or later
Compiled file=Enlargement (Default Window).chm
Default Window=main
Default topic=Enlargement.htm
Display compile progress=No
Error log file=_errorlog.txt
Full-text search=Yes
Language=0x809 English (United Kingdom)
[WINDOWS]
main="Instructions",,,"Enlargement.htm",,,,,,0x2000,,0x0,,,,,,,,0
[FILES]
Enlargement.htm
[INFOTYPES]
I am having the same issue as you do. Did you find the cause of that? Thank you very much if you can help with it.
Gloops
2015-12-12 23:30:19 UTC
Permalink
Post by Mark Hatsell
Hello
I am trying to open a .chm file in a window that has custom styles and is
initially hidden. To do this I am using the HH_SET_WIN_TYPE SDK command to
setup a window type with the relevant properties, before displaying the
topic. However, this command does not seem to work and the topic still pops
up in a normal window that is not initially hidden. My code is given below
and I have also listed the .hhp file used to generate the chm.
Am I misunderstanding how this command works?
Any help appreciated.
Mark
Hello,

I remember I displayed an external chm file, I did not explore that API
yet except for a pop-up window, what is the advantage to open the file
in a hidden window ?

Loading...