The information in this article applies to:
SYMPTOMSYou can specify a control's help context ID by selecting the "Help ID" check box from the General tab of the control dialog box in resource editor. If the "Help ID" check box is selected, calling GetWindowContextHelpId() at runtime retrieves the help context identifier associated with the control. This works for all standard controls, such as edit controls, button controls, etc. However, for ActiveX controls, such as TestHelp controls, Circ3 controls, and so forth, 0 is returned. CAUSEMFC fails to associate a help context id for ActiveX controls even though the "Help ID" check box is selected. RESOLUTIONWhen you call SetWindowContextHelpId() on the control with the correct ID, it sets the Help ID for the control. OnInitDialog is a good place to do this. For form views, OnInitialUpdate would be the best place to set the help ID. The sample code below shows a way to set and retrieve the help context ID of an ActiveX control (TestHelp control) in a CDialog-derived class. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. REFERENCESSample Code
(c) Microsoft Corporation 1997, All Rights Reserved.
Contributions by Yeong-Kah Tam, Microsoft Corporation
Additional query words:
Keywords : kbMFC kbVC420bug kbVC500bug kbVC600bug MfcActiveX |
Last Reviewed: July 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |