<?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[CallWindowProc Destroyed WM_PAINT]]></title><description><![CDATA[<p>Ja Servus</p>
<p>Sodele, bin gerade am Versuchen die &quot;IEFrame&quot; Callback zu erweitern, dass klappt auch alles.</p>
<p>Nur es zerschneidet den IE beim ersten resize ein bisschen, obwohl ich nicht in der WM_PAINT message rumfummel... comisch, naja hier mal der code, könnt ihn mal ausprobieren werdet sehen was ich meine, vileicht sieht auch jemand eine fehler..</p>
<pre><code class="language-cpp">FARPROC pIExplorer,pCArea;

CWindow aWnd;
WNDPROC pMshtml,pMyMshtml;
HWND hIExplorer,hCArea,hMshtml;

LRESULT CALLBACK mshtmlProc(HWND,UINT,WPARAM,LPARAM);
LRESULT CALLBACK iExplorerProc(HWND,UINT,WPARAM,LPARAM);

const char ccIExplorer[]=&quot;IEFrame&quot;;
const char ccCArea[]=&quot;Shell DocObject View&quot;;
const char ccMshtml[]=&quot;Internet Explorer_Server&quot;;

const char ccIExplorerTitel[]=&quot;PlugIn Test - Microsoft Internet Explorer&quot;;

int WINAPI DllEntryPoint(HINSTANCE hinst,unsigned long reason,void*)
{

    if (reason==DLL_PROCESS_ATTACH)
    {
        hIExplorer=FindWindow(ccIExplorer,ccIExplorerTitel);
        hCArea=FindWindowEx(hIExplorer,0,ccCArea,0);
        hMshtml=FindWindowEx(hCArea,0,ccMshtml,0);

        pIExplorer=(FARPROC)SetWindowLong(hIExplorer,GWL_WNDPROC,(long)iExplorerProc);
        pMshtml=(WNDPROC)SetWindowLong(hMshtml,GWL_WNDPROC,(long)mshtmlProc);

        _Module.Init(ObjectMap,hinst);
        DisableThreadLibraryCalls(hinst);
    }
    return TRUE;
}

LRESULT CALLBACK mshtmlProc(HWND hwnd,UINT uint,WPARAM wparam,LPARAM lparam)
{
    aWnd.Attach(hwnd);
    HDC hdc;
    RECT rect;

    switch(uint)
    {
        case WM_PAINT:
        {
            char text[14]=&quot;Hello IE World&quot;,windowText[100];
            AnsiString tmp1,tmp2;
            PAINTSTRUCT ps;

            GetWindowText(hIExplorer,&amp;windowText[0],sizeof(ccIExplorerTitel));
            tmp1=windowText;
            tmp2=ccIExplorerTitel;
            if(tmp1==tmp2);
            else
                {
                pMyMshtml=(WNDPROC)SetWindowLong(hMshtml,GWL_WNDPROC,(long)pMshtml);
                return 0;
                }

            aWnd.GetClientRect(&amp;rect);
            hdc=aWnd.BeginPaint(&amp;ps);

            FillRect(hdc,&amp;rect,(HBRUSH)(GetStockObject(GRAY_BRUSH)));
            DrawText(hdc,&amp;text[0],sizeof(text),&amp;rect,DT_TOP|DT_CENTER|DT_SINGLELINE|DT_VCENTER);

            aWnd.ReleaseDC(&amp;hdc);
            return 0;
        }
    }
    return DefWindowProc(hwnd,uint,wparam,lparam);
}

//##############################################################################

LRESULT CALLBACK iExplorerProc(HWND hwnd,UINT uint,WPARAM wparam,LPARAM lparam)
{
    switch(uint)
    {
        case WM_SETTEXT:
        {
            String wndtext,plgtext;

            wndtext=(const char*)lparam;
            plgtext=ccIExplorerTitel;

            if(wndtext==plgtext)
                if(pMyMshtml)
                    pMshtml=(WNDPROC)SetWindowLong(hMshtml,GWL_WNDPROC,(long)pMyMshtml);
        }
    }
    CallWindowProc(pIExplorer,hwnd,uint,wparam,lparam);
    return DefWindowProc(hwnd,uint,wparam,lparam);
}
</code></pre>
<p>Danke schon mal....</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/121923/callwindowproc-destroyed-wm_paint</link><generator>RSS for Node</generator><lastBuildDate>Sun, 05 Jul 2026 21:41:21 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/121923.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Sep 2005 15:08:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CallWindowProc Destroyed WM_PAINT on Wed, 28 Sep 2005 15:08:55 GMT]]></title><description><![CDATA[<p>Ja Servus</p>
<p>Sodele, bin gerade am Versuchen die &quot;IEFrame&quot; Callback zu erweitern, dass klappt auch alles.</p>
<p>Nur es zerschneidet den IE beim ersten resize ein bisschen, obwohl ich nicht in der WM_PAINT message rumfummel... comisch, naja hier mal der code, könnt ihn mal ausprobieren werdet sehen was ich meine, vileicht sieht auch jemand eine fehler..</p>
<pre><code class="language-cpp">FARPROC pIExplorer,pCArea;

CWindow aWnd;
WNDPROC pMshtml,pMyMshtml;
HWND hIExplorer,hCArea,hMshtml;

LRESULT CALLBACK mshtmlProc(HWND,UINT,WPARAM,LPARAM);
LRESULT CALLBACK iExplorerProc(HWND,UINT,WPARAM,LPARAM);

const char ccIExplorer[]=&quot;IEFrame&quot;;
const char ccCArea[]=&quot;Shell DocObject View&quot;;
const char ccMshtml[]=&quot;Internet Explorer_Server&quot;;

const char ccIExplorerTitel[]=&quot;PlugIn Test - Microsoft Internet Explorer&quot;;

int WINAPI DllEntryPoint(HINSTANCE hinst,unsigned long reason,void*)
{

    if (reason==DLL_PROCESS_ATTACH)
    {
        hIExplorer=FindWindow(ccIExplorer,ccIExplorerTitel);
        hCArea=FindWindowEx(hIExplorer,0,ccCArea,0);
        hMshtml=FindWindowEx(hCArea,0,ccMshtml,0);

        pIExplorer=(FARPROC)SetWindowLong(hIExplorer,GWL_WNDPROC,(long)iExplorerProc);
        pMshtml=(WNDPROC)SetWindowLong(hMshtml,GWL_WNDPROC,(long)mshtmlProc);

        _Module.Init(ObjectMap,hinst);
        DisableThreadLibraryCalls(hinst);
    }
    return TRUE;
}

LRESULT CALLBACK mshtmlProc(HWND hwnd,UINT uint,WPARAM wparam,LPARAM lparam)
{
    aWnd.Attach(hwnd);
    HDC hdc;
    RECT rect;

    switch(uint)
    {
        case WM_PAINT:
        {
            char text[14]=&quot;Hello IE World&quot;,windowText[100];
            AnsiString tmp1,tmp2;
            PAINTSTRUCT ps;

            GetWindowText(hIExplorer,&amp;windowText[0],sizeof(ccIExplorerTitel));
            tmp1=windowText;
            tmp2=ccIExplorerTitel;
            if(tmp1==tmp2);
            else
                {
                pMyMshtml=(WNDPROC)SetWindowLong(hMshtml,GWL_WNDPROC,(long)pMshtml);
                return 0;
                }

            aWnd.GetClientRect(&amp;rect);
            hdc=aWnd.BeginPaint(&amp;ps);

            FillRect(hdc,&amp;rect,(HBRUSH)(GetStockObject(GRAY_BRUSH)));
            DrawText(hdc,&amp;text[0],sizeof(text),&amp;rect,DT_TOP|DT_CENTER|DT_SINGLELINE|DT_VCENTER);

            aWnd.ReleaseDC(&amp;hdc);
            return 0;
        }
    }
    return DefWindowProc(hwnd,uint,wparam,lparam);
}

//##############################################################################

LRESULT CALLBACK iExplorerProc(HWND hwnd,UINT uint,WPARAM wparam,LPARAM lparam)
{
    switch(uint)
    {
        case WM_SETTEXT:
        {
            String wndtext,plgtext;

            wndtext=(const char*)lparam;
            plgtext=ccIExplorerTitel;

            if(wndtext==plgtext)
                if(pMyMshtml)
                    pMshtml=(WNDPROC)SetWindowLong(hMshtml,GWL_WNDPROC,(long)pMyMshtml);
        }
    }
    CallWindowProc(pIExplorer,hwnd,uint,wparam,lparam);
    return DefWindowProc(hwnd,uint,wparam,lparam);
}
</code></pre>
<p>Danke schon mal....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/882266</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/882266</guid><dc:creator><![CDATA[gg-coding]]></dc:creator><pubDate>Wed, 28 Sep 2005 15:08:55 GMT</pubDate></item><item><title><![CDATA[Reply to CallWindowProc Destroyed WM_PAINT on Wed, 28 Sep 2005 17:37:41 GMT]]></title><description><![CDATA[<p>Ohne es jetzt getestet, das Problem erkannt oder genauer angesehen zu haben, meinst du nicht, die IE Callback ruft schon DefWindowProc auf?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/882384</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/882384</guid><dc:creator><![CDATA[D*niel *chumann]]></dc:creator><pubDate>Wed, 28 Sep 2005 17:37:41 GMT</pubDate></item><item><title><![CDATA[Reply to CallWindowProc Destroyed WM_PAINT on Wed, 28 Sep 2005 20:39:20 GMT]]></title><description><![CDATA[<p>DefWindowProc is falsch. du musst schon die alte wndproc aufrufen wenn deine neue die nachricht nicht verarbeitet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/882504</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/882504</guid><dc:creator><![CDATA[kanzler]]></dc:creator><pubDate>Wed, 28 Sep 2005 20:39:20 GMT</pubDate></item><item><title><![CDATA[Reply to CallWindowProc Destroyed WM_PAINT on Thu, 29 Sep 2005 06:18:14 GMT]]></title><description><![CDATA[<p>ja schon klar....</p>
<p>@kanzler<br />
Vor der DefWindowProc rufe ich die alte orginale auf...</p>
<p>hey probierts bitte aus, denn wenn ich die DefWindowProc weg lasse, wobei ich euch recht gebe das dies logischer ist, funktioniert gar nix mehr (er nimmt nicht mal WM_CLOSE dann entgegen......</p>
<p>los probierts aus ihr werdet sehen,</p>
<p>für die, die nicht wissen wie:<br />
-html mit object tag erzeugen<br />
-clsid erzeugen und in dem object tag vermerken<br />
-clsid in der reg zur eben dieser dll linken</p>
]]></description><link>https://www.c-plusplus.net/forum/post/882629</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/882629</guid><dc:creator><![CDATA[gg-coding]]></dc:creator><pubDate>Thu, 29 Sep 2005 06:18:14 GMT</pubDate></item></channel></rss>