<?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[Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)?]]></title><description><![CDATA[<p>Geht das?<br />
Also dass man die .exe Datei ausführen kann, aber die Sounddatei nicht mehr braucht? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Björn</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/86771/soundsdatei-abspielen-ohne-sounddatei-zur-laufzeit</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 03:46:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/86771.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 Sep 2004 12:59:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Wed, 22 Sep 2004 12:59:23 GMT]]></title><description><![CDATA[<p>Geht das?<br />
Also dass man die .exe Datei ausführen kann, aber die Sounddatei nicht mehr braucht? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Björn</p>
]]></description><link>https://www.c-plusplus.net/forum/post/612792</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/612792</guid><dc:creator><![CDATA[friesenjung21]]></dc:creator><pubDate>Wed, 22 Sep 2004 12:59:23 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Wed, 22 Sep 2004 17:33:38 GMT]]></title><description><![CDATA[<p>Einfach den Soundals Ressource einbinden, oder was meinst du <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/613072</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/613072</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Wed, 22 Sep 2004 17:33:38 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Wed, 22 Sep 2004 18:11:07 GMT]]></title><description><![CDATA[<p>Dann brauch ich die Datei zur Laufzeit nicht mehr oder?<br />
Wie ruf ich die Datei denn auf?<br />
Mit PlaySound wohl eher nicht.<br />
LoadResource oder wie?<br />
Björn</p>
]]></description><link>https://www.c-plusplus.net/forum/post/613114</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/613114</guid><dc:creator><![CDATA[friesenjung21]]></dc:creator><pubDate>Wed, 22 Sep 2004 18:11:07 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Wed, 22 Sep 2004 19:31:01 GMT]]></title><description><![CDATA[<p>Doch, geht mit PlaySound:</p>
<blockquote>
<p>SND_RESOURCE<br />
The pszSound parameter is a resource identifier; hmod must identify the instance that contains the resource.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/613178</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/613178</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Wed, 22 Sep 2004 19:31:01 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Thu, 23 Sep 2004 11:13:57 GMT]]></title><description><![CDATA[<p>Kann mir vielleicht nochmal jemand sagen,<br />
was ich wo schreiben soll.<br />
(Also die Funtion inc. Parameter)<br />
Wäre sehr nett!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/613600</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/613600</guid><dc:creator><![CDATA[friesenjung21]]></dc:creator><pubDate>Thu, 23 Sep 2004 11:13:57 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Thu, 23 Sep 2004 12:35:10 GMT]]></title><description><![CDATA[<p><a href="http://msdn.microsoft.com/library/en-us/multimed/htm/_win32_playing_wave_resources.asp" rel="nofollow">MSDN: Playing WAVE Resources</a> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/613682</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/613682</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Thu, 23 Sep 2004 12:35:10 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Thu, 23 Sep 2004 12:37:49 GMT]]></title><description><![CDATA[<p>Vielen Dank flenders!<br />
Jetzt komm ich klar! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/613684</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/613684</guid><dc:creator><![CDATA[friesenjung21]]></dc:creator><pubDate>Thu, 23 Sep 2004 12:37:49 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Mon, 27 Sep 2004 18:13:35 GMT]]></title><description><![CDATA[<p>Nochmal kurze frage:<br />
was schreib ich in die res. Datei?<br />
Bei mit steht immer<br />
&quot; 'WAVE' nicht deklarierter Bezeichner&quot;<br />
Björn</p>
]]></description><link>https://www.c-plusplus.net/forum/post/616258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616258</guid><dc:creator><![CDATA[friesenjung21]]></dc:creator><pubDate>Mon, 27 Sep 2004 18:13:35 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Mon, 27 Sep 2004 18:38:31 GMT]]></title><description><![CDATA[<p>friesenjung21 schrieb:</p>
<blockquote>
<p>was schreib ich in die res. Datei?<br />
Bei mit steht immer<br />
&quot; 'WAVE' nicht deklarierter Bezeichner&quot;</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/26a0.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--warning"
      title=":warning:"
      alt="⚠"
    /> Halt, die .res-Datei wird vom Ressourcen-Compiler erstellt. Du musst eine .rc anlegen, in die dann laut Doku folgendes kommt:</p>
