9#if !defined(OWL_HLPMANAG_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
44 operator NMHDR&() {
return hdr; }
56 ZeroMemory(
this,
sizeof(HH_AKLINK));
57 cbStruct =
sizeof(HH_AKLINK);
65 ZeroMemory(
this,
sizeof(HH_ENUM_IT));
66 cbStruct =
sizeof(HH_ENUM_IT);
74 ZeroMemory(
this,
sizeof(HH_SET_INFOTYPE));
75 cbStruct =
sizeof(HH_SET_INFOTYPE);
83 ZeroMemory(
this,
sizeof(HH_FTS_QUERY));
84 cbStruct =
sizeof(HH_FTS_QUERY);
92 ZeroMemory(
this,
sizeof(HH_WINTYPE));
93 cbStruct =
sizeof(HH_WINTYPE);
95 void SetStyle(
int style);
96 void SetProperties(
int prop);
97 void SetToolBarFlags(
int flags);
98 void SetWindowsPos(
const TRect& rect);
105 operator NMHDR&() {
return hdr; }
136 int HelpFileContextId;
138 int ControlContextId;
176 void EvHelp(
const HELPINFO&);
188 {
return HtmlHelp(w, helpFile.c_str(), hlpCmd, data);}
222 TModuleProc4<HWND,HWND,LPCTSTR,uint,DWORD_PTR>
HtmlHelp;
229#if defined(_OWLDLL) || defined(BI_APP_DLL)
243#define DECLARE_HELPCONTEXT(cls) \
244 static THelpContext __hcEntries[]
246#define DEFINE_HELPCONTEXT(cls)\
247 THelpContext cls::__hcEntries[] = {
249#define END_HELPCONTEXT \
250 THelpContext(0, 0, 0, 0) \
253#define HCENTRY_MENU(hcId, menuId) \
254 THelpContext(0, hcId, menuId, 0)
256#define HCENTRY_CONTROL(hcId, ctlId) \
257 THelpContext(0, hcId, 0, ctlId)
259#define HCENTRY_MENU_AND_CONTROL(hcId, menuId, ctlId) \
260 THelpContext(0, hcId, menuId, ctlId)
262#define SETUP_HELPCONTEXT(appCls, cls) \
264 appCls* app = TYPESAFE_DOWNCAST(GetApplication(), appCls); \
266 for (THelpContext* hc = &__hcEntries[0]; !IsLastIndirectContext(*hc); hc++) { \
267 app->AddContextInfo(this, \
268 hc->GetHelpFileContextId(), \
269 hc->GetMenuContextId(), \
270 hc->GetControlContextId()); \
275#define CLEANUP_HELPCONTEXT(appCls, cls) \
277 appCls* app = TYPESAFE_DOWNCAST(GetApplication(), appCls); \
279 app->RemoveContextInfo(this); \
339 return HelpFileContextId;
348 return MenuContextId;
357 return ControlContextId;
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
TCursor, derived from TGdiBase, represents the GDI cursor object class.
TDllLoader<> provides an easy way to load one instance of a DLL on demand.
TEventHandler is a base class from which you can derive classes that handle messages.
THelpContext is a class that maintains information about a menu item id and a child control id with a...
void SetWindow(TWindow *window)
Sets the window for this context entry.
THelpContext()
Default constructor that initializes every data member to zero.
int GetHelpFileContextId() const
Returns the help file context id for the context entry.
int GetControlContextId() const
Returns the child control id for this context entry.
TWindow * GetWindow() const
Returns the window this entry is associated with.
int GetMenuContextId() const
Returns the menu id for this context entry.
DECLARE_RESPONSE_TABLE(THelpFileManager)
virtual bool ProcessHelpMsg(MSG &msg)
HWND HtmlHelp(TWindow *, LPCTSTR lpszHelp, uint hlpCmd, DWORD_PTR data)
TBaseList< THelpContext > TContextList
void TranslateWinToHTML(bool translate)
void RemoveContextInfo(TWindow *)
Removes all the entries in the context table for the window.
void EvHelp(const HELPINFO &)
Event handler for the WM_HELP message.
void EvHelpHit(const THelpHitInfo &)
void AddContextInfo(TWindow *, int helpId, int menuId, int controlId)
Adds an entry into the global context table.
virtual void SetHelpCursor()
TBaseListIterator< THelpContext > TContextListIterator
THelpFileManager(const tstring &helpFileName)
Constructor.
bool GetHelpContextFromMenu(THelpContext &, int menuId) const
Returns true if a match for the menu item ID was found.
virtual void DeactivateHelp()
Deactivates the help.
tstring GetHelpFile() const
Returns the name of the help file.
virtual void ActivateHelp(TWindow *, int helpFileContextId, uint hlpCmd=HELP_CONTEXT)
Called by EvHelp() to activate the help file with the help context ID.
TContextList * ContextTable
void SetHelpFile(const tstring &helpFileName)
Changes the name of the help file.
void CeContextHelp(TCommandEnabler &ce)
bool GetHelpContextFromControl(THelpContext &, int controlId, HWND ctrl) const
Returns true if a match for the control ID was found.
HWND HtmlHelp(TWindow *w, const tstring &helpFile, uint hlpCmd, DWORD_PTR data)
TModuleProc4< HWND, HWND, LPCTSTR, uint, DWORD_PTR > HtmlHelp
TModuleProc0< HRESULT > DllCanUnloadNow
TModuleProc3< HRESULT, REFCLSID, REFIID, void ** > DllGetClassObject
TPoint is a support class, derived from tagPOINT.
TRect is a mathematical class derived from tagRect.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
TModule(const tstring &name, bool shouldLoad=true, bool mustLoad=true, bool addToList=true)
Constructs a TModule object that is used as an alias for a DLL.
Object Windows Library (OWLNext Core).
TDllLoader< THtmlHelpDll > THtmlHelp
Loader for the HHCTRL.OCX.
bool IsLastIndirectContext(const THelpContext &context)
Return true if this entry is the last entry.
bool IsIndirectHelpContext(const THelpContext &context)
Return true if the context entry is a pointer to another table.
THelpHitInfo(const TPoint &pt, TWindow *wnd)
THelpHitInfo(int x, int y, TWindow *wnd)
Base window class TWindow definition, including HWND encapsulation.