<?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[Win32 Console, kurze Hilfe bitte, sehr einfach]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>Hab hier folgenden code:</p>
<p>main.cpp</p>
<pre><code class="language-cpp">#include &lt;afxwin.h&gt;
#include &quot;menuIDs.h&quot;

class CMenuWindow : public CFrameWnd {
public:
	CMenuWindow();
	~CMenuWindow();
	afx_msg void OnPaint();
	afx_msg void OnExit();
	afx_msg void OnAbout();
	afx_msg void OnColor(UINT);
private:
	int color;
	DECLARE_MESSAGE_MAP()
};

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

CMenuWindow::CMenuWindow() {
	Create(NULL, &quot;Menu Options&quot;, WS_OVERLAPPEDWINDOW, CRect(100,100,500,500), NULL, &quot;Example&quot; );
	color = 0;
}

CMenuWindow::~CMenuWindow() { }

afx_msg void CMenuWindow::OnExit() {
	MessageBox(&quot;Good-bye&quot;, &quot;Big Al&quot;);
	SendMessage( WM_CLOSE );
}

afx_msg void CMenuWindow::OnAbout() {
	MessageBox(&quot;Roll Tide!&quot;, &quot;Alabama&quot;);
}

afx_msg void CMenuWindow::OnColor(UINT e) {
	switch (e) {
		case IDM_GREEN: color = 1; break;
		case IDM_BLUE: color = 2; break;
		case IDM_RED: color = 3; break;
		case IDM_BLACK: color = 4; break;
		case IDM_WHITE: color = 5; break;
	    case IDM_PURPLE: color = 6; break;
	}
	InvalidateRect(NULL, false);
}

