<?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[Internet-Explorer + Internetseite öffnen mit OpenApplication&#x2F;OpenWithArguments]]></title><description><![CDATA[<p>Hallo,<br />
ich bin relativ neu bei VC++, hab vorher immer in Dev-C++ programmiert.</p>
<p>Das erste Programm soll zuerst einmal nur eine URL auf Knopfdruck öffnen, bzw. später eine in einem Textfeld eingegebene URL öffnen soll. Jetzt bentze ich, wie in der MSDN-Library gefunden, den OpenApplication bzw. den OpenWithArguments.</p>
<p>Doch dann bekomme ich diese Fehlermeldungen:</p>
<pre><code>Fehler	1	error C2601: 'OpenApplication': Lokale Funktionsdefinitionen sind unzulässig 	111
Fehler	2	error C2601: 'OpenWithArguments': Lokale Funktionsdefinitionen sind unzulässig	115
</code></pre>
<p>Hier meine Header-Datei:</p>
<pre><code class="language-cpp">[#pragma once

#using &lt;System.dll&gt;
namespace SecondProject {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Diagnostics;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// &lt;summary&gt;
	/// Zusammenfassung für Form1
	///
	/// Warnung: Wenn Sie den Namen dieser Klasse ändern, müssen Sie auch
	///          die Ressourcendateiname-Eigenschaft für das Tool zur Kompilierung verwalteter Ressourcen ändern,
	///          das allen RESX-Dateien zugewiesen ist, von denen diese Klasse abhängt.
	///          Anderenfalls können die Designer nicht korrekt mit den lokalisierten Ressourcen
	///          arbeiten, die diesem Formular zugewiesen sind.
	/// &lt;/summary&gt;
	public ref class Form1 : public System::Windows::Forms::Form
	{
	public:
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: Konstruktorcode hier hinzufügen.
			//
		}

	protected:
		/// &lt;summary&gt;
		/// Verwendete Ressourcen bereinigen.
		/// &lt;/summary&gt;
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Button^  button1;
	protected: 
	private: System::Windows::Forms::TextBox^  textBox1;

	protected: 

	protected: 

	private:
		/// &lt;summary&gt;
		/// Erforderliche Designervariable.
		/// &lt;/summary&gt;
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// &lt;summary&gt;
		/// Erforderliche Methode für die Designerunterstützung.
		/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
		/// &lt;/summary&gt;
		void InitializeComponent(void)
		{
			this-&gt;button1 = (gcnew System::Windows::Forms::Button());
			this-&gt;textBox1 = (gcnew System::Windows::Forms::TextBox());
			this-&gt;SuspendLayout();
			// 
			// button1
			// 
			this-&gt;button1-&gt;Location = System::Drawing::Point(424, 86);
			this-&gt;button1-&gt;Name = L&quot;button1&quot;;
			this-&gt;button1-&gt;Size = System::Drawing::Size(89, 23);
			this-&gt;button1-&gt;TabIndex = 0;
			this-&gt;button1-&gt;Text = L&quot;URL besuchen&quot;;
			this-&gt;button1-&gt;UseVisualStyleBackColor = true;
			this-&gt;button1-&gt;Click += gcnew System::EventHandler(this, &amp;Form1::button1_Click);
			// 
			// textBox1
			// 
			this-&gt;textBox1-&gt;Location = System::Drawing::Point(318, 88);
			this-&gt;textBox1-&gt;Name = L&quot;textBox1&quot;;
			this-&gt;textBox1-&gt;Size = System::Drawing::Size(100, 20);
			this-&gt;textBox1-&gt;TabIndex = 1;
			this-&gt;textBox1-&gt;TextChanged += gcnew System::EventHandler(this, &amp;Form1::textBox1_TextChanged);
			// 
			// Form1
			// 
			this-&gt;AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this-&gt;AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this-&gt;ClientSize = System::Drawing::Size(601, 321);
			this-&gt;Controls-&gt;Add(this-&gt;textBox1);
			this-&gt;Controls-&gt;Add(this-&gt;button1);
			this-&gt;Name = L&quot;Form1&quot;;
			this-&gt;Text = L&quot;Form1&quot;;
			this-&gt;ResumeLayout(false);
			this-&gt;PerformLayout();

		}
#pragma endregion
	private: System::Void textBox1_TextChanged(System::Object^  sender, System::EventArgs^  e) 
			 {
			 }
	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e)   
			 {

				 void OpenApplication()
				{
					Process::Start( &quot;IExplore.exe&quot; );
				}
				void OpenWithArguments()
				{
					Process::Start( &quot;IExplore.exe&quot;, &quot;www.meineurl.de&quot; );
				}
			 }

	};
}

