<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MFC ActiveX]]></title><description><![CDATA[<p>Ich habe in MFC eine ActiveX Beispiel gemacht!<br />
Ich habe in der Klasse ActiveX_SampleCtrl eine Funktion void Start() hinzugefügt!<br />
verwende Visual Studio 2005!<br />
Wenn ich aber nun das ActiveX in einem anderen Programm verwenden will ist nur die AboutBox Funktion sichtbar!!!</p>
<p>Wie kann ich die Start() sichtbar machen!? die Funktion ist ja Public....hmm....was mach ich falsch?</p>
<p>cu</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/141399/mfc-activex</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 19:34:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/141399.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Mar 2006 15:58:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MFC ActiveX on Tue, 21 Mar 2006 15:58:19 GMT]]></title><description><![CDATA[<p>Ich habe in MFC eine ActiveX Beispiel gemacht!<br />
Ich habe in der Klasse ActiveX_SampleCtrl eine Funktion void Start() hinzugefügt!<br />
verwende Visual Studio 2005!<br />
Wenn ich aber nun das ActiveX in einem anderen Programm verwenden will ist nur die AboutBox Funktion sichtbar!!!</p>
<p>Wie kann ich die Start() sichtbar machen!? die Funktion ist ja Public....hmm....was mach ich falsch?</p>
<p>cu</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1021188</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1021188</guid><dc:creator><![CDATA[~progger~]]></dc:creator><pubDate>Tue, 21 Mar 2006 15:58:19 GMT</pubDate></item><item><title><![CDATA[Reply to MFC ActiveX on Thu, 23 Mar 2006 07:49:55 GMT]]></title><description><![CDATA[<p>Was macht die Funktion start den?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1022137</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1022137</guid><dc:creator><![CDATA[guenni81]]></dc:creator><pubDate>Thu, 23 Mar 2006 07:49:55 GMT</pubDate></item><item><title><![CDATA[Reply to MFC ActiveX on Sat, 25 Mar 2006 20:07:30 GMT]]></title><description><![CDATA[<p>hi,<br />
habs nun selbst rausgefunden, man muss da in der dispatch_map noch was manuell hinzufügen!! was macht eigentlich die dispatch map?</p>
<pre><code class="language-cpp">// Dispatch mapge

BEGIN_DISPATCH_MAP(CActiveX_ExampleCtrl, COleControl)
	DISP_FUNCTION_ID(CActiveX_ExampleCtrl, &quot;AboutBox&quot;, DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
	DISP_FUNCTION_ID(CActiveX_ExampleCtrl, &quot;Start&quot;, 1, Start, VT_EMPTY, VTS_NONE)
	DISP_FUNCTION_ID(CActiveX_ExampleCtrl, &quot;Stop&quot;, 2, Stop, VT_EMPTY, VTS_NONE)
END_DISPATCH_MAP()

void CActiveX_ExampleCtrl::Start()
{
	SetTimer(1, 200, 0);
}

void CActiveX_ExampleCtrl::Stop()
{
	KillTimer(1);
	m_Counter = 0;
	InvalidateRect(NULL);
}

void CActiveX_ExampleCtrl::OnTimer(UINT_PTR nIDEvent)
{
	// TODO: Add your message handler code here and/or call default

	COleControl::OnTimer(nIDEvent);

	m_Counter++;
	InvalidateRect(NULL);
}

void CActiveX_ExampleCtrl::OnDraw(
			CDC* pdc, const CRect&amp; rcBounds, const CRect&amp; rcInvalid)
{
	if (!pdc)
		return;

	// TODO: Replace the following code with your own drawing code.
	//pdc-&gt;FillRect(rcBounds, CBrush::FromHandle((HBRUSH)GetStockObject(WHITE_BRUSH)));
	//pdc-&gt;Ellipse(rcBounds);

	stringstream str1;
	str1 &lt;&lt; m_Counter;
	pdc-&gt;TextOutA(100, 100, str1.str().c_str());
}
</code></pre>
<p>und in der .idl datei sind folgende änderungen manuell zu machen bzgl. start u stopp:</p>
<pre><code class="language-cpp">dispinterface _DActiveX_Example
	{
		properties:
		methods:

			[id(DISPID_ABOUTBOX)] void AboutBox();
			[id(1)] void Start();
			[id(2)] void Stop();
	};
</code></pre>
<p>was ich hier nun gemacht habe ist ja ganz normales MFC ActiveX Control...wie baut man in visual studio 2005 eine DCOM Anwendung?</p>
<p>cu</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1023910</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1023910</guid><dc:creator><![CDATA[~progger~]]></dc:creator><pubDate>Sat, 25 Mar 2006 20:07:30 GMT</pubDate></item></channel></rss>