After an application creates a help instance, it must associate the instance with the application window chain by calling WinAssociateHelpInstance. IPF uses the active window handle passed by this call to index into the help table to find the help window that should be displayed for the application window.
An IPF instance can be associated with any application window that has a frame. Once the association of an IPF instance with the application window chain is made, help can be requested for any application window in the chain.
The following shows how a help instance is associated with the application window chain.
/* associate the help instance with the main frame */ if (!WinAssociateHelpInstance (hwndHelpInstance, hwndFrame)) { MessageBox (hwndFrame, IDS_HELPLOADERROR, MB_OK | MB_ERROR, TRUE); return; } /* IPF is successfully initialized; set flag to TRUE */ fHelpEnabled = TRUE;