<?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[Transperent]]></title><description><![CDATA[<p>Wie macht man ein einfaches win_api fenster Transperent ???</p>
<p>ich wuste das mal und hab auch schon mal im inet gegoogelt aber find nix !!!</p>
<p>nur so superkomplizirte sachen ... ich weis das das mit 2 functionen ging die man in der &quot;main&quot; einfach reinbauen muss <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p><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="😕"
    /> <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/topic/205726/transperent</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 11:37:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/205726.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 17 Feb 2008 12:31:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Transperent on Sun, 17 Feb 2008 12:31:49 GMT]]></title><description><![CDATA[<p>Wie macht man ein einfaches win_api fenster Transperent ???</p>
<p>ich wuste das mal und hab auch schon mal im inet gegoogelt aber find nix !!!</p>
<p>nur so superkomplizirte sachen ... ich weis das das mit 2 functionen ging die man in der &quot;main&quot; einfach reinbauen muss <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p><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="😕"
    /> <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/1457497</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1457497</guid><dc:creator><![CDATA[pofix]]></dc:creator><pubDate>Sun, 17 Feb 2008 12:31:49 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Sun, 17 Feb 2008 12:45:07 GMT]]></title><description><![CDATA[<p><a href="http://www.google.de/custom?domains=www.c-plusplus.net&amp;q=transparent&amp;sa=Suchen&amp;sitesearch=www.c-plusplus.net&amp;client=pub-3727475938645712&amp;forid=1&amp;channel=7016866653&amp;ie=ISO-8859-1&amp;oe=ISO-8859-1&amp;cof=GALT%3A%23006699%3BGL%3A1%3BDIV%3A%23006699%3BVLC%3ADD6900%3BAH%3Acenter%3BBGC%3AEAEDF4%3BLBGC%3AEAEDF4%3BALC%3ADD6900%3BLC%3ADD6900%3BT%3A000000%3BGFNT%3A006699%3BGIMP%3A006699%3BLH%3A114%3BLW%3A642%3BL%3Ahttp%3A%2F%2Fwww.c-plusplus.net%2Fcms%2Fimages%2Flogo.gif%3BS%3Ahttp%3A%2F%2Fwww.c-plusplus.net%2Fforum%3BFORID%3A1%3B&amp;hl=de" rel="nofollow">SuFu hilft</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1457502</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1457502</guid><dc:creator><![CDATA[rean]]></dc:creator><pubDate>Sun, 17 Feb 2008 12:45:07 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Sun, 17 Feb 2008 13:09:58 GMT]]></title><description><![CDATA[<p>schön hab ich ja schon aber ich will kein text oder nen bitmap transperentmachen sondern nur dieses stumpfe fenster !!!</p>
<p>und über SetLayeredWindowAttributes() finde ich nix geascheites !!!</p>
<p>min.5 FUNCTION KONNTEN DAS ERMÖGLICHEN !!!</p>
<p>ich brauche kein ganzen code dafür <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="👎"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1457514</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1457514</guid><dc:creator><![CDATA[pofix]]></dc:creator><pubDate>Sun, 17 Feb 2008 13:09:58 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Sun, 17 Feb 2008 13:24:16 GMT]]></title><description><![CDATA[<p>Einmal SetLayeredWindowAttributes bei Google eingetippt und das hier kommt als erstes Ergebnis -&gt; <a href="http://msdn2.microsoft.com/en-us/library/ms633540.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/ms633540.aspx</a><br />
Also, wenn das nicht hilft, dann hilft gar nix. <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1457523</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1457523</guid><dc:creator><![CDATA[ChristianK]]></dc:creator><pubDate>Sun, 17 Feb 2008 13:24:16 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Sun, 17 Feb 2008 19:57:09 GMT]]></title><description><![CDATA[<p>so schön und gut aber jetzt will zickt meine &quot; setLayeredWindowAttributes &quot;</p>
<p>setLayeredWindowAttributes(hwnd, 0, 255, 2);</p>
<p>ICH ARBEITE MIT DEV C++ und meine fehlermeldung:</p>
<pre><code>62 C:\Dev-Cpp\main.cpp `setLayeredWindowAttributes' undeclared (first use this function)
</code></pre>
<p>und so siht der code aus: <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<pre><code>#include &lt;Windows.h&gt;

/*  Declare Windows procedure  */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);

/*  Make the class name into a global variable  */
char szClassName[ ] = &quot;WindowsApp&quot;;

int WINAPI WinMain (HINSTANCE hThisInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpszArgument,
                    int nFunsterStil)

{
    HWND hwnd;               /* This is the handle for our window */
    MSG messages;            /* Here messages to the application are saved */
    WNDCLASSEX wincl;        /* Data structure for the windowclass */

    /* The Window structure */
    wincl.hInstance = hThisInstance;
    wincl.lpszClassName = szClassName;
    wincl.lpfnWndProc = WindowProcedure;      /* This function is called by windows */
    wincl.style = CS_DBLCLKS;                 /* Catch double-clicks */
    wincl.cbSize = sizeof (WNDCLASSEX);

    /* Use default icon and mouse-pointer */
    wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
    wincl.lpszMenuName = NULL;                 /* No menu */
    wincl.cbClsExtra = 0;                      /* No extra bytes after the window class */
    wincl.cbWndExtra = 0;                      /* structure or the window instance */
    /* Use Windows's default color as the background of the window */
    wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;

    /* Register the window class, and if it fails quit the program */
    if (!RegisterClassEx (&amp;wincl))
        return 0;

    /* The class is registered, let's create the program*/
    hwnd = CreateWindowEx (
           0,                   /* Extended possibilites for variation */
           szClassName,         /* Classname */
           &quot;Windows App&quot;,       /* Title Text */
           WS_OVERLAPPEDWINDOW, /* default window */
           CW_USEDEFAULT,       /* Windows decides the position */
           CW_USEDEFAULT,       /* where the window ends up on the screen */
           544,                 /* The programs width */
           375,                 /* and height in pixels */
           HWND_DESKTOP,        /* The window is a child-window to desktop */
           NULL,                /* No menu */
           hThisInstance,       /* Program Instance handler */
           NULL                 /* No Window Creation data */
           );

    /* Make the window visible on the screen */
    ShowWindow (hwnd, nFunsterStil);
   setLayeredWindowAttributes(hwnd, 0, 255, 2);

    /* Run the message loop. It will run until GetMessage() returns 0 */
    while (GetMessage (&amp;messages, NULL, 0, 0))
    {
        /* Translate virtual-key messages into character messages */
        TranslateMessage(&amp;messages);
        /* Send message to WindowProcedure */
        DispatchMessage(&amp;messages);
    }

    /* The program return-value is 0 - The value that PostQuitMessage() gave */
    return messages.wParam;

}

/*  This function is called by the Windows function DispatchMessage()  */

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)                  /* handle the messages */
    {
        case WM_DESTROY:
            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */
            break;
        default:                      /* for messages that we don't deal with */
            return DefWindowProc (hwnd, message, wParam, lParam);
    }

    return 0;
}

BOOL SetLayeredWindowAttributes(      
    HWND hwnd,
    COLORREF crKey,
    BYTE bAlpha,
    DWORD dwFlags
);
</code></pre>
<p>PS: ja ich hab den linker libuser32.a drin !</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1457792</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1457792</guid><dc:creator><![CDATA[pofix]]></dc:creator><pubDate>Sun, 17 Feb 2008 19:57:09 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Sun, 17 Feb 2008 21:33:02 GMT]]></title><description><![CDATA[<p>ja meister dann such mal weiter bei google <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>da wirst du relativ schnell auf codeproject kommen, wo du lesen wirst, dass es keine funktions-deklaration für SetLayeredWindowAttributes gibt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /><br />
also wirst du dir einen pointer zu der funktion aus der entsprechnenden USER32.DLL suchen müssen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>aber weil ich mitleid mit dir und deiner inkompetenz, die sufu und google zu benutzen, hab, gebe ich dir ein paar hints...</p>
<p>du brauchst folgende konstanten</p>
<pre><code class="language-cpp">#define WS_EX_LAYERED           0x00080000
#define LWA_COLORKEY            0x00000001
#define LWA_ALPHA               0x00000002
</code></pre>
<p>und zum holen der funktion</p>
<pre><code>GetModuleHandle
</code></pre>
<p>sowie</p>
<pre><code>GetProcAddress
</code></pre>
<p>dazu findest du garantiert etwas in der MSDN und bei google;)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1457841</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1457841</guid><dc:creator><![CDATA[hey]]></dc:creator><pubDate>Sun, 17 Feb 2008 21:33:02 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Sun, 17 Feb 2008 21:34:36 GMT]]></title><description><![CDATA[<p>sorry für doppel post, hab mir gerade deinen code angesehen... es sollte selbstverständlich sein, dass man funktionen definiert, BEVOR man sie aufruft, und dann auch mit richtigem Namen anspricht ... tipp: s != S</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1457843</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1457843</guid><dc:creator><![CDATA[hey]]></dc:creator><pubDate>Sun, 17 Feb 2008 21:34:36 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Mon, 18 Feb 2008 06:00:33 GMT]]></title><description><![CDATA[<p>also ich hab das dingen jetzt mal</p>
<pre><code class="language-cpp">#define setLayeredWindowAttributes
</code></pre>
<p>und</p>
<p>setLayeredWindowAttributes(hwnd, 0, 255,0);</p>
<p>gegeben , jetzt tus der code aber es wird nicht transperent ... ps: ich bin noch anfänger hab ich vergessen zu erwähnen :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1457955</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1457955</guid><dc:creator><![CDATA[pofix]]></dc:creator><pubDate>Mon, 18 Feb 2008 06:00:33 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Mon, 18 Feb 2008 08:23:09 GMT]]></title><description><![CDATA[<p>Sorry, aber hast du auch Ahnung was du <strong>ueberhaupt</strong> machst?</p>
<pre><code class="language-cpp">#define setLayeredWindowAttributes
</code></pre>
<p>Das laesst alle Vorkommen von setLayeredWindowAttributes durch <strong>nichts</strong> ersetzen. Logisch, das da <strong>nichts</strong> passiert oder?<br />
Wenn du Posts auch mal (genauer) lesen wuerdest, haettest du gesehen, dass man dich schon darauf gestossen hat, dass die Funktion SetLayeredWindowAttributes und nicht setLayeredWindowAttributes heisst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1457985</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1457985</guid><dc:creator><![CDATA[DeSoVoDaMu]]></dc:creator><pubDate>Mon, 18 Feb 2008 08:23:09 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Mon, 18 Feb 2008 09:36:07 GMT]]></title><description><![CDATA[<p>Verwende zuerst mal einen sinnvollen Compiler/IDE, der auch die Funktionen kennt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1458022</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1458022</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Mon, 18 Feb 2008 09:36:07 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Mon, 18 Feb 2008 18:25:44 GMT]]></title><description><![CDATA[<p>BOOL setLayeredWindowAttributes(<br />
HWND hwnd,<br />
COLORREF crKey,<br />
BYTE bAlpha,<br />
DWORD dwFlags<br />
);</p>
<p>FEHLER:</p>
<p>5 C:\Dev-Cpp\main.cpp expected <code>)' before &quot;hwnd&quot; 5 C:\\Dev-Cpp\\main.cpp expected</code>,' or `;' before &quot;hwnd&quot;</p>
<p><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="🙄"
    /> sorry das ich mich so blöd anstelle aber was jetzt ???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1458371</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1458371</guid><dc:creator><![CDATA[Pofix]]></dc:creator><pubDate>Mon, 18 Feb 2008 18:25:44 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Mon, 18 Feb 2008 18:35:28 GMT]]></title><description><![CDATA[<p>Copy&amp;Paste <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /></p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;

LRESULT WINAPI messageProcess(HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
	WNDCLASS windowClass = { };

	windowClass.lpfnWndProc = messageProcess;
	windowClass.hCursor = LoadCursor(0, IDC_ARROW); 
	windowClass.hbrBackground = CreateSolidBrush(RGB(0, 0, 0));
    windowClass.lpszClassName = &quot;Main&quot;;

	RegisterClass(&amp;windowClass);

	HWND windowHandle = CreateWindowEx(WS_EX_LAYERED, &quot;Main&quot;, &quot;Test&quot;, WS_POPUP | WS_VISIBLE, 100, 100, 500, 500, 0, 0, 0, 0);

	SetLayeredWindowAttributes(windowHandle, 0, 150, LWA_ALPHA);

	MSG message = { };
	while(GetMessage(&amp;message, 0, 0, 0))
    {
		TranslateMessage(&amp;message);
		DispatchMessage(&amp;message);
    }
}

LRESULT WINAPI messageProcess(HWND windowHandle, UINT message, WPARAM wParam, LPARAM lParam) 
{
	switch(message)
	{
	case WM_LBUTTONDOWN:
		SendMessage(windowHandle, WM_NCLBUTTONDOWN, HTCAPTION, 0);
		break;
	case WM_DESTROY:
		PostQuitMessage(0);
	}

	return DefWindowProc(windowHandle, message, wParam, lParam);
}
</code></pre>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1458377</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1458377</guid><dc:creator><![CDATA[ceplusplus@loggedoff]]></dc:creator><pubDate>Mon, 18 Feb 2008 18:35:28 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Mon, 18 Feb 2008 18:50:34 GMT]]></title><description><![CDATA[<p>komisch ey irgentiwe ist das nicht das gelbe von ei !!</p>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>TUTS NICHT :</p>
<p>19 C:\Dev-Cpp\main.cpp `LWA_ALPHA' undeclared (first use this function)</p>
<p>19 C:\Dev-Cpp\main.cpp `SetLayeredWindowAttributes' undeclared (first use this function)</p>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> bor ey meine ****** was mach ich den falsch ????<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1458388</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1458388</guid><dc:creator><![CDATA[pofix]]></dc:creator><pubDate>Mon, 18 Feb 2008 18:50:34 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Mon, 18 Feb 2008 19:08:21 GMT]]></title><description><![CDATA[<p>pofix schrieb:</p>
<blockquote>
<p>bor ey meine ****** was mach ich den falsch ????<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
</blockquote>
<p>ganz einfach: du liest nicht richtig bzw. liest überhaupt nicht und blendest vor deinem auge mancha posts einfach aus. ich hab dir doch bereits geschrieben, was du brauchst. wenn er LWA_ALPHA nicht kennt - dann musst du es eben selbst definieren. und diesen code habe ich dir bereits gepastet -.-<br />
und wenn er SetLayeredWindowAttributes nicht kennt, dann musst du entweder erstmal nen SDK update machen oder versuchen, dir die Adresse der Funktion aus der user32.dll zu holen - dazu hab ich dir bereits auch hints gegeben.<br />
augen auf und rtfm <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1458404</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1458404</guid><dc:creator><![CDATA[hey]]></dc:creator><pubDate>Mon, 18 Feb 2008 19:08:21 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Mon, 18 Feb 2008 19:09:49 GMT]]></title><description><![CDATA[<p>Hast du das aktuelle PSDK? Wenn nein dann siehe den ersten (angepinnten) Post hier im WinApi Forum.</p>
<p>schirrmie</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1458407</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1458407</guid><dc:creator><![CDATA[schirrmie]]></dc:creator><pubDate>Mon, 18 Feb 2008 19:09:49 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Tue, 19 Feb 2008 03:23:58 GMT]]></title><description><![CDATA[<p>Damit wirst du etwas glücklicher:</p>
<p><a href="http://www.microsoft.com/express/download/#webInstall" rel="nofollow">http://www.microsoft.com/express/download/#webInstall</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1458550</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1458550</guid><dc:creator><![CDATA[ceplusplus@loggedoff]]></dc:creator><pubDate>Tue, 19 Feb 2008 03:23:58 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Tue, 19 Feb 2008 06:12:27 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> so ich hab das teil jetzt gerade gebogen aber nun ein link error</p>
<p>[Linker error] undefined reference to `SetLayeredWindowAttributes(HWND__*, unsigned long, unsigned char, unsigned long)'</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1458556</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1458556</guid><dc:creator><![CDATA[pofix]]></dc:creator><pubDate>Tue, 19 Feb 2008 06:12:27 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Tue, 19 Feb 2008 09:07:22 GMT]]></title><description><![CDATA[<p>user32.lib linken</p>
<p>(langsam beginne ich TGGC immer besser zu verstehen...)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1458624</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1458624</guid><dc:creator><![CDATA[DeSoVoDaMu]]></dc:creator><pubDate>Tue, 19 Feb 2008 09:07:22 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Tue, 19 Feb 2008 09:26:40 GMT]]></title><description><![CDATA[<p>Hey @ll.</p>
<p>Ich habe folgendes:</p>
<pre><code>HWND sendButton,
     myWnd;
#define bmSend 1
LPARAM lParam;
HICON sendIcon
</code></pre>
<pre><code class="language-cpp">sendButton = CreateWindowEx( WS_EX_TRANSPARENT, &quot;BUTTON&quot;, &quot;Senden&quot;, BS_ICON | BS_FLAT | WS_CHILD | WS_VISIBLE, 250, 245, 100, 25, myWnd, (HMENU)bmSend, ((LPCREATESTRUCT)lParam)-&gt;hInstance, NULL );
</code></pre>
<p>Sieht ganz schön schlecht aus, also will ich nen Icon drauflegen</p>
<pre><code class="language-cpp">if( 0 != sendButton )
    SendMessage( sendButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)sendIcon );
</code></pre>
<p>Ist OK, aber den übergebliebenen bereich vom Button, würde ich gerne Transparent machen.</p>
<p>brauche ich dazu unbedingt</p>
<pre><code class="language-cpp">CreateWindowEx(WS_EX_LAYERED,...);
</code></pre>
<p>denn wenn ich das dahinschreibe geht es nach dem create in die else von</p>
<pre><code>#define F04 err[3]
</code></pre>
<pre><code class="language-cpp">if( 0 != sendButton )
{
    SendMessage( sendButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)sendIcon );
    if( 0 == SetLayeredWindowAttributes( sendButton, 0, 255, 2 ) )
        printf( &quot;%d\n&quot;, GetLastError() );
}
else
{
    MessageBox( NULL, F04, appTitle, MB_ICONERROR | MB_SETFOREGROUND );
    endProg = true;
}
</code></pre>
<p>err[3] ist eine Fehlermeldung.</p>
<p>Warum das ganze... Ich schreibe eine GUI für eine Konsolenanwendung, und die ist eigentlich fertig, aber da ich eh gerne sowas wissen würde und es ewig brauchen werde, dachte ich ich teste es an diesem Tool mal.</p>
<p>Ahso,<br />
warum ich überhaupt poste: consolenausgabe ist &quot;87&quot; was &quot;The parameter is incorrect.&quot; entspricht...<br />
Ich habe mir gedacht das liegt an &quot;Set<strong>Layered</strong>WindowAttributes&quot; weil ich ja im CreateWindowEx nicht einen Layered style verwende ?!</p>
<p>Kann mir da auch wer helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1458634</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1458634</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Tue, 19 Feb 2008 09:26:40 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Tue, 19 Feb 2008 14:39:50 GMT]]></title><description><![CDATA[<p><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/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> ICH HAB DES RÄTELS LÖSUNG :</p>
<pre><code class="language-cpp">WindowTransparency (hwnd,220);
</code></pre>
<p>!!!</p>
<pre><code class="language-cpp">#include &lt;Windows.h&gt;

typedef BOOL (WINAPI TRNZ)
(
    HWND hwnd,
    COLORREF crKey,
    BYTE bAlpha,
    DWORD dwFlags
);

typedef TRNZ* TRANSPARENCY;

BOOL WindowTransparency ( HWND hwnd, BYTE bAlpha )
{
	HINSTANCE    hCommonDLL;
	TRANSPARENCY WndTrcy;

	if ( NULL == ( hCommonDLL = LoadLibrary ( &quot;user32.dll&quot; ) ) )
	{
		return false;
	}

	WndTrcy = ( TRANSPARENCY ) GetProcAddress ( hCommonDLL, &quot;SetLayeredWindowAttributes&quot; );

	SetWindowLong ( hwnd, (-20), 
              GetWindowLong ( hwnd, (-20) ) | 0x80000 );

	WndTrcy ( hwnd, RGB( 255, 255, 255 ), bAlpha, 2 ); 

	return true;
}

/*  Declare Windows procedure  */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);

/*  Make the class name into a global variable  */
char szClassName[ ] = &quot;WindowsApp&quot;;

int WINAPI WinMain (HINSTANCE hThisInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpszArgument,
                    int nFunsterStil)

{
    HWND hwnd;               /* This is the handle for our window */
    MSG messages;            /* Here messages to the application are saved */
    WNDCLASSEX wincl;        /* Data structure for the windowclass */

    /* The Window structure */
    wincl.hInstance = hThisInstance;
    wincl.lpszClassName = szClassName;
    wincl.lpfnWndProc = WindowProcedure;      /* This function is called by windows */
    wincl.style = CS_DBLCLKS;                 /* Catch double-clicks */
    wincl.cbSize = sizeof (WNDCLASSEX);

    /* Use default icon and mouse-pointer */
    wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
    wincl.lpszMenuName = NULL;                 /* No menu */
    wincl.cbClsExtra = 0;                      /* No extra bytes after the window class */
    wincl.cbWndExtra = 0;                      /* structure or the window instance */
    /* Use Windows's default color as the background of the window */
    wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;

    /* Register the window class, and if it fails quit the program */
    if (!RegisterClassEx (&amp;wincl))
        return 0;

    /* The class is registered, let's create the program*/
    hwnd = CreateWindowEx (
           0,                   /* Extended possibilites for variation */
           szClassName,         /* Classname */
           &quot;Windows App&quot;,       /* Title Text */
           WS_OVERLAPPEDWINDOW, /* default window */
           CW_USEDEFAULT,       /* Windows decides the position */
           CW_USEDEFAULT,       /* where the window ends up on the screen */
           544,                 /* The programs width */
           375,                 /* and height in pixels */
           HWND_DESKTOP,        /* The window is a child-window to desktop */
           NULL,                /* No menu */
           hThisInstance,       /* Program Instance handler */
           NULL                 /* No Window Creation data */
           );

    /* Make the window visible on the screen */
    ShowWindow (hwnd, nFunsterStil);

    WindowTransparency (hwnd,220);

    /* Run the message loop. It will run until GetMessage() returns 0 */
    while (GetMessage (&amp;messages, NULL, 0, 0))
    {
        /* Translate virtual-key messages into character messages */
        TranslateMessage(&amp;messages);
        /* Send message to WindowProcedure */
        DispatchMessage(&amp;messages);
    }

    /* The program return-value is 0 - The value that PostQuitMessage() gave */
    return messages.wParam;

}

/*  This function is called by the Windows function DispatchMessage()  */

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)                  /* handle the messages */
    {
        case WM_DESTROY:
            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */
            break;
        default:                      /* for messages that we don't deal with */
            return DefWindowProc (hwnd, message, wParam, lParam);
    }

    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1458909</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1458909</guid><dc:creator><![CDATA[pofix]]></dc:creator><pubDate>Tue, 19 Feb 2008 14:39:50 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Tue, 19 Feb 2008 15:32:19 GMT]]></title><description><![CDATA[<p>Troll <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1458937</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1458937</guid><dc:creator><![CDATA[Popoklopfer]]></dc:creator><pubDate>Tue, 19 Feb 2008 15:32:19 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Tue, 19 Feb 2008 15:49:30 GMT]]></title><description><![CDATA[<p>Popoklopfer schrieb:</p>
<blockquote>
<p>Troll <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>
</blockquote>
<p>an die wand mit ihm <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="🙄"
    /> <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="👎"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1458949</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1458949</guid><dc:creator><![CDATA[hey]]></dc:creator><pubDate>Tue, 19 Feb 2008 15:49:30 GMT</pubDate></item><item><title><![CDATA[Reply to Transperent on Wed, 20 Feb 2008 07:44:24 GMT]]></title><description><![CDATA[<p>Bist du Dieter Nuhr? Neh dafür war der eigentlich zu schlecht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";-)"
      alt="😉"
    /></p>
<p>Hatte schon gehofft, aber naja...</p>
<p>Gibbet da ehrlich nichts?? Ich mein wie wird das mit jedem normalen button gemacht?</p>
<p>In PHP reichts wenn ich nen Bild drauflege was in Transparent verläuft, ok man kann immernoch in den transparenten bereich klicken, aber das könnte man ja in WinAPI abfragen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1459224</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1459224</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Wed, 20 Feb 2008 07:44:24 GMT</pubDate></item></channel></rss>