Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

activex on activex (created dynamically)

Status
Not open for further replies.

s0s

Programmer
Sep 7, 2004
4
PL
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top