BUG: ATL Object Wizard: "Ready State" Stock Property Does Not Appear (264458)
The information in this article applies to:
- The Microsoft Active Template Library (ATL) 3.0, when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q264458 SYMPTOMS
When you use the Microsoft Visual C++ 6.0 ATL Object wizard to create a Full control, the Ready State property is not listed on the Stock Properties tab.
RESOLUTION
To manually add the ReadyState property to the control, perform the following steps:
- Add the following code to the interface definition in the control's Interface Definition Language (IDL) file:
interface IMyControl : IDispatch
{
...
[propput, id(DISPID_READYSTATE)]
HRESULT ReadyState([in]long state);
[propget, id(DISPID_READYSTATE)]
HRESULT ReadyState([out, retval]long* pstate);
...
};
- Add the following code to the BEGIN_PROP_MAP definition in the control's header (.h) file:
BEGIN_PROP_MAP(CMyControl)
...
PROP_ENTRY("ReadyState", DISPID_READYSTATE, CLSID_NULL)
...
END_PROP_MAP()
- Add the following member variable to the control class definition in the control's header (.h) file:
LONG m_nReadyState;
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 12/11/2003 |
---|
Keywords: | kbBug kbwizard KB264458 |
---|
|