<blockquote>
<pre><code class="language-cpp">soundName WAVE c:\sounds\bells.wav
</code></pre>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/616280</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616280</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Mon, 27 Sep 2004 18:38:31 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Mon, 27 Sep 2004 18:42:11 GMT]]></title><description><![CDATA[<p>Gut, hab ich, jetzzt kommt:<br />
&quot;Syntaxfehler : Fehlendes ';' vor Bezeichner 'WAVE'&quot;<br />
Björn</p>
]]></description><link>https://www.c-plusplus.net/forum/post/616283</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616283</guid><dc:creator><![CDATA[friesenjung21]]></dc:creator><pubDate>Mon, 27 Sep 2004 18:42:11 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Mon, 27 Sep 2004 19:42:48 GMT]]></title><description><![CDATA[<p>Hast du auch im Ressourcen-Script windows.h eingebunden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/616322</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616322</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Mon, 27 Sep 2004 19:42:48 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Mon, 27 Sep 2004 20:14:44 GMT]]></title><description><![CDATA[<p>Resourcen Datei</p>
<pre><code class="language-cpp">// res.rc  &quot;.rc&quot; nicht &quot;.res&quot;
// res.rc dem Projekt zu fügen
MYSOUND   WAVE    &quot;mucke.wav&quot;
</code></pre>
<p>in CPP</p>
<pre><code class="language-cpp">#include &quot;windows.h&quot;    
#include &quot;mmsystem.h&quot;  // PlaySound();
//....
PlaySound(&quot;MYSOUND&quot;, HANDLE(HInstance), SND_RESOURCE); // spiel es Sam
//....
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/616344</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616344</guid><dc:creator><![CDATA[MiC++ha]]></dc:creator><pubDate>Mon, 27 Sep 2004 20:14:44 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Mon, 27 Sep 2004 21:22:05 GMT]]></title><description><![CDATA[<p>Bei VC++ ist noch sowas in der .rc Datei oben drin:</p>
<blockquote>
<pre><code class="language-cpp">#define APSTUDIO_READONLY_SYMBOLS
#define APSTUDIO_HIDDEN_SYMBOLS
#include &quot;windows.h&quot;
#undef APSTUDIO_HIDDEN_SYMBOLS
#undef APSTUDIO_READONLY_SYMBOLS
</code></pre>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/616364</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616364</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Mon, 27 Sep 2004 21:22:05 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Mon, 27 Sep 2004 20:57:50 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/1644">@flenders</a><br />
Ich kenne VC++ nicht, oder nicht besonders, aber wenn das Notwendig ist mit an zu geben finde ich das Unlogisch und stelle mir die frage der Erleichterung mit dem VC++ gegenüber anderen compilern.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/616368</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616368</guid><dc:creator><![CDATA[MiC++ha]]></dc:creator><pubDate>Mon, 27 Sep 2004 20:57:50 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Mon, 27 Sep 2004 21:29:31 GMT]]></title><description><![CDATA[<p>MiC++ha schrieb:</p>
<blockquote>
<p>Ich kenne VC++ nicht, oder nicht besonders, aber wenn das Notwendig ist mit an zu geben finde ich das Unlogisch und stelle mir die frage der Erleichterung mit dem VC++ gegenüber anderen compilern.</p>
</blockquote>
<p>Das musst du ja nicht von Hand eingeben, sondern wird automatisch von der IDE eingefügt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/616371</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616371</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Mon, 27 Sep 2004 21:29:31 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Mon, 27 Sep 2004 22:23:22 GMT]]></title><description><![CDATA[<p>Aha,</p>
<p>somit erübrigt sich doch die frage ob &quot;er&quot; es eingefügt hat, wenn es Automatisch gemacht wird, oder irre ich mich da ?</p>
<p>Wie auch immer, das zeug ist so einfach das wir das nach ne kiste Bier noch so runter leiern und es funktioniert, wenn er das nicht hinbekommt so kann das nur an einem anderen fehler liegen, ich denke wir warten mal sein nächstes result ab.</p>
<p>PS: hat mal einer ne tastaur für mich? die shifttaste geht nur wenn ich mit nem hammer drauf haue;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/616383</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616383</guid><dc:creator><![CDATA[MiC++ha]]></dc:creator><pubDate>Mon, 27 Sep 2004 22:23:22 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Mon, 24 Jan 2005 21:16:10 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Habe den Rechner fomatiert und vergessen den Skript zu sichern <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_down"
      title=":-1:"
      alt="👎"
    /><br />
Jetzt versuche ich das wieder hinzubekommen.<br />
Allerdings scheitert es bei der Funktion PlaySounds().<br />
Ich weiß nicht genau was ich als Parameter angeben soll <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Vielleicht hilft euch das ja:<br />
Die Datei main.cpp:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &quot;mmsystem.h&quot;

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);  
//Deklaration der Windows-Nachrichten-Prozedur 

int WINAPI WinMain (HINSTANCE hI, HINSTANCE hPrI, PSTR szCmdLine, int iCmdShow) 
{ 
char szName[] = &quot;Fensterklasse&quot;;
HBRUSH MyBrush = CreateSolidBrush(RGB(255,255,51));
WNDCLASS wc; 

wc.style         = CS_HREDRAW | CS_VREDRAW;   // CS = &quot;class style&quot; 
wc.lpfnWndProc   = WndProc; 
wc.cbClsExtra    = 0; 
wc.cbWndExtra    = 0; 
wc.hInstance     = hI; 
wc.hIcon         = LoadIcon (NULL, IDI_WINLOGO); 
wc.hCursor       = LoadCursor (NULL, IDC_ARROW); 
wc.hbrBackground = MyBrush; 
wc.lpszMenuName  = NULL; 
wc.lpszClassName = szName; 

RegisterClass (&amp;wc); 

HWND hwnd = CreateWindow (szName, &quot;Soundtest&quot;, WS_SYSMENU | WS_THICKFRAME,  
                          300, 230, 500, 200, NULL, NULL, hI, NULL); 

ShowWindow   (hwnd, iCmdShow); 
UpdateWindow (hwnd); 

// Nachrichten-Schleife 
MSG msg; 
    while (GetMessage (&amp;msg, NULL, 0, 0)) 
    { 
        TranslateMessage (&amp;msg); 
        DispatchMessage (&amp;msg); 
    } 
return msg.wParam; 
} 

// Windows-Nachrichten-Prozedur 
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) 
{ 
HDC hdc; 
PAINTSTRUCT ps;
HWND hwndButton1; 

switch (message) 
{ 
case WM_PAINT: 
    hdc = BeginPaint (hwnd, &amp;ps); 
        TextOut (hdc, 20, 20, &quot;Soundtest&quot;, 20); 
    EndPaint (hwnd, &amp;ps); 
    return 0; 

case WM_CREATE:
      hwndButton1 = CreateWindow ( &quot;button&quot;, &quot;Abspielen&quot;, 
                                   WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
                                   150, 20, 100, 40, hwnd, (HMENU)1, 
                                   (HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE), NULL); 
	return 0;

case WM_COMMAND:
	if(LOWORD(wParam) == 1) 
	{ 
		PlaySound(&quot;sound1&quot;, hwnd, SND_RESOURCE);  
	}  
	return 0;

case WM_DESTROY: 
    PostQuitMessage (0); 
    return 0; 
} 

return DefWindowProc (hwnd, message, wParam, lParam); 
}
</code></pre>
<p>die .rc datei:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;

