<?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[DialogBox wird nicht erstellt und Fenster friert ein, wieso?]]></title><description><![CDATA[<p>hi... ich moechte eine DialogBox() erstellen doch jedes mal wenn ich sie aufrufen will via menuitem friert mir des fenster ein und es passiert nichts... was is da net richtig?</p>
<pre><code class="language-cpp">// main.cpp

    // includ

#include &lt;windows.h&gt;
#include &lt;ctime&gt;
#include &quot;test.h&quot;

    // declar

HINSTANCE hInst;
HWND hWnd;
WNDCLASS wc;
HDC hDC;
LRESULT CALLBACK WinProc( HWND, UINT, WPARAM, LPARAM );
bool    CALLBACK DiaProc( HWND, UINT, WPARAM, LPARAM );

    // initia

char szAppName[] = &quot; Testing&quot;;

#pragma hdrstop
#pragma argsused

WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
               int nCmdShow) {

    MSG msg;

    wc.style = CS_VREDRAW | CS_HREDRAW;
    wc.lpfnWndProc = WinProc;
    wc.cbClsExtra = 0;
    wc.cbWndExtra = 0;
    wc.hInstance = hInstance;
    wc.hIcon = LoadIcon( 0, IDI_APPLICATION );
    wc.hCursor = LoadCursor( 0, IDC_ARROW );
    wc.hbrBackground = (HBRUSH) GetStockObject( WHITE_BRUSH );
    wc.lpszMenuName = &quot;MYMENU&quot;;
    wc.lpszClassName = szAppName;

    if( !( RegisterClass( &amp;wc ) ) ) {

        MessageBox( 0, &quot; Couldn't register window. You need Windows NT or&quot;
                       &quot; better!&quot;, &quot; Shutdown error!&quot;, MB_OK | MB_ICONERROR );
        return 0;
    }

    hWnd = CreateWindow( szAppName, szAppName,
                         WS_OVERLAPPEDWINDOW,
                         CW_USEDEFAULT, CW_USEDEFAULT,
                         640, 480,
                         0,
                         0,
                         hInst,
                         0 );

    ShowWindow( hWnd, SW_SHOW );
    UpdateWindow( hWnd );

    while( GetMessage( &amp;msg, 0, 0, 0 ) ) {

        TranslateMessage( &amp;msg );
        DispatchMessage( &amp;msg );
    }

    return 0;
}

LRESULT CALLBACK WinProc( HWND hWnd, UINT message, WPARAM wParam,
                          LPARAM lParam ) {

    switch( message ) {

        case WM_CREATE: {

            return 0;
        }

        case WM_TIMER: {

            return 0;
        }

        case WM_SIZE: {

            return 0;
        }

        case WM_COMMAND: {

            switch( LOWORD( wParam ) ) {

                case IDM_TESTDIA: {

                    DialogBox( hInst, MAKEINTRESOURCE( IDD_MYDIALOG ), hWnd,
                               (DLGPROC)DiaProc );
                    break;
                }

                case IDM_QUIT: {

                    SendMessage( hWnd, WM_CLOSE, 0, 0 );
                    break;
                }
            }
            return 0;
        }

        case WM_PAINT: {

            return 0;
        }

        case WM_DESTROY: {

            PostQuitMessage( 0 );
            return 0;
        }
    }
    return( DefWindowProc( hWnd, message, wParam, lParam ) );
}

bool    CALLBACK DiaProc( HWND hDlg, UINT message, WPARAM wParam,
                          LPARAM lParam ) {

    switch( message ) {

        case WM_INITDIALOG: {

            return true;
        }

        case WM_COMMAND: {

            switch( LOWORD( wParam ) ) {

                case IDOK:
                case IDCANCEL: {

                    EndDialog( hDlg, 0 );
                    return true;
                }
            }
            return true;
        }
    }
    return false;
}
</code></pre>
<pre><code>// herder

#ifndef TEST_H
#define TEST_H

    #define IDM_TESTDIA                     1000
    #define IDM_QUIT                        1100
    #define IDD_MYDIALOG                    1200

#endif
</code></pre>
<pre><code>// .rc

#include &quot;test.h&quot;

IDD_MYDIALOG DIALOG DISCARDABLE 100, 100, 200, 120
STYLE DS_MODALFRAME | WS_POPUP
FONT 12, &quot;Arial&quot;
BEGIN

    DEFPUSHBUTTON &quot;O.K.&quot;, IDOK, 70, 90, 50, 15
END

MYMENU MENU
BEGIN

    POPUP &quot;&amp;File&quot;
    BEGIN

        MENUITEM &quot;Open &amp;Dialog&quot;, IDM_TESTDIA
        MENUITEM &quot;&amp;Quit&quot;, IDM_QUIT

    END

END
</code></pre>
<p>wenn ich DialogBox() in WM_CREATE rein setze funktioniert es...</p>
<p>gruß Tobi</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/173021/dialogbox-wird-nicht-erstellt-und-fenster-friert-ein-wieso</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 05:49:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/173021.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 10 Feb 2007 21:37:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sat, 10 Feb 2007 21:37:05 GMT]]></title><description><![CDATA[<p>hi... ich moechte eine DialogBox() erstellen doch jedes mal wenn ich sie aufrufen will via menuitem friert mir des fenster ein und es passiert nichts... was is da net richtig?</p>
<pre><code class="language-cpp">// main.cpp

    // includ

#include &lt;windows.h&gt;
#include &lt;ctime&gt;
#include &quot;test.h&quot;

    // declar

HINSTANCE hInst;
HWND hWnd;
WNDCLASS wc;
HDC hDC;
LRESULT CALLBACK WinProc( HWND, UINT, WPARAM, LPARAM );
bool    CALLBACK DiaProc( HWND, UINT, WPARAM, LPARAM );

    // initia

char szAppName[] = &quot; Testing&quot;;

#pragma hdrstop
#pragma argsused

WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
               int nCmdShow) {

    MSG msg;

    wc.style = CS_VREDRAW | CS_HREDRAW;
    wc.lpfnWndProc = WinProc;
    wc.cbClsExtra = 0;
    wc.cbWndExtra = 0;
    wc.hInstance = hInstance;
    wc.hIcon = LoadIcon( 0, IDI_APPLICATION );
    wc.hCursor = LoadCursor( 0, IDC_ARROW );
    wc.hbrBackground = (HBRUSH) GetStockObject( WHITE_BRUSH );
    wc.lpszMenuName = &quot;MYMENU&quot;;
    wc.lpszClassName = szAppName;

    if( !( RegisterClass( &amp;wc ) ) ) {

        MessageBox( 0, &quot; Couldn't register window. You need Windows NT or&quot;
                       &quot; better!&quot;, &quot; Shutdown error!&quot;, MB_OK | MB_ICONERROR );
        return 0;
    }

    hWnd = CreateWindow( szAppName, szAppName,
                         WS_OVERLAPPEDWINDOW,
                         CW_USEDEFAULT, CW_USEDEFAULT,
                         640, 480,
                         0,
                         0,
                         hInst,
                         0 );

    ShowWindow( hWnd, SW_SHOW );
    UpdateWindow( hWnd );

    while( GetMessage( &amp;msg, 0, 0, 0 ) ) {

        TranslateMessage( &amp;msg );
        DispatchMessage( &amp;msg );
    }

    return 0;
}

LRESULT CALLBACK WinProc( HWND hWnd, UINT message, WPARAM wParam,
                          LPARAM lParam ) {

    switch( message ) {

        case WM_CREATE: {

            return 0;
        }

        case WM_TIMER: {

            return 0;
        }

        case WM_SIZE: {

            return 0;
        }

        case WM_COMMAND: {

            switch( LOWORD( wParam ) ) {

                case IDM_TESTDIA: {

                    DialogBox( hInst, MAKEINTRESOURCE( IDD_MYDIALOG ), hWnd,
                               (DLGPROC)DiaProc );
                    break;
                }

                case IDM_QUIT: {

                    SendMessage( hWnd, WM_CLOSE, 0, 0 );
                    break;
                }
            }
            return 0;
        }

        case WM_PAINT: {

            return 0;
        }

        case WM_DESTROY: {

            PostQuitMessage( 0 );
            return 0;
        }
    }
    return( DefWindowProc( hWnd, message, wParam, lParam ) );
}

bool    CALLBACK DiaProc( HWND hDlg, UINT message, WPARAM wParam,
                          LPARAM lParam ) {

    switch( message ) {

        case WM_INITDIALOG: {

            return true;
        }

        case WM_COMMAND: {

            switch( LOWORD( wParam ) ) {

                case IDOK:
                case IDCANCEL: {

                    EndDialog( hDlg, 0 );
                    return true;
                }
            }
            return true;
        }
    }
    return false;
}
</code></pre>
<pre><code>// herder

#ifndef TEST_H
#define TEST_H

    #define IDM_TESTDIA                     1000
    #define IDM_QUIT                        1100
    #define IDD_MYDIALOG                    1200

#endif
</code></pre>
<pre><code>// .rc

#include &quot;test.h&quot;

IDD_MYDIALOG DIALOG DISCARDABLE 100, 100, 200, 120
STYLE DS_MODALFRAME | WS_POPUP
FONT 12, &quot;Arial&quot;
BEGIN

    DEFPUSHBUTTON &quot;O.K.&quot;, IDOK, 70, 90, 50, 15
END

MYMENU MENU
BEGIN

    POPUP &quot;&amp;File&quot;
    BEGIN

        MENUITEM &quot;Open &amp;Dialog&quot;, IDM_TESTDIA
        MENUITEM &quot;&amp;Quit&quot;, IDM_QUIT

    END

END
</code></pre>
<p>wenn ich DialogBox() in WM_CREATE rein setze funktioniert es...</p>
<p>gruß Tobi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226501</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226501</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Sat, 10 Feb 2007 21:37:05 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sat, 10 Feb 2007 22:45:43 GMT]]></title><description><![CDATA[<p>T0bi schrieb:</p>
<blockquote>
<pre><code class="language-cpp">DialogBox( hInst, MAKEINTRESOURCE( IDD_MYDIALOG ), hWnd,
                               (DLGPROC)DiaProc );
</code></pre>
</blockquote>
<p>Lass da mal den Cast weg, vllt fällt es Dir dann selbst auf ... <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/1226529</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226529</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sat, 10 Feb 2007 22:45:43 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 08:34:09 GMT]]></title><description><![CDATA[<p>Negativ!<br />
wenn ich (DLGPROC) weglasse erscheinen folgende Fehler:</p>
<pre><code>[C++ Error] _test.cpp(100): E2034 Cannot convert 'bool (__stdcall *)(void *,unsigned int,unsigned int,long)' to 'int (__stdcall *)()'
[C++ Error] _test.cpp(100): E2342 Type mismatch in parameter 'lpDialogFunc' (wanted 'int (__stdcall *)()', got 'bool (__stdcall *)(void *,unsigned int,unsigned int,long)')
</code></pre>
<p>also daran scheint es net zu liegen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226648</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226648</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Sun, 11 Feb 2007 08:34:09 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 10:43:55 GMT]]></title><description><![CDATA[<p>T0bi schrieb:</p>
<blockquote>
<p>Negativ!<br />
wenn ich (DLGPROC) weglasse erscheinen folgende Fehler:</p>
</blockquote>
<p>Nix &quot;Negativ!&quot;.<br />
Ist dir ein Laufzeitfehler lieber als ein Compilezeitfehler? Genau das erreichst du nämlich mit diesem Cast. Du verbietest dem Compiler die Typprüfung, also knallt's eben bei der Ausführung.</p>
<blockquote>
<p>also daran scheint es net zu liegen.</p>
</blockquote>
<p>Aua, aua. <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>
<p>Mit Casts lassen sich Compilefehler prima unterdrücken. Aber Casts sind nur ganz ganz ganz selten die richtige Lösung, um Compilefehler zu <em>beheben</em>.</p>
<p>Schau dir in der MSDN Library an, wie die Signatur der DialogProc aussehen muss.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226681</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226681</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Sun, 11 Feb 2007 10:43:55 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 12:42:36 GMT]]></title><description><![CDATA[<p>Hi T0bi! Wenn du den BCB benutzt, dann ist der Cast schon ganz richtig.</p>
<p>Was passiert, wenn deine DiaProc wie folgt aussieht?</p>
<pre><code class="language-cpp">bool CALLBACK DiaProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
{
   return false;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1226793</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226793</guid><dc:creator><![CDATA[WebFritzi]]></dc:creator><pubDate>Sun, 11 Feb 2007 12:42:36 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 12:57:30 GMT]]></title><description><![CDATA[<p>Hmm wie wäre es wenn ihr mal einfach euch anguckt wie die DLGPROC momentan definiert ist?</p>
<pre><code class="language-cpp">INT_PTR DialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
        case WM_INITDIALOG:
            return (INT_PTR)TRUE;
        default:
            break;
    }
    return (INT_PTR)FALSE;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1226813</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226813</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sun, 11 Feb 2007 12:57:30 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 13:00:28 GMT]]></title><description><![CDATA[<p>Ich glaube nicht, dass das das (3x 'das' <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="😉"
    /> ) Problem ist...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226816</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226816</guid><dc:creator><![CDATA[WebFritzi]]></dc:creator><pubDate>Sun, 11 Feb 2007 13:00:28 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 15:10:50 GMT]]></title><description><![CDATA[<p>WebFritzi schrieb:</p>
<blockquote>
<p>Hi T0bi! Wenn du den BCB benutzt, dann ist der Cast schon ganz richtig.</p>
<p>Was passiert, wenn deine DiaProc wie folgt aussieht?</p>
<pre><code class="language-cpp">bool CALLBACK DiaProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
{
   return false;
}
</code></pre>
</blockquote>
<p>dann friert mein fenster trotzdem ein ... kommisch ich hatte doch schon mal nen dialog gemacht und da bgabs auch keine probleme, bis auf das ich casten musste</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226899</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226899</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Sun, 11 Feb 2007 15:10:50 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 15:37:44 GMT]]></title><description><![CDATA[<p>WebFritzi schrieb:</p>
<blockquote>
<p>Ich glaube nicht, dass das das (3x 'das' <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="😉"
    /> ) Problem ist...</p>
</blockquote>
<p>Doch! Genau daran liegt es!</p>
<p>Mein Gott, ich geb den Hinweis, in der Hoffnung T0bi kommt selbst drauf, MFK erläutert das noch, (D)Evil gibt sogar den korrekten Code an und ihr laabert weiter son Müll. Sry, aber da fällt mir nicht mehr viel ein <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>Vermeidet doch einfach diese unsinnigen Casts. *kopfschüttel*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226913</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226913</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sun, 11 Feb 2007 15:37:44 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 15:52:45 GMT]]></title><description><![CDATA[<p>hae? *behnhof*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226921</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226921</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Sun, 11 Feb 2007 15:52:45 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 15:57:31 GMT]]></title><description><![CDATA[<p>Ist eine Blume die keine Blätter hat nur ein Grashalm?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226927</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226927</guid><dc:creator><![CDATA[samutakiro]]></dc:creator><pubDate>Sun, 11 Feb 2007 15:57:31 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 16:04:10 GMT]]></title><description><![CDATA[<p>Scheinbar haben einige mehr Info's als ich.<br />
Was passiert bei ersten Code, wenn bei &quot;eingefrorenem&quot; Fenster die ALT-Taste<br />
gedrückt wird.</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226929</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226929</guid><dc:creator><![CDATA[f.-th.]]></dc:creator><pubDate>Sun, 11 Feb 2007 16:04:10 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 16:17:00 GMT]]></title><description><![CDATA[<p>*lol* ? dann erscheint die DialogBox.... aber wieso ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226933</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226933</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Sun, 11 Feb 2007 16:17:00 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 18:00:35 GMT]]></title><description><![CDATA[<p>Schreib mal BOOL, TRUE und FALSE statt der Kleinbuchstaben und es geht auch<br />
ohne DLGPROC.</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226984</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226984</guid><dc:creator><![CDATA[f.-th.]]></dc:creator><pubDate>Sun, 11 Feb 2007 18:00:35 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 18:11:24 GMT]]></title><description><![CDATA[<p>Hmm ihr scheint ja auf einem ziemlich hohen geistigen Niveau zu sein. Vllt guckt ihr euch einfach mal meine Antwort an. Deine DialogProc muss so aussehen wie ich sie dir gepostet hab. Kannst du auch in der MSDN nachlesen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226996</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226996</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sun, 11 Feb 2007 18:11:24 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 19:32:28 GMT]]></title><description><![CDATA[<p>nein muss sie nich :P, ich hatte schon oeffters Dialoge gebastelt und sie haben bislang auch immer ohne deine möglichkeit funktioniert, doch irgendwie gehts net mehr ... -.- Borland is kaputt.</p>
<p>und es bringt auch nix wenn ich da true bool false ect klein oder groß schreibe ...grr... komisch find ichs ja des wenn das fenster gefreezed ist und ich alt druecke die DBox ershceint ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227046</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227046</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Sun, 11 Feb 2007 19:32:28 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 19:54:24 GMT]]></title><description><![CDATA[<p>Aus MSDN zu Dialogboxen:</p>
<pre><code class="language-cpp">char szItemName[80]; // receives name of item to delete. 

BOOL CALLBACK DeleteItemProc(HWND hwndDlg, 
                             UINT message, 
                             WPARAM wParam, 
                             LPARAM lParam) 
{ 
    switch (message) 
    { 
        case WM_COMMAND: 
            switch (LOWORD(wParam)) 
            { 
                case IDOK: 
                    if (!GetDlgItemText(hwndDlg, ID_ITEMNAME, szItemName, 80)) 
                         *szItemName=0; 

                    // Fall through. 

                case IDCANCEL: 
                    EndDialog(hwndDlg, wParam); 
                    return TRUE; 
            } 
    } 
    return FALSE; 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1227056</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227056</guid><dc:creator><![CDATA[f.-th.]]></dc:creator><pubDate>Sun, 11 Feb 2007 19:54:24 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 20:23:15 GMT]]></title><description><![CDATA[<p>*freufreufreu* ich habe es jetzt auch kapiert, wie das mit dem Resourcencompiler von Borland geht</p>
<p>Ich hab die Lösung: Es liegt nicht daran, daß HINSTANCE hInst; nie initialisiert wird, es liegt auch nicht an szAppName[] = &quot; Testing&quot; mit Leerzeichen.</p>
<p>Die Lösung liegt in der WinProc():</p>
<pre><code class="language-cpp">/*case WM_PAINT:
    return 0;*/
</code></pre>
<p>Der Grund: Windows sendet die PAINT-Nachricht (d.h. der Clientbereich des Hauptfensters wird für ungültig erklärt) und die Reaktion ist ein mageres return 0;. Darum &quot;friert&quot; das Fenster ein, weil der Arbeitsbereich nie wieder für gültig erklärt wird.</p>
<p>Also entweder ganz weglassen oder</p>
<pre><code class="language-cpp">case WM_PAINT:
    hdc = BeginPaint(hwnd, &amp;ps);
    EndPaint(hwnd, &amp;ps);
    return 0;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1227065</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227065</guid><dc:creator><![CDATA[keksekekse]]></dc:creator><pubDate>Sun, 11 Feb 2007 20:23:15 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 20:44:31 GMT]]></title><description><![CDATA[<p>alter ich glaub es hackt... krasse sach wie lange hasten daran jetzt getüfftel... also bei mir gehts jetzs auch, also aller herzlichsten dank fuer den TIPP des Jahr 100's <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ß und gn8 Tobi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227074</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227074</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Sun, 11 Feb 2007 20:44:31 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 20:56:15 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">BOOL CALLBACK DeleteItemProc(HWND hwndDlg,
                             UINT message,
                             WPARAM wParam,
                             LPARAM lParam)
</code></pre>
<p>Das ist auch veraltet ...</p>
<p><strong>TObi</strong><br />
Ist schon ziemlich dreist was du hier ablieferst. Solltest dir vllt nochmal überlegen was du schreibst ... man kann viele Sachen durch Casts beheben. Aber der einzigst richtige Funktionsrump besteht aus</p>
<pre><code class="language-cpp">INT_PTR DialogProc(HWND, UINT, WPARAM, LPARAM)
</code></pre>
<p>. Ob du das nun einsiehst oder nicht ... theoretisch kannst du auch aus nem Menschen auch nen Affen machen -.-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227079</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227079</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sun, 11 Feb 2007 20:56:15 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Sun, 11 Feb 2007 23:30:58 GMT]]></title><description><![CDATA[<p>@(D)Evil: Meine Meinung <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/1227132</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227132</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sun, 11 Feb 2007 23:30:58 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Mon, 12 Feb 2007 14:13:22 GMT]]></title><description><![CDATA[<p>Wenn der Mercedes kein Benzin will, schreiben wir Diesel auf den Kanister ^^</p>
<p>Sehr Lustig dieser Thread, ich habe mich weggeschrien vor Lachen <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="😃"
    /></p>
<p>Schieb mal WM_PAINT an, dann fährt der Diesel auch mit Benzin, beklopter geht es echt nicht mehr und mit dynamic_cast&lt;*&gt; kannst sogar im Tank pissen.</p>
<p>Wie schreibst du eigentlich Platform unabhängige Programme, mit castings ala (LINUX(UNIX(JAVA(MAC(FisherPrice)))))Windows</p>
<p>OK, spass beiseite<br />
Regel Nr.1 - Keine Cast und drauf achten was der Compiler will<br />
Regel Nr.2 - Gib dem Compiler was er will<br />
Regel Nr.3 - Immer unötige Cast vermeiden</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227419</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227419</guid><dc:creator><![CDATA[MiC++ha_offline]]></dc:creator><pubDate>Mon, 12 Feb 2007 14:13:22 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Mon, 12 Feb 2007 16:02:16 GMT]]></title><description><![CDATA[<p>Der Kraftstoff im Tank kann noch soviel Oktan haben, wenn die Lenkradsperre (WM_PAINT) nicht gelöst ist, wirst Du nicht viel Spaß am Porsche haben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227509</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227509</guid><dc:creator><![CDATA[keksekekse]]></dc:creator><pubDate>Mon, 12 Feb 2007 16:02:16 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox wird nicht erstellt und Fenster friert ein, wieso? on Mon, 12 Feb 2007 16:13:23 GMT]]></title><description><![CDATA[<p>Ich rede denoch vom casting und mal abgesehen davon, wer WM_PAINT abfragt, ohne es zu nutzen, sollte sich gedanken über sein Programmierstil machen, weiter ist auch immer zu empfehlen, alles Überflüssige bei der Fehlersuche rauszuwerfen, was sich erübrigt wenn man von anfang an unnütziges weg lässt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227521</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227521</guid><dc:creator><![CDATA[MiC++ha_offline]]></dc:creator><pubDate>Mon, 12 Feb 2007 16:13:23 GMT</pubDate></item></channel></rss>