<?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[Eigene GUI elemente]]></title><description><![CDATA[<p>Hab zwar den Thread schon im Spieleform erstellt, aber dort kommen keine Antworten.<br />
Ich will für ein Spiel meine eigenen Buttons, Listboxen, Edit-Felder usw. erstellen.<br />
Hab z.Bsp. ein Bitmap als Button, welcher beim anclicken einen neuen Dialog öffnet.<br />
Kann man das Bitmap irgendwie als eigenes Fenster behandeln, also mit eigener<br />
WNDPROC?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/98779/eigene-gui-elemente</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 00:50:31 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/98779.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 22 Jan 2005 14:03:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Eigene GUI elemente on Sat, 22 Jan 2005 14:03:54 GMT]]></title><description><![CDATA[<p>Hab zwar den Thread schon im Spieleform erstellt, aber dort kommen keine Antworten.<br />
Ich will für ein Spiel meine eigenen Buttons, Listboxen, Edit-Felder usw. erstellen.<br />
Hab z.Bsp. ein Bitmap als Button, welcher beim anclicken einen neuen Dialog öffnet.<br />
Kann man das Bitmap irgendwie als eigenes Fenster behandeln, also mit eigener<br />
WNDPROC?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/703147</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703147</guid><dc:creator><![CDATA[INTEGER]]></dc:creator><pubDate>Sat, 22 Jan 2005 14:03:54 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene GUI elemente on Sat, 22 Jan 2005 14:36:41 GMT]]></title><description><![CDATA[<p>Umgekehrt wird ein Schuh draus.<br />
Du erstellst dir für deinen Button ein eigene Klasse und dann damit ein ChildWindow.</p>
<p>In seiner WM_PAINT Procedure zeichnest du dann stattdessen deine Bitmap.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/703178</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703178</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 22 Jan 2005 14:36:41 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene GUI elemente on Sat, 22 Jan 2005 15:58:42 GMT]]></title><description><![CDATA[<p>Die Idee hat ich auch schon, aber wie soll die Klasse aussehen?</p>
<p>Hab schon eine CreateWindow-Funktion, aber beim Regestrieren der Fensterklasse<br />
muss ich die WinProc angeben.<br />
Ich hab sie zwar als Memberfunktion, doch es kommt immer ein Fehler wegen der Typumwandlung.</p>
<p>error C2440: '=': 'WNDPROC (__thiscall mGUI::* )(HINSTANCE,HINSTANCE,LPSTR,int)' kann nicht in 'WNDPROC' konvertiert werden</p>
]]></description><link>https://www.c-plusplus.net/forum/post/703277</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703277</guid><dc:creator><![CDATA[integer(nicht eingeloggt)]]></dc:creator><pubDate>Sat, 22 Jan 2005 15:58:42 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene GUI elemente on Sat, 22 Jan 2005 16:01:11 GMT]]></title><description><![CDATA[<p>Wenn du sie als Memberfunktion machst, dann muss sie static sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/703281</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703281</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Sat, 22 Jan 2005 16:01:11 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene GUI elemente on Sat, 22 Jan 2005 16:25:37 GMT]]></title><description><![CDATA[<p>Funktioniert irgendwie nicht.<br />
Der Code:</p>
<pre><code class="language-cpp">#pragma once
#include &lt;windows.h&gt;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

class mGUI
{
public:
	mGUI(void);
	~mGUI(void);
	HWND m_hWnd;
	bool Create(DWORD dwExStyle,LPCTSTR lpLabel, DWORD Style,
				int x, int y, int nWidth, int nHeight, HWND hWndParent,HMENU hMenu,HINSTANCE hInstance, LPVOID lpParam );
	WNDCLASSEX winc;
	bool Register(UINT style,
    WNDPROC lpfnWndProc,
    int cbClsExtra,
    int cbWndExtra,
    HINSTANCE hInstance,
    HICON hIcon,
    HCURSOR hCursor,
    HBRUSH hbrBackground,
    LPCTSTR lpszMenuName,
    LPCTSTR lpszClassName,
    HICON hIconSm);
	static LRESULT CALLBACK WinProc(HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int cmndshow);
};
</code></pre>
<pre><code class="language-cpp">#include &quot;.\mgui.h&quot;

mGUI::mGUI(void)
{
}

mGUI::~mGUI(void)
{
}

bool mGUI::Create(DWORD dwExStyle,LPCTSTR lpLabel, DWORD Style,
				int x, int y, int nWidth, int nHeight, HWND hWndParent,HMENU hMenu,HINSTANCE hInstance, LPVOID lpParam)
{
	CreateWindowEx(dwExStyle,winc.lpszClassName,lpLabel,Style,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam);

	return true;
}

