<?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[problem mit erstellen eines Dialogs, wos der fehler?]]></title><description><![CDATA[<p>tach'chen, ich moechte eine DialogBox erstellen mit 2buttons die erstmal nicht mehr machen ssollen als.. &quot;beep&quot; und das fenster schliessen also die dlgBox.... irgendwie wills net funktionieren woran liegts???</p>
<pre><code class="language-cpp">// ... in der WinProc

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

   switch( message) {

         case WM_COMMAND: {

            switch( wParam ) {

                case IDM_NEW: {

                    MessageBeep( 0 );
                    return 0;
                }

                case IDM_OPEN: {

                    DialogBox( hInstance, MAKEINTRESOURCE( IDD_DIALOG0 ),
                               hWnd, Dialog1Proc );
                    return 0;
                }

                case IDM_QUIT: {

                    SendMessage( hWnd, WM_CLOSE, 0, 0 );
                    return 0;
                }
            }
        }
    //...

 //in der Dialog1Proc()

 int CALLBACK Dialog1Proc( HWND hWnd, UINT message,
                           WPARAM wParam, LPARAM lParam ) {

    switch( message ) {

        case WM_INITDIALOG: {

            return 0;
        }

        case WM_COMMAND: {

            switch( wParam ) {

                case IDOK: {

                    MessageBox( hWnd, &quot; You pressed \&quot;Fuck You! - Button \&quot; !&quot;,
                                      &quot; Congratulation!&quot;,
                                MB_OK | MB_ICONINFORMATION );
                    EndDialog( hWnd, IDOK );

                    return true;
                }

                case IDCANCEL: {

                    EndDialog( hWnd, IDCANCEL );
                    return true;
                }
            }
        }
    }
    return false;
}
</code></pre>
<pre><code>//in der .rc datei schauts so aus

IDD_DIALOG0 DIALOG 50, 50, 350, 250

STYLE DS_MODALFRAME | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION

BEGIN
    LTEXT &quot;Tach'chen, schreib mal was rein! :&quot;, 500, 10, 10, 150, 30
    EDITTEXT 600, 160, 10, 70, 40
    DEFPUSHBUTTON &quot;Fuck You!&quot;, IDOK, 30, 100, 50, 20
    PUSHBUTTON &quot;Fuck Off!&quot;, IDCANCEL, 130, 100, 50, 20
END
</code></pre>
<p>was ist hier falsch??? <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/157410/problem-mit-erstellen-eines-dialogs-wos-der-fehler</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 16:19:48 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/157410.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 25 Aug 2006 13:08:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to problem mit erstellen eines Dialogs, wos der fehler? on Fri, 25 Aug 2006 13:08:37 GMT]]></title><description><![CDATA[<p>tach'chen, ich moechte eine DialogBox erstellen mit 2buttons die erstmal nicht mehr machen ssollen als.. &quot;beep&quot; und das fenster schliessen also die dlgBox.... irgendwie wills net funktionieren woran liegts???</p>
<pre><code class="language-cpp">// ... in der WinProc

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

   switch( message) {

         case WM_COMMAND: {

            switch( wParam ) {

                case IDM_NEW: {

                    MessageBeep( 0 );
                    return 0;
                }

                case IDM_OPEN: {

                    DialogBox( hInstance, MAKEINTRESOURCE( IDD_DIALOG0 ),
                               hWnd, Dialog1Proc );
                    return 0;
                }

                case IDM_QUIT: {

                    SendMessage( hWnd, WM_CLOSE, 0, 0 );
                    return 0;
                }
            }
        }
    //...

 //in der Dialog1Proc()

 int CALLBACK Dialog1Proc( HWND hWnd, UINT message,
                           WPARAM wParam, LPARAM lParam ) {

    switch( message ) {

        case WM_INITDIALOG: {

            return 0;
        }

        case WM_COMMAND: {

            switch( wParam ) {

                case IDOK: {

                    MessageBox( hWnd, &quot; You pressed \&quot;Fuck You! - Button \&quot; !&quot;,
                                      &quot; Congratulation!&quot;,
                                MB_OK | MB_ICONINFORMATION );
                    EndDialog( hWnd, IDOK );

                    return true;
                }

                case IDCANCEL: {

                    EndDialog( hWnd, IDCANCEL );
                    return true;
                }
            }
        }
    }
    return false;
}
</code></pre>
<pre><code>//in der .rc datei schauts so aus

IDD_DIALOG0 DIALOG 50, 50, 350, 250

STYLE DS_MODALFRAME | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION

BEGIN
    LTEXT &quot;Tach'chen, schreib mal was rein! :&quot;, 500, 10, 10, 150, 30
    EDITTEXT 600, 160, 10, 70, 40
    DEFPUSHBUTTON &quot;Fuck You!&quot;, IDOK, 30, 100, 50, 20
    PUSHBUTTON &quot;Fuck Off!&quot;, IDCANCEL, 130, 100, 50, 20
END
</code></pre>
<p>was ist hier falsch??? <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/1124424</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124424</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Fri, 25 Aug 2006 13:08:37 GMT</pubDate></item><item><title><![CDATA[Reply to problem mit erstellen eines Dialogs, wos der fehler? on Fri, 25 Aug 2006 13:35:56 GMT]]></title><description><![CDATA[<p>gib ma WM_INITDIALOg true zurück. Außerdem: was isn der fehler? also was funktionikert nich?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1124444</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124444</guid><dc:creator><![CDATA[Maxi]]></dc:creator><pubDate>Fri, 25 Aug 2006 13:35:56 GMT</pubDate></item><item><title><![CDATA[Reply to problem mit erstellen eines Dialogs, wos der fehler? on Fri, 25 Aug 2006 13:50:19 GMT]]></title><description><![CDATA[<p>das problem ist die DialogBox() funktion.... die will nicht alles andere arbeitet super..... die fehler:</p>
<pre><code>[C++ Error] menu.cpp(129): E2034 Cannot convert 'int (__stdcall *)(void *,unsigned int,unsigned int,long)' to 'int (__stdcall *)()'
[C++ Error] menu.cpp(129): E2342 Type mismatch in parameter 'lpDialogFunc' (wanted 'int (__stdcall *)()', got 'int (__stdcall *)(void *,unsigned int,unsigned int,long)')
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1124455</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124455</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Fri, 25 Aug 2006 13:50:19 GMT</pubDate></item><item><title><![CDATA[Reply to problem mit erstellen eines Dialogs, wos der fehler? on Fri, 25 Aug 2006 13:52:45 GMT]]></title><description><![CDATA[<p>Maxi schrieb:</p>
<blockquote>
<p>gib ma WM_INITDIALOG true zurück.</p>
</blockquote>
<p>Der Rüchgabewert nach Verarbeitung dieser Message gibt nur an, ob der Dialog Keyboardfokus erhalten soll oder nicht.</p>
<p>Aber die Fehlerbeschreibung des OP ist ja wieder mal genial...</p>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1124459</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124459</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Fri, 25 Aug 2006 13:52:45 GMT</pubDate></item><item><title><![CDATA[Reply to problem mit erstellen eines Dialogs, wos der fehler? on Fri, 25 Aug 2006 14:00:50 GMT]]></title><description><![CDATA[<p>Kacke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1124466</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124466</guid><dc:creator><![CDATA[Deine Mudda!]]></dc:creator><pubDate>Fri, 25 Aug 2006 14:00:50 GMT</pubDate></item><item><title><![CDATA[Reply to problem mit erstellen eines Dialogs, wos der fehler? on Fri, 25 Aug 2006 14:34:22 GMT]]></title><description><![CDATA[<p>toll und was hilft mir das nun weiter? ich weiss immernoch nicht was ich tun soll... wie gesagt es liegt an der Funktion DialogBox()</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1124493</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124493</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Fri, 25 Aug 2006 14:34:22 GMT</pubDate></item><item><title><![CDATA[Reply to problem mit erstellen eines Dialogs, wos der fehler? on Fri, 25 Aug 2006 14:41:17 GMT]]></title><description><![CDATA[<p>(DLGPROC) cast ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1124504</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124504</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Fri, 25 Aug 2006 14:41:17 GMT</pubDate></item><item><title><![CDATA[Reply to problem mit erstellen eines Dialogs, wos der fehler? on Fri, 25 Aug 2006 15:14:45 GMT]]></title><description><![CDATA[<p>jop super das wars funktioniert alles thanx, bis zum naechsten mal xD</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1124536</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124536</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Fri, 25 Aug 2006 15:14:45 GMT</pubDate></item></channel></rss>