hello
i'm trying to put one OCX in other ActiveX control.
in external ocx i have line AfxEnableControlContainer() in InitInstance function and
in OnDraw handler i'm trying few versions:
1)
RECT rc = {10, 10, 100, 30};
// TODO: Add your specialized creation code here
pdc->GetWindow()->CreateControl "QButton.Button", "", WS_VISIBLE, rc, this, IDR_BATON, NULL, FALSE, NULL);
this version causes "assertion failed" runtime error in line
FXWIN_INLINE CWnd* CWnd::GetParent() const
{ ASSERT:IsWindow(m_hWnd)); return CWnd::FromHandle:GetParent(m_hWnd));
2)
RECT rc = {10, 10, 100, 30};
// TODO: Add your specialized creation code here
this->CreateControl "QButton.Button", "", WS_VISIBLE, rc, this, IDR_BATON, NULL, FALSE, NULL);
same as 1)
3)
CWnd m_control;
RECT rc = {10, 10, 100, 30};
// TODO: Add your specialized creation code here
m_control.CreateControl("QButton.Button", "", WS_VISIBLE, rc, this, IDR_BATON, NULL, FALSE, NULL);
everything is ok... but i can't see my "QButton.Button". created activex is transparent
please... can you help me?
thanks in advance
--
s0s
i'm trying to put one OCX in other ActiveX control.
in external ocx i have line AfxEnableControlContainer() in InitInstance function and
in OnDraw handler i'm trying few versions:
1)
RECT rc = {10, 10, 100, 30};
// TODO: Add your specialized creation code here
pdc->GetWindow()->CreateControl "QButton.Button", "", WS_VISIBLE, rc, this, IDR_BATON, NULL, FALSE, NULL);
this version causes "assertion failed" runtime error in line
FXWIN_INLINE CWnd* CWnd::GetParent() const
{ ASSERT:IsWindow(m_hWnd)); return CWnd::FromHandle:GetParent(m_hWnd));
2)
RECT rc = {10, 10, 100, 30};
// TODO: Add your specialized creation code here
this->CreateControl "QButton.Button", "", WS_VISIBLE, rc, this, IDR_BATON, NULL, FALSE, NULL);
same as 1)
3)
CWnd m_control;
RECT rc = {10, 10, 100, 30};
// TODO: Add your specialized creation code here
m_control.CreateControl("QButton.Button", "", WS_VISIBLE, rc, this, IDR_BATON, NULL, FALSE, NULL);
everything is ok... but i can't see my "QButton.Button". created activex is transparent
please... can you help me?
thanks in advance
--
s0s