PRB: Cannot Change Tabs In Dynamically Created SysTabControl OCX (246044)
The information in this article applies to:
- Microsoft Visual Studio, Enterprise Edition 6.0
- Microsoft Visual Studio 97
This article was previously published under Q246044 SYMPTOMS
Unable to change tabs in a Microsoft Tabbed Dialog Control if the control is added dynamically.
CAUSE
The control does not know that it is loaded.
RESOLUTION
Add the following code after the creation of the control:
// Assume pMSTabCtl is a pointer to an instance of a CSSTabCtl object
LPUNKNOWN pUnk = pMSTabCtl->GetControlUnknown();
LPOLECONTROL pCtl;
pUnk->QueryInterface(&pCtl);
pCtl->FreezeEvents(TRUE);
pCtl->FreezeEvents(FALSE);
pCtl->Release();
Modification Type: | Minor | Last Reviewed: | 8/15/2005 |
---|
Keywords: | kbContainer kbCtrl kbprb KB246044 |
---|
|