sound1 WAVE C:\WINDOWS\Media\chord.wav;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/705099</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/705099</guid><dc:creator><![CDATA[friesenjung21]]></dc:creator><pubDate>Mon, 24 Jan 2005 21:16:10 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Mon, 24 Jan 2005 21:23:41 GMT]]></title><description><![CDATA[<p>MSDN schrieb:</p>
<blockquote>
<p>SND_RESOURCE</p>
<p>The pszSound parameter is a resource identifier; hmod must identify the instance that contains the resource.</p>
</blockquote>
<p>Wie und was da angegeben werden muß, habe ich oben bereits damals beschrieben...<br />
...oder wie war das noch: wer lesen kann ist klar im vorteil...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/705104</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/705104</guid><dc:creator><![CDATA[MichaM. (MiC++ha)]]></dc:creator><pubDate>Mon, 24 Jan 2005 21:23:41 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Mon, 24 Jan 2005 21:25:26 GMT]]></title><description><![CDATA[<p>Guck in die MSDN, da sind die Parameter beschrieben. Oder google nach Beispielen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/705105</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/705105</guid><dc:creator><![CDATA[großartiger tipp]]></dc:creator><pubDate>Mon, 24 Jan 2005 21:25:26 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Tue, 25 Jan 2005 19:04:13 GMT]]></title><description><![CDATA[<p>Sorry,<br />
bei oben angegebenen Code,<br />
wüsste ich nur hI oder hwnd als zweiten parameter anzugeben.<br />
Geht aber nicht - ist also falsch.<br />
Die MSDN hatte ich schon vorher gelesen.<br />
Björn</p>
]]></description><link>https://www.c-plusplus.net/forum/post/705911</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/705911</guid><dc:creator><![CDATA[friesenjung]]></dc:creator><pubDate>Tue, 25 Jan 2005 19:04:13 GMT</pubDate></item><item><title><![CDATA[Reply to Soundsdatei abspielen (ohne Sounddatei zur Laufzeit)? on Tue, 25 Jan 2005 19:40:02 GMT]]></title><description><![CDATA[<p>MiC++ha schrieb:</p>
<blockquote>
<pre><code class="language-cpp">#include &quot;windows.h&quot;    
#include &quot;mmsystem.h&quot;  // PlaySound();
//....
PlaySound(&quot;MYSOUND&quot;, HANDLE(HInstance), SND_RESOURCE); // spiel es Sam
//....
</code></pre>
</blockquote>
<p>vergess aber nicht in den Projekt Option die Resourcen Datei in die Kompliation mit ein zu beziehen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/705951</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/705951</guid><dc:creator><![CDATA[MichaM.]]></dc:creator><pubDate>Tue, 25 Jan 2005 19:40:02 GMT</pubDate></item></channel></rss>