<?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[Programm öffnen und danach Fenstergröße anpassen]]></title><description><![CDATA[<p>hallo zusammen,<br />
habe da ein problem.<br />
vor einem halben jahr habe ich ein kleines proogramm geschrieben, welches ein programm z.b. Acrobat Reader6.x öffnet und zusätzlich noch direkt das zugehörige pdf. dies hat auch bis jetzt wunderbar funktioniert, jedoch habe ich auf Acrobat Reader 7.0 umgestellt und es funktioniert nicht mehr. es wird einfach nur der Reader gestartet und das zugehörige pdf nicht mehr.<br />
bitte kann mir jemand eine brauchbare info geben. werde den code einfach mal reinstellen, möglicherweise sieht einer von euch gleich den fehler.</p>
<pre><code>//#include &lt;afxwin.h&gt;
#include &lt;windows.h&gt;
#include &lt;iostream&gt;
#include &lt;string.h&gt;
#include &lt;stdlib.h&gt;
using namespace std;

STARTUPINFO stgStartupInfo;
PROCESS_INFORMATION stgProcessInfo;

const int MAX_STR = 256;

int main(int argc, char **argv)  
{
	bool gefunden = false;
	int applikationshoehe = 100, Button = 0, help = 0;
	char cmd_line[MAX_STR];
	char * applikationPfad = NULL;
	char * dateiPfad = NULL;
	char * applikationName = NULL;
	char * dateiName = NULL;
	char hHandleWindow[MAX_STR];
	char * MsgText_Ueberschrift = NULL;
	char * MsgText_Text = NULL;

		//####applikationPfad = argv[1];
		//####dateiPfad = argv[2];
		applikationPfad = &quot;C:\\Programme\\Adobe\\Acrobat 7.0\\Reader\\AcroRd32.exe&quot;;
		dateiPfad = &quot;C:\\xxx.pdf&quot;;

		sprintf(cmd_line, &quot;\&quot;%s\&quot;\&quot;%s\&quot;&quot;, applikationPfad, dateiPfad);

		CreateProcess(
			applikationPfad,
			cmd_line,
			NULL,
			NULL,
			false,
			CREATE_DEFAULT_ERROR_MODE,
			NULL,
			NULL,
			&amp;stgStartupInfo,
			&amp;stgProcessInfo
			);

		//####applikationName = argv[3];
		//####dateiName = argv[4];
		//####applikationshoehe = atoi(argv[5]);
		applikationName = &quot;Adobe Reader&quot;;
		dateiName = &quot;[xxx.pdf]&quot;;
		applikationshoehe = 500;

		strcpy (hHandleWindow, applikationName);	// String kopieren
		help = strlen(hHandleWindow);

			strncat(hHandleWindow, &quot; - &quot;, 3);		// X Zeichen an String anhaengen
				strncat(hHandleWindow, dateiName, strlen(dateiName));		// X Zeichen an String anhaengen

		gefunden = false;
		while(gefunden == false)
		{
			HWND hWindow = FindWindow( NULL, hHandleWindow);
			if (hWindow != NULL)
			{
				SetWindowPos(
					hWindow,
					NULL,
					0, 0, 1024, applikationshoehe, 
					SWP_NOOWNERZORDER | SWP_NOZORDER
					);
				gefunden = true;
			}
		}

    return 0; 
}
</code></pre>
<p>danke für eure hilfe!!!</p>
<p>lg<br />
ntl</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/112645/programm-öffnen-und-danach-fenstergröße-anpassen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 01 Jul 2026 09:48:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/112645.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Jun 2005 18:52:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Programm öffnen und danach Fenstergröße anpassen on Tue, 14 Jun 2005 18:52:43 GMT]]></title><description><![CDATA[<p>hallo zusammen,<br />
habe da ein problem.<br />
vor einem halben jahr habe ich ein kleines proogramm geschrieben, welches ein programm z.b. Acrobat Reader6.x öffnet und zusätzlich noch direkt das zugehörige pdf. dies hat auch bis jetzt wunderbar funktioniert, jedoch habe ich auf Acrobat Reader 7.0 umgestellt und es funktioniert nicht mehr. es wird einfach nur der Reader gestartet und das zugehörige pdf nicht mehr.<br />
bitte kann mir jemand eine brauchbare info geben. werde den code einfach mal reinstellen, möglicherweise sieht einer von euch gleich den fehler.</p>
<pre><code>//#include &lt;afxwin.h&gt;
#include &lt;windows.h&gt;
#include &lt;iostream&gt;
#include &lt;string.h&gt;
#include &lt;stdlib.h&gt;
using namespace std;

STARTUPINFO stgStartupInfo;
PROCESS_INFORMATION stgProcessInfo;

const int MAX_STR = 256;

int main(int argc, char **argv)  
{
	bool gefunden = false;
	int applikationshoehe = 100, Button = 0, help = 0;
	char cmd_line[MAX_STR];
	char * applikationPfad = NULL;
	char * dateiPfad = NULL;
	char * applikationName = NULL;
	char * dateiName = NULL;
	char hHandleWindow[MAX_STR];
	char * MsgText_Ueberschrift = NULL;
	char * MsgText_Text = NULL;

		//####applikationPfad = argv[1];
		//####dateiPfad = argv[2];
		applikationPfad = &quot;C:\\Programme\\Adobe\\Acrobat 7.0\\Reader\\AcroRd32.exe&quot;;
		dateiPfad = &quot;C:\\xxx.pdf&quot;;

		sprintf(cmd_line, &quot;\&quot;%s\&quot;\&quot;%s\&quot;&quot;, applikationPfad, dateiPfad);

		CreateProcess(
			applikationPfad,
			cmd_line,
			NULL,
			NULL,
			false,
			CREATE_DEFAULT_ERROR_MODE,
			NULL,
			NULL,
			&amp;stgStartupInfo,
			&amp;stgProcessInfo
			);

		//####applikationName = argv[3];
		//####dateiName = argv[4];
		//####applikationshoehe = atoi(argv[5]);
		applikationName = &quot;Adobe Reader&quot;;
		dateiName = &quot;[xxx.pdf]&quot;;
		applikationshoehe = 500;

		strcpy (hHandleWindow, applikationName);	// String kopieren
		help = strlen(hHandleWindow);

			strncat(hHandleWindow, &quot; - &quot;, 3);		// X Zeichen an String anhaengen
				strncat(hHandleWindow, dateiName, strlen(dateiName));		// X Zeichen an String anhaengen

		gefunden = false;
		while(gefunden == false)
		{
			HWND hWindow = FindWindow( NULL, hHandleWindow);
			if (hWindow != NULL)
			{
				SetWindowPos(
					hWindow,
					NULL,
					0, 0, 1024, applikationshoehe, 
					SWP_NOOWNERZORDER | SWP_NOZORDER
					);
				gefunden = true;
			}
		}

    return 0; 
}
</code></pre>
<p>danke für eure hilfe!!!</p>
<p>lg<br />
ntl</p>
]]></description><link>https://www.c-plusplus.net/forum/post/809278</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/809278</guid><dc:creator><![CDATA[NTL]]></dc:creator><pubDate>Tue, 14 Jun 2005 18:52:43 GMT</pubDate></item><item><title><![CDATA[Reply to Programm öffnen und danach Fenstergröße anpassen on Tue, 14 Jun 2005 20:38:16 GMT]]></title><description><![CDATA[<p>is programmspezifisch<br />
musst dich halt mal bei adobe informiern mit welchen parametern man den reader starten kann</p>
]]></description><link>https://www.c-plusplus.net/forum/post/809331</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/809331</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Tue, 14 Jun 2005 20:38:16 GMT</pubDate></item><item><title><![CDATA[Reply to Programm öffnen und danach Fenstergröße anpassen on Tue, 14 Jun 2005 20:52:06 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/809341</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/809341</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Tue, 14 Jun 2005 20:52:06 GMT</pubDate></item><item><title><![CDATA[Reply to Programm öffnen und danach Fenstergröße anpassen on Wed, 15 Jun 2005 19:09:10 GMT]]></title><description><![CDATA[<p>hallo,<br />
danke für die antwort aber die hilft mir nicht weiter!?!?</p>
<p>habe das ganze auch schon mit excel xp probiert und es klappt auch nicht obwohl es zuvor mit excel 97 klappte.<br />
kann es sein, dass der &quot;CreateProcess&quot; nur mit 16bit programmen funktioniert und bei 32bit nicht???<br />
gibt es eine andere möglichkeit?</p>
<p>danke für eure hilfreichen antworten!</p>
<p>NTL</p>
]]></description><link>https://www.c-plusplus.net/forum/post/809933</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/809933</guid><dc:creator><![CDATA[NTL]]></dc:creator><pubDate>Wed, 15 Jun 2005 19:09:10 GMT</pubDate></item><item><title><![CDATA[Reply to Programm öffnen und danach Fenstergröße anpassen on Wed, 15 Jun 2005 19:24:39 GMT]]></title><description><![CDATA[<p>NTL schrieb:</p>
<blockquote>
<p>es wird einfach nur der Reader gestartet und das zugehörige pdf nicht mehr.</p>
</blockquote>
<p>ich wollte damit sagen dass sich die parameter geändert haben<br />
vielleicht sagt man jetzt nich mehr<br />
&quot;acroread.exe test.pdf&quot;<br />
sondern<br />
&quot;acroread.exe -f test.pdf&quot;</p>
<p>wie genau die parameter aussehn weiss nur adobe<br />
schau doch mal die dokus durch</p>
]]></description><link>https://www.c-plusplus.net/forum/post/809948</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/809948</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Wed, 15 Jun 2005 19:24:39 GMT</pubDate></item><item><title><![CDATA[Reply to Programm öffnen und danach Fenstergröße anpassen on Wed, 15 Jun 2005 20:12:18 GMT]]></title><description><![CDATA[<p>ok werde mal in den dokus nachsehen, hoffe ich finde was!</p>
<p>ntl</p>
]]></description><link>https://www.c-plusplus.net/forum/post/810009</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/810009</guid><dc:creator><![CDATA[NTL]]></dc:creator><pubDate>Wed, 15 Jun 2005 20:12:18 GMT</pubDate></item><item><title><![CDATA[Reply to Programm öffnen und danach Fenstergröße anpassen on Wed, 15 Jun 2005 20:22:45 GMT]]></title><description><![CDATA[<p>hi,<br />
habe es nun nicht mit &quot;CreateProcess&quot; sondern mit &quot;ShellExecute(NULL, &quot;open&quot;, &quot;diedatei.exe&quot;, NULL, NULL, SW_SHOW);&quot; probiert und es funktioniert nun.<br />
keine Ahnung warum, egal ich brauche es dringend!</p>
<p>gruß<br />
ntl</p>
]]></description><link>https://www.c-plusplus.net/forum/post/810014</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/810014</guid><dc:creator><![CDATA[NTL]]></dc:creator><pubDate>Wed, 15 Jun 2005 20:22:45 GMT</pubDate></item><item><title><![CDATA[Reply to Programm öffnen und danach Fenstergröße anpassen on Wed, 15 Jun 2005 21:01:10 GMT]]></title><description><![CDATA[<p>stimmt daran hat ich nich gedacht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<p>ShellExecute(NULL, &quot;open&quot;, &quot;diedatei.pdf&quot;, NULL, NULL, SW_SHOW);<br />
ShellExecute(NULL, &quot;open&quot;, &quot;diedatei.xls&quot;, NULL, NULL, SW_SHOW);</p>
<p>so kannste files mit ihren standardprogrammen öffnen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/810036</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/810036</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Wed, 15 Jun 2005 21:01:10 GMT</pubDate></item><item><title><![CDATA[Reply to Programm öffnen und danach Fenstergröße anpassen on Thu, 16 Jun 2005 19:02:53 GMT]]></title><description><![CDATA[<p>stimmt, hätte ich von anfang an nehmen sollen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/810669</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/810669</guid><dc:creator><![CDATA[NTL]]></dc:creator><pubDate>Thu, 16 Jun 2005 19:02:53 GMT</pubDate></item></channel></rss>