Mark Hatsell
2005-06-08 14:41:07 UTC
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 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]