bool mGUI::Register(
    UINT style,
    WNDPROC lpfnWndProc,
    int cbClsExtra,
    int cbWndExtra,
    HINSTANCE hInstance,
    HICON hIcon,
    HCURSOR hCursor,
    HBRUSH hbrBackground,
    LPCTSTR lpszMenuName,
    LPCTSTR lpszClassName,
    HICON hIconSm
)
{
	winc.cbSize=sizeof(WNDCLASSEX);
	winc.style	= style;
	winc.cbClsExtra	= cbClsExtra;
	winc.cbWndExtra	= cbWndExtra;
	winc.lpfnWndProc	= WinProc;
	winc.hInstance	= hInstance;
	winc.hIcon	= hIcon;
	winc.hCursor	= hCursor;
	winc.hbrBackground	=hbrBackground;
	winc.lpszMenuName	= lpszMenuName;
	winc.lpszClassName	= lpszClassName;
	winc.hIconSm		= hIconSm;
	return true;
}

LRESULT CALLBACK mGUI::WinProc(HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int cmndshow)
{
	return LRESULT();
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/703307</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703307</guid><dc:creator><![CDATA[INTEGER]]></dc:creator><pubDate>Sat, 22 Jan 2005 16:25:37 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene GUI elemente on Sat, 22 Jan 2005 16:27:28 GMT]]></title><description><![CDATA[<p>Der Fehler?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/703310</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703310</guid><dc:creator><![CDATA[.....]]></dc:creator><pubDate>Sat, 22 Jan 2005 16:27:28 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene GUI elemente on Sat, 22 Jan 2005 16:36:36 GMT]]></title><description><![CDATA[<p>Steht doch oben. Die Funktion WinProc wird nicht von der WNDCLASSEX angenommen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/703318</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703318</guid><dc:creator><![CDATA[INTEGER]]></dc:creator><pubDate>Sat, 22 Jan 2005 16:36:36 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene GUI elemente on Sat, 22 Jan 2005 16:44:13 GMT]]></title><description><![CDATA[<p>INTEGER schrieb:</p>
<blockquote>
<p>Steht doch oben. Die Funktion WinProc wird nicht von der WNDCLASSEX angenommen.</p>
</blockquote>
<p>Na kein Wunder, ist ja auch nicht vom selben Funktionstyp. Du weist der WndProc von WNDCLASSEX eine Funktion zu die bis zum Namen eine WndProc ist und eine Parameterliste wie die WinMain hat...</p>
<p>Schau dir das nochmal genau in der MSDN an <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>MfG SideWinder</p>
]]></description><link>https://www.c-plusplus.net/forum/post/703327</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703327</guid><dc:creator><![CDATA[SideWinder]]></dc:creator><pubDate>Sat, 22 Jan 2005 16:44:13 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene GUI elemente on Sat, 22 Jan 2005 17:21:21 GMT]]></title><description><![CDATA[<p>Stimmt, hab garnicht gemerkt, dass die Parameter total falsch sind.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/703344</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703344</guid><dc:creator><![CDATA[INTEGER]]></dc:creator><pubDate>Sat, 22 Jan 2005 17:21:21 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene GUI elemente on Sat, 22 Jan 2005 23:04:54 GMT]]></title><description><![CDATA[<blockquote>
<p>LRESULT CALLBACK mGUI::WinProc(HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int cmndshow)<br />
{<br />
return LRESULT();<br />
}</p>
</blockquote>
<pre><code class="language-cpp">WinProc(HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int cmndshow) 
{ 
    return LRESULT(); 
}
</code></pre>
<p>ohne Klassenname.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/703557</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703557</guid><dc:creator><![CDATA[der toni]]></dc:creator><pubDate>Sat, 22 Jan 2005 23:04:54 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene GUI elemente on Sat, 22 Jan 2005 23:48:22 GMT]]></title><description><![CDATA[<p>@Der_Toni<br />
wenn du schon was berichtigst, dann bitte richtig.<br />
Deine Codevorgabe ist der gleiche Scheiß in Lila getupft, halt ohne Klassenbezug, und <strong>ohne</strong> Rückgabe Bezeichnung der Funktion.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/703570</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703570</guid><dc:creator><![CDATA[Dönnerspieß]]></dc:creator><pubDate>Sat, 22 Jan 2005 23:48:22 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene GUI elemente on Sun, 23 Jan 2005 12:36:21 GMT]]></title><description><![CDATA[<blockquote>
<p>halt ohne Klassenbezug</p>
</blockquote>
<p>Jip, so sollte es sein.</p>
<blockquote>
<p>und ohne Rückgabe Bezeichnung der Funktion.</p>
</blockquote>
<p>Hatte ich leider vergessen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/703754</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703754</guid><dc:creator><![CDATA[der toni]]></dc:creator><pubDate>Sun, 23 Jan 2005 12:36:21 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene GUI elemente on Sun, 23 Jan 2005 12:36:58 GMT]]></title><description><![CDATA[<p>Hm, ich glaube ich hatte das mit &quot;friend&quot; verwechselt. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/703755</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703755</guid><dc:creator><![CDATA[der toni]]></dc:creator><pubDate>Sun, 23 Jan 2005 12:36:58 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene GUI elemente on Sun, 23 Jan 2005 13:11:15 GMT]]></title><description><![CDATA[<p>Die Rede ist immer noch von den Parametern der WNDPROC.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/703784</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/703784</guid><dc:creator><![CDATA[Dönnerspieß]]></dc:creator><pubDate>Sun, 23 Jan 2005 13:11:15 GMT</pubDate></item></channel></rss>