///////////////////////////////////////////////////////////////////////// // ButtonDemo.cpp : Implementation of CButtonDemo // ActiveX control provides a labeled button, publishing a click event // // // // Jim Fawcett, Demo for CSE775 - Distributed Objects, Spring 2005 // ///////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "ButtonDemo.h" // CButtonDemo STDMETHODIMP CButtonDemo::SetText(BSTR label) { m_bstrText = label; return S_OK; } LRESULT CButtonDemo::OnLButtonDown(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { ::Beep(2000,200); MessageBox("clicked"); Fire_Clicked(); return 0; }