<?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[HWND CreatePopupmenu()]]></title><description><![CDATA[<p>Hallo!<br />
Wie weise ich meinem neuen mit HWND CreatePopupMenu(VOID) erstellten Popup-Menü ein Handle zu. Bei MSDN heißt es, wenn die o.g. Funktion erfolgreich ist, wird das Handle von dieser returnt. Das verstehe ich nicht ganz. Könnte mir das jemand erklären/Syntax posten?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/62156/hwnd-createpopupmenu</link><generator>RSS for Node</generator><lastBuildDate>Wed, 03 Jun 2026 22:44:21 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/62156.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 20 Jan 2004 18:07:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to HWND CreatePopupmenu() on Tue, 20 Jan 2004 18:07:11 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Wie weise ich meinem neuen mit HWND CreatePopupMenu(VOID) erstellten Popup-Menü ein Handle zu. Bei MSDN heißt es, wenn die o.g. Funktion erfolgreich ist, wird das Handle von dieser returnt. Das verstehe ich nicht ganz. Könnte mir das jemand erklären/Syntax posten?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/440653</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/440653</guid><dc:creator><![CDATA[Sheny]]></dc:creator><pubDate>Tue, 20 Jan 2004 18:07:11 GMT</pubDate></item><item><title><![CDATA[Reply to HWND CreatePopupmenu() on Tue, 20 Jan 2004 19:36:20 GMT]]></title><description><![CDATA[<p>CreatePopupMenu(); hab ich jetzt selbst geschafft. Nun frage ich mich wo ich TrackPopupMenuEx(hmenu,TPM_CENTERALIGN,10,10,hwnd,NULL); unterbringe...<br />
Das kleine Programm:<br />
#include &lt;windows.h&gt;<br />
#include &lt;winuser.h&gt;</p>
<p>LRESULT CALLBACK WindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)<br />
{<br />
HDC hdc;<br />
RECT rect;<br />
HMENU hmenu;<br />
const char sztext[] = &quot;TestTestTestTestTestTest&quot;;</p>
<p>switch(message)<br />
{<br />
case WM_CREATE:{<br />
{HMENU CreatePopupMenu(hmenu);}<br />
}<br />
case WM_MOVE:<br />
{<br />
hdc = GetDC(hwnd);<br />
GetClientRect(hwnd, &amp;rect);<br />
TextOut(hdc, rect.right/2 -85, rect.bottom/2 -10,<br />
sztext, strlen(sztext));<br />
ReleaseDC(hwnd, hdc);</p>
<p>return(0);<br />
}break;<br />
case WM_DESTROY:<br />
{<br />
PostQuitMessage(0);<br />
return(0);<br />
}break;<br />
default:break;<br />
}<br />
return(DefWindowProc(hwnd, message, wparam, lparam));</p>
<p>}</p>
<p>int WINAPI WinMain(HINSTANCE hinst, HINSTANCE hprevinst,<br />
LPSTR lpcmdline, int ncmdshow)<br />
{<br />
WNDCLASSEX winclass;<br />
HWND hwnd;<br />
MSG message;<br />
const char szclassname[] = &quot;klasse1&quot;;</p>
<p>winclass.cbSize = sizeof(WNDCLASSEX);<br />
winclass.style = CS_HREDRAW | CS_VREDRAW;<br />
winclass.lpfnWndProc = WindowProc;<br />
winclass.cbClsExtra = 0;<br />
winclass.cbWndExtra = 0;<br />
winclass.hInstance = hinst;<br />
winclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);<br />
winclass.hCursor = LoadCursor(NULL, IDC_ARROW);<br />
winclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);<br />
winclass.lpszMenuName = NULL;<br />
winclass.lpszClassName = szclassname;<br />
winclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);<br />
if(!RegisterClassEx(&amp;winclass))<br />
{ return 0; }<br />
if(!(hwnd = CreateWindowEx(NULL,<br />
szclassname,<br />
&quot;TestTestTest&quot;,<br />
WS_OVERLAPPEDWINDOW | WS_VISIBLE,<br />
300,300,<br />
400,300,<br />
NULL,<br />
NULL,<br />
hinst,<br />
NULL)))<br />
{<br />
return 0;<br />
}<br />
ShowWindow(hwnd, ncmdshow);<br />
UpdateWindow(hwnd);</p>
<p>while(GetMessage(&amp;message,NULL,0,0)==TRUE)<br />
{<br />
if(message.message == WM_QUIT)<br />
{<br />
break; }<br />
TranslateMessage(&amp;message);<br />
DispatchMessage(&amp;message);<br />
}</p>
<p>return message.wParam;<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/440721</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/440721</guid><dc:creator><![CDATA[Sheny]]></dc:creator><pubDate>Tue, 20 Jan 2004 19:36:20 GMT</pubDate></item></channel></rss>