/cpp]

Und hier meine Projekt-Datei:
[cpp]// Second Project.cpp: Hauptprojektdatei.

#using &lt;system.dll&gt;
#include &quot;stdafx.h&quot;
#include &quot;Form1.h&quot;

using namespace System;
using namespace System::Diagnostics;
using namespace System::ComponentModel;
using namespace SecondProject;

// Hiermit definiere ich OpenWithArguments
void OpenWithArguments(){};
void OpenApplication(){};
[STAThreadAttribute]
int main(array&lt;System::String ^&gt; ^args)
{
	// Aktivieren visueller Effekte von Windows XP, bevor Steuerelemente erstellt werden
	Application::EnableVisualStyles();
	Application::SetCompatibleTextRenderingDefault(false); 

	// Hauptfenster erstellen und ausführen
	Application::Run(gcnew Form1());

	OpenApplication();
	OpenWithArguments();
	return 0;
}
</code></pre>
<p>Zu diesen Fehlern fand ich in der MSDN-Library nicht genügend Informationen. Bitte um Hilfe.</p>
<p>P.S. Vielen Dank im Vorraus</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/181209/internet-explorer-internetseite-öffnen-mit-openapplication-openwitharguments</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 05:34:18 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/181209.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 11 May 2007 04:44:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Internet-Explorer + Internetseite öffnen mit OpenApplication&#x2F;OpenWithArguments on Fri, 11 May 2007 04:44:44 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich bin relativ neu bei VC++, hab vorher immer in Dev-C++ programmiert.</p>
<p>Das erste Programm soll zuerst einmal nur eine URL auf Knopfdruck öffnen, bzw. später eine in einem Textfeld eingegebene URL öffnen soll. Jetzt bentze ich, wie in der MSDN-Library gefunden, den OpenApplication bzw. den OpenWithArguments.</p>
<p>Doch dann bekomme ich diese Fehlermeldungen:</p>
<pre><code>Fehler	1	error C2601: 'OpenApplication': Lokale Funktionsdefinitionen sind unzulässig 	111
Fehler	2	error C2601: 'OpenWithArguments': Lokale Funktionsdefinitionen sind unzulässig	115
</code></pre>
<p>Hier meine Header-Datei:</p>
<pre><code class="language-cpp">[#pragma once

#using &lt;System.dll&gt;
namespace SecondProject {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Diagnostics;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// &lt;summary&gt;
	/// Zusammenfassung für Form1
	///
	/// Warnung: Wenn Sie den Namen dieser Klasse ändern, müssen Sie auch
	///          die Ressourcendateiname-Eigenschaft für das Tool zur Kompilierung verwalteter Ressourcen ändern,
	///          das allen RESX-Dateien zugewiesen ist, von denen diese Klasse abhängt.
	///          Anderenfalls können die Designer nicht korrekt mit den lokalisierten Ressourcen
	///          arbeiten, die diesem Formular zugewiesen sind.
	/// &lt;/summary&gt;
	public ref class Form1 : public System::Windows::Forms::Form
	{
	public:
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: Konstruktorcode hier hinzufügen.
			//
		}

	protected:
		/// &lt;summary&gt;
		/// Verwendete Ressourcen bereinigen.
		/// &lt;/summary&gt;
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Button^  button1;
	protected: 
	private: System::Windows::Forms::TextBox^  textBox1;

	protected: 

	protected: 

	private:
		/// &lt;summary&gt;
		/// Erforderliche Designervariable.
		/// &lt;/summary&gt;
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// &lt;summary&gt;
		/// Erforderliche Methode für die Designerunterstützung.
		/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
		/// &lt;/summary&gt;
		void InitializeComponent(void)
		{
			this-&gt;button1 = (gcnew System::Windows::Forms::Button());
			this-&gt;textBox1 = (gcnew System::Windows::Forms::TextBox());
			this-&gt;SuspendLayout();
			// 
			// button1
			// 
			this-&gt;button1-&gt;Location = System::Drawing::Point(424, 86);
			this-&gt;button1-&gt;Name = L&quot;button1&quot;;
			this-&gt;button1-&gt;Size = System::Drawing::Size(89, 23);
			this-&gt;button1-&gt;TabIndex = 0;
			this-&gt;button1-&gt;Text = L&quot;URL besuchen&quot;;
			this-&gt;button1-&gt;UseVisualStyleBackColor = true;
			this-&gt;button1-&gt;Click += gcnew System::EventHandler(this, &amp;Form1::button1_Click);
			// 
			// textBox1
			// 
			this-&gt;textBox1-&gt;Location = System::Drawing::Point(318, 88);
			this-&gt;textBox1-&gt;Name = L&quot;textBox1&quot;;
			this-&gt;textBox1-&gt;Size = System::Drawing::Size(100, 20);
			this-&gt;textBox1-&gt;TabIndex = 1;
			this-&gt;textBox1-&gt;TextChanged += gcnew System::EventHandler(this, &amp;Form1::textBox1_TextChanged);
			// 
			// Form1
			// 
			this-&gt;AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this-&gt;AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this-&gt;ClientSize = System::Drawing::Size(601, 321);
			this-&gt;Controls-&gt;Add(this-&gt;textBox1);
			this-&gt;Controls-&gt;Add(this-&gt;button1);
			this-&gt;Name = L&quot;Form1&quot;;
			this-&gt;Text = L&quot;Form1&quot;;
			this-&gt;ResumeLayout(false);
			this-&gt;PerformLayout();

		}
#pragma endregion
	private: System::Void textBox1_TextChanged(System::Object^  sender, System::EventArgs^  e) 
			 {
			 }
	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e)   
			 {

				 void OpenApplication()
				{
					Process::Start( &quot;IExplore.exe&quot; );
				}
				void OpenWithArguments()
				{
					Process::Start( &quot;IExplore.exe&quot;, &quot;www.meineurl.de&quot; );
				}
			 }

	};
}

