<?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[Dialogfeld mit Banner]]></title><description><![CDATA[<p>hi</p>
<p>Hoffe es kann mir jemand weiterhelfen.<br />
Ich möchte einen Banner in ein Dialogfeld einfügen.<br />
Wer ICQ kennt; bei dem Programm kann man oben auch Werbung in Form eines Banners sehen. Das Dialogfeld soll ein Startmenü werden und der Banner auf dem Webspace aktualisiert werden, und somit auch im Startmenü. Mit anderen Worten, es soll einfach ein Link zur URL des Banners geschaffen werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/43893/dialogfeld-mit-banner</link><generator>RSS for Node</generator><lastBuildDate>Sat, 25 Apr 2026 02:31:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/43893.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 25 Jul 2003 15:13:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dialogfeld mit Banner on Fri, 25 Jul 2003 15:13:26 GMT]]></title><description><![CDATA[<p>hi</p>
<p>Hoffe es kann mir jemand weiterhelfen.<br />
Ich möchte einen Banner in ein Dialogfeld einfügen.<br />
Wer ICQ kennt; bei dem Programm kann man oben auch Werbung in Form eines Banners sehen. Das Dialogfeld soll ein Startmenü werden und der Banner auf dem Webspace aktualisiert werden, und somit auch im Startmenü. Mit anderen Worten, es soll einfach ein Link zur URL des Banners geschaffen werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/317638</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/317638</guid><dc:creator><![CDATA[gynec]]></dc:creator><pubDate>Fri, 25 Jul 2003 15:13:26 GMT</pubDate></item><item><title><![CDATA[Reply to Dialogfeld mit Banner on Fri, 25 Jul 2003 15:57:01 GMT]]></title><description><![CDATA[<p><a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39123&amp;highlight=bild+internet" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic.php?t=39123&amp;highlight=bild+internet</a></p>
<p>und dann halt aufs dialogfeld blitten</p>
]]></description><link>https://www.c-plusplus.net/forum/post/317670</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/317670</guid><dc:creator><![CDATA[newvet]]></dc:creator><pubDate>Fri, 25 Jul 2003 15:57:01 GMT</pubDate></item><item><title><![CDATA[Reply to Dialogfeld mit Banner on Fri, 25 Jul 2003 16:41:11 GMT]]></title><description><![CDATA[<p>puh ich dachte man könnte mir ne einfache Erklärung geben<br />
bin jetzt auch kein Profi.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/317701</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/317701</guid><dc:creator><![CDATA[gynec]]></dc:creator><pubDate>Fri, 25 Jul 2003 16:41:11 GMT</pubDate></item><item><title><![CDATA[Reply to Dialogfeld mit Banner on Fri, 25 Jul 2003 17:21:04 GMT]]></title><description><![CDATA[<p>Also ich hab mal die obere Funktion in deinem Link ausprobiert:</p>
<pre><code class="language-cpp">#include &lt;afxinet.h&gt; 

#define SUCCESS 0 
#define INVALID_PATH 1 
#define ACCESS_DENIED 2 
#define DISK_FULL 3 
#define INVALID_URL 4 
#define FILE_NOT_FOUND 5 

int GetPicFromHTTP(CString strURL, CString strPathToSaveTo) 
{ 
    DWORD dwBuffer = 256; 
    if(!InternetCanonicalizeUrl(strURL,strURL.GetBuffer(256), &amp;dwBuffer,0)) 
    { 
        strURL.ReleaseBuffer(); 
        return INVALID_URL; 
    } 
    strURL.ReleaseBuffer(); 
    CString strTmpURL = strURL; 
    strTmpURL.MakeLower(); 
    if(strTmpURL.Find(&quot;http://&quot;)!=-1) 
        strURL.Delete(0,7); 
    CInternetSession INetSession; 
    CHttpConnection *HTTPConn=NULL; 
    CHttpFile *HTTPFile=NULL; 
    TRY 
    { 
        HTTPConn=INetSession.GetHttpConnection(strURL.Mid(0,strURL.Find(&quot;/&quot;))); 
        strURL.Delete(0,strURL.Find(&quot;/&quot;)+1); 
        HTTPFile = HTTPConn-&gt;OpenRequest(CHttpConnection::HTTP_VERB_GET,strURL); 
        HTTPFile-&gt;SendRequest(); 
    } 
    CATCH(CInternetException, pEx) 
    { 
        HTTPFile-&gt;Close(); 
        HTTPConn-&gt;Close(); 
        INetSession.Close(); 
        delete HTTPFile; 
        delete HTTPConn; 
        return FILE_NOT_FOUND; 
    } 
    END_CATCH 

    CString strMime; 
    HttpFile-&gt;QueryInfo(HTTP_QUERY_CONTENT_TYPE, strMime); 
    if(strMime.Find(&quot;html&quot;)!=-1) 
    { 
        HttpFile-&gt;Close(); 
        HttpConn-&gt;Close(); 
        INetSession.Close(); 
        delete HTTPFile; 
        delete HTTPConn; 
        return FILE_NOT_FOUND; 
    } 

    CFile *pFile; 
    if(strPathToSaveTo.Right(1)!='\\') 
        strPathToSaveTo+=&quot;\\&quot;;     
    TRY 
    { 
        pFile = new CFile(strPathToSaveTo+strURL.Right(strURL.GetLength()-strURL.ReverseFind('/')), CFile::modeCreate | CFile::modeWrite); 
    } 
    CATCH(CFileException, pEx) 
    { 
        HTTPFile-&gt;Close(); 
        HTTPConn-&gt;Close(); 
        INetSession.Close(); 
        delete HTTPFile; 
        delete HTTPConn; 
        if(pEx-&gt;m_cause == CFileException::badPath) 
            return INVALID_PATH; 
        if(pEx-&gt;m_cause == CFileException::accessDenied) 
            return ACCESS_DENIED; 
        if(pEx-&gt;m_cause == CFileException::diskFull) 
            return DISK_FULL; 
    } 
    END_CATCH 

    char *chBuffer = new char[5*1024+1]; 
    int nRead = 0; 
    while((nRead = HTTPFile-&gt;Read(chBuffer, 5*1024))) 
    { 
        chBuffer[nRead] = '\0'; 
        pFile-&gt;Write(chBuffer,nRead); 
    } 
    HTTPFile-&gt;Close(); 
    HTTPConn-&gt;Close(); 
    INetSession.Close(); 
    delete HTTPFile; 
    delete HTTPConn; 
    delete[] chBuffer; 
    CString strBuffer; 
    pFile-&gt;Close(); 
    pFile-&gt;Open(strPathToSaveTo+strURL.Right(strURL.GetLength()-strURL.ReverseFind('/')),CFile::modeRead); 
    pFile-&gt;Read(strBuffer.GetBuffer(pFile-&gt;GetLength()), pFile-&gt;GetLength()); 
    pFile-&gt;Close(); 
    strBuffer.ReleaseBuffer(); 
    strBuffer.MakeLower(); 
    delete pFile; 
    return SUCCESS; 
}
</code></pre>
<p>Hab auch wie er gesagt hat die Wininet.lib eingebunden.<br />
Trotzdem zeigt er bei mir die Fehlermeldung<br />
LINK : fatal error LNK1104: Datei &quot;nafxcwd.lib&quot; kann nicht geoeffnet werden<br />
Was zur Hölle...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/317732</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/317732</guid><dc:creator><![CDATA[gynec]]></dc:creator><pubDate>Fri, 25 Jul 2003 17:21:04 GMT</pubDate></item><item><title><![CDATA[Reply to Dialogfeld mit Banner on Fri, 25 Jul 2003 17:46:20 GMT]]></title><description><![CDATA[<p>1. Funktion hinzufügen (die fehler ausbessern (HTTP statt Http)</p>
<p>2. Ganz oben in die selbe Datei:</p>
<pre><code class="language-cpp">#include &lt;afxinet.h&gt;  
#pragma comment (lib,&quot;Wininet.lib&quot;)
#define SUCCESS 0  
#define INVALID_PATH 1  
#define ACCESS_DENIED 2  
#define DISK_FULL 3  
#define INVALID_URL 4  
#define FILE_NOT_FOUND 5
</code></pre>
<p>3. Irgendwo (bei button klick oder so) die Funktion aufrufen</p>
<pre><code class="language-cpp">GetPicFromHTTP(&quot;http://www.newvet.de.vu/test.bmp&quot;,&quot;C:\\&quot;); //Bild aus dem Netz laden
</code></pre>
<p>4 In die OnPaint des Dialoges:</p>
<pre><code class="language-cpp">CDC dc;
	dc.CreateCompatibleDC(NULL);  //DC erstellen
	CBitmap bmp;
	HBITMAP hBitmap = (HBITMAP) ::LoadImage(AfxGetInstanceHandle(),&quot;C:\\test.bmp&quot;, IMAGE_BITMAP, 0, 0,LR_LOADFROMFILE | LR_CREATEDIBSECTION); //Bild von der Platte laden
	if (hBitmap) //Wenn bild erfolgreich geladen
	{
		bmp.Attach(hBitmap);   
		dc.SelectObject(&amp;bmp);
		GetDC()-&gt;BitBlt(0,0,200,200,&amp;dc,0,0,SRCCOPY);	 //Bild blitten
	}
</code></pre>
<p>edit: bug im forum</p>
]]></description><link>https://www.c-plusplus.net/forum/post/317747</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/317747</guid><dc:creator><![CDATA[newvet]]></dc:creator><pubDate>Fri, 25 Jul 2003 17:46:20 GMT</pubDate></item><item><title><![CDATA[Reply to Dialogfeld mit Banner on Fri, 25 Jul 2003 18:44:29 GMT]]></title><description><![CDATA[<p>Er zeigt nach dem Kompilieren zwar keine Fehlermeldung mehr an aber wenn ich das Programm starte, kommt:</p>
<p>Debug Assertion Failed!<br />
File: wingdi.cpp<br />
Line: 109</p>
]]></description><link>https://www.c-plusplus.net/forum/post/317799</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/317799</guid><dc:creator><![CDATA[gynec]]></dc:creator><pubDate>Fri, 25 Jul 2003 18:44:29 GMT</pubDate></item><item><title><![CDATA[Reply to Dialogfeld mit Banner on Sat, 26 Jul 2003 10:11:19 GMT]]></title><description><![CDATA[<p>ah ok jetzt gehts, vielen dank.<br />
habs mit nem reinen dialogfeldbasierenden projekt versucht.<br />
jetzt meine nächste frage.<br />
wie kann man es machen, dass er als erstes versucht das bmp von der url zu laden. falls das connecten mit der url nicht funktioniert, soll er auf das standard-bmp auf der platte zurückgreifen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/318032</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/318032</guid><dc:creator><![CDATA[gynec]]></dc:creator><pubDate>Sat, 26 Jul 2003 10:11:19 GMT</pubDate></item><item><title><![CDATA[Reply to Dialogfeld mit Banner on Sat, 26 Jul 2003 11:40:53 GMT]]></title><description><![CDATA[<p>Die Funktion gibt doch nen Wert zurück, prüf einfach ob er 0 ist (bild geladen) oder eben nicht (ungleich 0).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/318066</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/318066</guid><dc:creator><![CDATA[newvet]]></dc:creator><pubDate>Sat, 26 Jul 2003 11:40:53 GMT</pubDate></item></channel></rss>