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!

Problems Getting OCX Events

Status
Not open for further replies.

daniloa

Programmer
Nov 23, 2001
27
BR
Hi friends I have a big problem in my hands that I can't resolve.

The issue is this:

I have an OCX (MFC Control) that is working fine on Visual Basic.
And I have a MFC Application that uses this OCX, and to use it I follow
this steps:

1- Project->AddToProject->Controls&Components -- and add my OCX.
2- Add The Component in a Dialog Object
3- Add a Member Variable to the control
4- Handle the events in class wizard.
5- Wrote my code.

Ok the code for the control are in:
void XXX::OnShowWindow(BOOL bShow, UINT nStatus)
dialog event handle.

all work fine, but I can't get the events from OCX, the function handler
does not ever been called.

What is Wrong ????

Very Thanks,

Danilo ...

 
I don't know, but just for curiosity, try it without adding a member variable to the control(referring to it instead by
Code:
(CYourControl*)GetDlgItem(ID_YOURCONTROL,m_hWnd)->...
)
I cannot guarantee that it will solve your problem, but I should try...

[bigcheeks]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top