afx_msg void CMenuWindow::OnPaint() {
	CPaintDC dc(this);
	CBrush brush;
	switch (color) {
		case 1: brush.CreateSolidBrush( RGB(0, 255, 0) ); break;
		case 2: brush.CreateSolidBrush( RGB(0, 0, 255) ); break;
		case 3: brush.CreateSolidBrush( RGB(255, 0, 0) ); break;
		case 4: brush.CreateSolidBrush( RGB(0, 0, 0) ); break;
		case 5: brush.CreateSolidBrush( RGB(255,255,255) ); break;
		case 6: brush.CreateSolidBrush( RGB(87,5,25) ); break;
	}
	dc.SelectObject( &amp;brush );
	CRect rect;
	GetClientRect ( &amp;rect );
	dc.Rectangle( rect );
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN_MESSAGE_MAP (CMenuWindow, CFrameWnd)
	ON_COMMAND(IDM_ABOUT, OnAbout)
	ON_COMMAND(IDM_EXIT, OnExit)
	ON_COMMAND_RANGE(IDM_GREEN, IDM_WHITE, OnColor)
	ON_WM_PAINT()
END_MESSAGE_MAP()

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

class CMenuApp : public CWinApp {
public:
	BOOL InitInstance() {
		m_pMainWnd = new CMenuWindow();
		m_pMainWnd-&gt;ShowWindow(m_nCmdShow);
		m_pMainWnd-&gt;UpdateWindow();
		return TRUE;
	}
} menuApp;
</code></pre>
<p>menuIDs.h:</p>
<pre><code class="language-cpp">#define IDM_ABOUT	2000
#define IDM_EXIT	2001
#define IDM_GREEN	2101
#define IDM_BLUE	2102
#define IDM_RED		2103
#define IDM_BLACK	2104
#define IDM_WHITE	2105
#define IDM_PURPLE	2106
</code></pre>
<p>menu.rc:</p>
<pre><code class="language-cpp">#include &lt;afxres.h&gt;
#include &quot;menuIDs.h&quot;

Example MENU
{
	POPUP &quot;File&quot;
	{
		MENUITEM &quot;About&quot;, IDM_ABOUT
		MENUITEM &quot;Exit&quot;, IDM_EXIT
	}
	POPUP &quot;Colors&quot;
	{
		MENUITEM &quot;Green&quot;, IDM_GREEN
		MENUITEM &quot;Blue&quot;, IDM_BLUE
		MENUITEM &quot;Red&quot;, IDM_RED
		MENUITEM &quot;Black&quot;, IDM_BLACK
		MENUITEM &quot;White&quot;, IDM_WHITE
	}
}
</code></pre>
<p>Weiss einer wie ich das jetzt nen bisschen aubaue? Also ich will nen paar neue Menu Eintraege, oder Schaltflaechen die dann irgendwas machen, muss nichts grosses sein. Koennte ich vielleicht nen Mneuepunt integrieren der nen Bild oder ne Internetseite laed, oder irgendwas anderes?<br />
Also ihr koennt eurer Phantasie da freien lauf lassen, blos nichts all zu kompliziertes.<br />
Ach ja ich hab ja schon versucht purple einzufuegen, wieso kann ich da nich draufklicken?</p>
<p>Daniel</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/145394/win32-console-kurze-hilfe-bitte-sehr-einfach</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 02:13:31 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/145394.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 27 Apr 2006 14:29:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Win32 Console, kurze Hilfe bitte, sehr einfach on Thu, 27 Apr 2006 14:29:56 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>Hab hier folgenden code:</p>
<p>main.cpp</p>
<pre><code class="language-cpp">#include &lt;afxwin.h&gt;
#include &quot;menuIDs.h&quot;

class CMenuWindow : public CFrameWnd {
public:
	CMenuWindow();
	~CMenuWindow();
	afx_msg void OnPaint();
	afx_msg void OnExit();
	afx_msg void OnAbout();
	afx_msg void OnColor(UINT);
private:
	int color;
	DECLARE_MESSAGE_MAP()
};

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

CMenuWindow::CMenuWindow() {
	Create(NULL, &quot;Menu Options&quot;, WS_OVERLAPPEDWINDOW, CRect(100,100,500,500), NULL, &quot;Example&quot; );
	color = 0;
}

CMenuWindow::~CMenuWindow() { }

afx_msg void CMenuWindow::OnExit() {
	MessageBox(&quot;Good-bye&quot;, &quot;Big Al&quot;);
	SendMessage( WM_CLOSE );
}

afx_msg void CMenuWindow::OnAbout() {
	MessageBox(&quot;Roll Tide!&quot;, &quot;Alabama&quot;);
}

afx_msg void CMenuWindow::OnColor(UINT e) {
	switch (e) {
		case IDM_GREEN: color = 1; break;
		case IDM_BLUE: color = 2; break;
		case IDM_RED: color = 3; break;
		case IDM_BLACK: color = 4; break;
		case IDM_WHITE: color = 5; break;
	    case IDM_PURPLE: color = 6; break;
	}
	InvalidateRect(NULL, false);
}

afx_msg void CMenuWindow::OnPaint() {
	CPaintDC dc(this);
	CBrush brush;
	switch (color) {
		case 1: brush.CreateSolidBrush( RGB(0, 255, 0) ); break;
		case 2: brush.CreateSolidBrush( RGB(0, 0, 255) ); break;
		case 3: brush.CreateSolidBrush( RGB(255, 0, 0) ); break;
		case 4: brush.CreateSolidBrush( RGB(0, 0, 0) ); break;
		case 5: brush.CreateSolidBrush( RGB(255,255,255) ); break;
		case 6: brush.CreateSolidBrush( RGB(87,5,25) ); break;
	}
	dc.SelectObject( &amp;brush );
	CRect rect;
	GetClientRect ( &amp;rect );
	dc.Rectangle( rect );
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN_MESSAGE_MAP (CMenuWindow, CFrameWnd)
	ON_COMMAND(IDM_ABOUT, OnAbout)
	ON_COMMAND(IDM_EXIT, OnExit)
	ON_COMMAND_RANGE(IDM_GREEN, IDM_WHITE, OnColor)
	ON_WM_PAINT()
END_MESSAGE_MAP()

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

class CMenuApp : public CWinApp {
public:
	BOOL InitInstance() {
		m_pMainWnd = new CMenuWindow();
		m_pMainWnd-&gt;ShowWindow(m_nCmdShow);
		m_pMainWnd-&gt;UpdateWindow();
		return TRUE;
	}
} menuApp;
</code></pre>
<p>menuIDs.h:</p>
<pre><code class="language-cpp">#define IDM_ABOUT	2000
#define IDM_EXIT	2001
#define IDM_GREEN	2101
#define IDM_BLUE	2102
#define IDM_RED		2103
#define IDM_BLACK	2104
#define IDM_WHITE	2105
#define IDM_PURPLE	2106
</code></pre>
<p>menu.rc:</p>
<pre><code class="language-cpp">#include &lt;afxres.h&gt;
#include &quot;menuIDs.h&quot;

Example MENU
{
	POPUP &quot;File&quot;
	{
		MENUITEM &quot;About&quot;, IDM_ABOUT
		MENUITEM &quot;Exit&quot;, IDM_EXIT
	}
	POPUP &quot;Colors&quot;
	{
		MENUITEM &quot;Green&quot;, IDM_GREEN
		MENUITEM &quot;Blue&quot;, IDM_BLUE
		MENUITEM &quot;Red&quot;, IDM_RED
		MENUITEM &quot;Black&quot;, IDM_BLACK
		MENUITEM &quot;White&quot;, IDM_WHITE
	}
}
</code></pre>
<p>Weiss einer wie ich das jetzt nen bisschen aubaue? Also ich will nen paar neue Menu Eintraege, oder Schaltflaechen die dann irgendwas machen, muss nichts grosses sein. Koennte ich vielleicht nen Mneuepunt integrieren der nen Bild oder ne Internetseite laed, oder irgendwas anderes?<br />
Also ihr koennt eurer Phantasie da freien lauf lassen, blos nichts all zu kompliziertes.<br />
Ach ja ich hab ja schon versucht purple einzufuegen, wieso kann ich da nich draufklicken?</p>
<p>Daniel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1046419</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1046419</guid><dc:creator><![CDATA[Endurance]]></dc:creator><pubDate>Thu, 27 Apr 2006 14:29:56 GMT</pubDate></item><item><title><![CDATA[Reply to Win32 Console, kurze Hilfe bitte, sehr einfach on Thu, 27 Apr 2006 14:47:31 GMT]]></title><description><![CDATA[<p>Endurance schrieb:</p>
<blockquote>
<p>Also ich will nen paar neue Menu Eintraege, oder Schaltflaechen die dann irgendwas machen, muss nichts grosses sein. Koennte ich vielleicht nen Mneuepunt integrieren der nen Bild oder ne Internetseite laed, oder irgendwas anderes?</p>
</blockquote>
<p>Und das verstehst du unter &quot;kurze Hilfe, sehr einfach&quot;? <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>
<p>Es wird sicher hier keiner Lust haben, dein Programm einfach mal so auszuschmücken, vor allem weil du ja nicht einmal genau weißt was du willst. Also überleg dir erst einmal was du machen willst, dann setz dich hin und probier es, und wenn du dann Fragen hast, dann poste hier (wenn du in diversen Hilfen/Tutorials/Google nichts finden kannst) <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>
<p>Gruß Brainiac</p>
<p>PS: Außerdem bist du im falschen Forum, das ist MFC (und nicht Win32 Console wie du im Titel schreibst)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1046437</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1046437</guid><dc:creator><![CDATA[Brainiac]]></dc:creator><pubDate>Thu, 27 Apr 2006 14:47:31 GMT</pubDate></item><item><title><![CDATA[Reply to Win32 Console, kurze Hilfe bitte, sehr einfach on Thu, 27 Apr 2006 14:47:49 GMT]]></title><description><![CDATA[<blockquote>
<p>Ach ja ich hab ja schon versucht purple einzufuegen, wieso kann ich da nich draufklicken?</p>
</blockquote>
<p>Das waere zB eine spezielle Frage die ich hab. Purple erscheint im Menu, aber es ist nicht fett, also nichts verlinkt, wieso nich?</p>
<p>Daniel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1046438</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1046438</guid><dc:creator><![CDATA[Endurance]]></dc:creator><pubDate>Thu, 27 Apr 2006 14:47:49 GMT</pubDate></item><item><title><![CDATA[Reply to Win32 Console, kurze Hilfe bitte, sehr einfach on Thu, 27 Apr 2006 14:51:57 GMT]]></title><description><![CDATA[<p>Purple hat sich schon erledigt, hab ich gerade rausgefunden.</p>
<p>Nehmen wir mal an ich erstelle einen neuen Menupunkt, &quot;Picture&quot;, wie kann ich ein bild zu dem Menupunkt verlinken? Oder, nach welchen Stichwoertern muesste ich da bei google suchen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1046441</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1046441</guid><dc:creator><![CDATA[Endurance]]></dc:creator><pubDate>Thu, 27 Apr 2006 14:51:57 GMT</pubDate></item><item><title><![CDATA[Reply to Win32 Console, kurze Hilfe bitte, sehr einfach on Fri, 28 Apr 2006 09:05:28 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=1" rel="nofollow">MFC (Visual C++)</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/1046924</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1046924</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Fri, 28 Apr 2006 09:05:28 GMT</pubDate></item></channel></rss>