/cpp]

Und hier meine Projekt-Datei:
[cpp]// Second Project.cpp: Hauptprojektdatei.

#using &lt;system.dll&gt;
#include &quot;stdafx.h&quot;
#include &quot;Form1.h&quot;

using namespace System;
using namespace System::Diagnostics;
using namespace System::ComponentModel;
using namespace SecondProject;

// Hiermit definiere ich OpenWithArguments
void OpenWithArguments(){};
void OpenApplication(){};
[STAThreadAttribute]
int main(array&lt;System::String ^&gt; ^args)
{
	// Aktivieren visueller Effekte von Windows XP, bevor Steuerelemente erstellt werden
	Application::EnableVisualStyles();
	Application::SetCompatibleTextRenderingDefault(false); 

	// Hauptfenster erstellen und ausführen
	Application::Run(gcnew Form1());

	OpenApplication();
	OpenWithArguments();
	return 0;
}
</code></pre>
<p>Zu diesen Fehlern fand ich in der MSDN-Library nicht genügend Informationen. Bitte um Hilfe.</p>
<p>P.S. Vielen Dank im Vorraus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1282742</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1282742</guid><dc:creator><![CDATA[-Zwerg-]]></dc:creator><pubDate>Fri, 11 May 2007 04:44:44 GMT</pubDate></item></channel></rss>