<?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[GetWindowTitle]]></title><description><![CDATA[<p>also ich weiß nicht wie man getwindowtitle anwenden kann<br />
ich möchte also hier ein bsp:</p>
<pre><code class="language-cpp">FILE *windowfile
windowfile = fopen(&quot;C:\\WinTitles.txt&quot;);
fclose(windowfile);

while(1==1) {
     SleepEx(50,true);
     if(GetAsyncKeyState(0x41)) {
     CurrentWindowTitle = // ?????? (Getwindowtitle) aber wie ?!
     windowfile=fopen(&quot;c:\\WinTitles.txt&quot;,&quot;a+&quot;);
     fputs(CurrentWindowTitle,windowfile);
     fclose(windowfile);
     }
}
</code></pre>
<p>nur wie kann man GetWindowTitle einsetzen ?<br />
zb wenn ich nun A drücke speichert er den windowtitle des offenen fenster in eine text datei nur wie das nun<br />
bitte um hilfe<br />
danke schon im vorraus</p>
<p>//Edit: codetag gefixt</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/157618/getwindowtitle</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 13:44:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/157618.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 27 Aug 2006 22:20:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GetWindowTitle on Mon, 28 Aug 2006 06:37:37 GMT]]></title><description><![CDATA[<p>also ich weiß nicht wie man getwindowtitle anwenden kann<br />
ich möchte also hier ein bsp:</p>
<pre><code class="language-cpp">FILE *windowfile
windowfile = fopen(&quot;C:\\WinTitles.txt&quot;);
fclose(windowfile);

while(1==1) {
     SleepEx(50,true);
     if(GetAsyncKeyState(0x41)) {
     CurrentWindowTitle = // ?????? (Getwindowtitle) aber wie ?!
     windowfile=fopen(&quot;c:\\WinTitles.txt&quot;,&quot;a+&quot;);
     fputs(CurrentWindowTitle,windowfile);
     fclose(windowfile);
     }
}
</code></pre>
<p>nur wie kann man GetWindowTitle einsetzen ?<br />
zb wenn ich nun A drücke speichert er den windowtitle des offenen fenster in eine text datei nur wie das nun<br />
bitte um hilfe<br />
danke schon im vorraus</p>
<p>//Edit: codetag gefixt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125806</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125806</guid><dc:creator><![CDATA[Help Me]]></dc:creator><pubDate>Mon, 28 Aug 2006 06:37:37 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowTitle on Sun, 27 Aug 2006 22:34:16 GMT]]></title><description><![CDATA[<p>C++ kennt keine Fenster.</p>
<p>Welches OS welcher Compiler ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125811</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125811</guid><dc:creator><![CDATA[Knuddlbaer]]></dc:creator><pubDate>Sun, 27 Aug 2006 22:34:16 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowTitle on Sun, 27 Aug 2006 22:38:52 GMT]]></title><description><![CDATA[<p>Windows Xp<br />
Microsoft Visual C++ Studio 2003</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125813</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125813</guid><dc:creator><![CDATA[Help Me]]></dc:creator><pubDate>Sun, 27 Aug 2006 22:38:52 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowTitle on Mon, 28 Aug 2006 06:38:13 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=10455" rel="nofollow">evilissimo</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/1125861</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125861</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Mon, 28 Aug 2006 06:38:13 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowTitle on Mon, 28 Aug 2006 07:50:52 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich glaub du suchst <strong>GetWindowText</strong></p>
<blockquote>
<p>This function copies the text of the specified window’s title bar—if it has one—into a buffer. If the specified window is a control, the text of the control is copied. A remote application interface (RAPI) version of this function exists, and it is called CeGetWindowText.</p>
<p>int GetWindowText(<br />
HWND hWnd,<br />
LPTSTR lpString,<br />
int nMaxCount );<br />
Parameters</p>
<p>hWnd<br />
Handle to the window or control containing the text.<br />
lpString<br />
Long pointer to the buffer that will receive the text.<br />
nMaxCount<br />
Specifies the maximum number of characters to copy to the buffer, including the NULL character. If the text exceeds this limit, it is truncated.<br />
Return Values</p>
<p>The length, in characters, of the copied string, not including the terminating null character, indicates success. Zero indicates that the window has no title bar or text, if the title bar is empty, or if the window or control handle is invalid. To get extended error information, call GetLastError.</p>
<p>This function cannot retrieve the text of an edit control in another application.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1125886</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125886</guid><dc:creator><![CDATA[eas]]></dc:creator><pubDate>Mon, 28 Aug 2006 07:50:52 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowTitle on Mon, 28 Aug 2006 12:44:23 GMT]]></title><description><![CDATA[<p>danke für hilfe :</p>
<pre><code class="language-cpp">#include &quot;stdafx.h&quot;
#include &quot;windows.h&quot;

char title[512];
int _tmain(int argc, _TCHAR* argv[])
{
	FILE *windowfile ;
	windowfile = fopen(&quot;C:\\WinTitles.txt&quot;,&quot;w&quot;); 
	fclose(windowfile);

	while(1==1) {
	SleepEx(100,true);
	if(GetAsyncKeyState(0x41)) {
	windowfile=fopen(&quot;C:\\WinTitles.txt&quot;,&quot;a+&quot;);
    HWND hwnd = GetForegroundWindow();
	GetWindowText(hwnd, title, 512);
	fputs(title,windowfile);
	fputs(&quot;\n&quot;,windowfile);
	fclose(windowfile);
	}
	}
	return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1126119</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1126119</guid><dc:creator><![CDATA[Help Me]]></dc:creator><pubDate>Mon, 28 Aug 2006 12:44:23 GMT</pubDate></item></channel></rss>