我用VB做过,原理应该是一样的。msdn上有一个详细的例子,你跟者做就行了,“ActiveX Sample”,location is visual studio6.0 Ducumentation->visual C++ Documentation->using Visual C++ -> visual C++ Tutorials -> Circle: ActiveX Control 我用的是MSDN 2000
在Active中调用 LRESULT SendMessage( HWND hWnd, // handle of destination window UINT Msg, // message to send WPARAM wParam, // first message parameter LPARAM lParam // second message parameter ); 在应用程序调用Active方法的时候,传入this指针,这样可以向this->m_hWnd 发送消息,wParam传入你接收到的数据指针。
我用的是MSDN 2000
LRESULT SendMessage(
HWND hWnd, // handle of destination window
UINT Msg, // message to send
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
在应用程序调用Active方法的时候,传入this指针,这样可以向this->m_hWnd
发送消息,wParam传入你接收到的数据指针。