Du bist nicht angemeldet.

Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!

Werbeanzeige

Firefly

Alter Hase

  • »Firefly« ist der Autor dieses Themas

Beiträge: 484

Wohnort: Irgendwoundnirgendwo

  • Private Nachricht senden

1

16.01.2007, 17:56

Dialog nicht sichtbar...???

Hallo,
momentan bin ich grade dabei für meine Engine einen tollen Auswahldialog zu implementieren. Das Problem dabei ist, dass der Dialog(besser gesagt das Dialogfenster) unsichtbar bleibt, und nur die child-fenster davon sichtbar sind. Um zu überprüfen obs nur an der dll lag hab ich dann ein kleines beispielprogramm geschrieben, aber das Problem ist das gleiche... :(

C-/C++-Quelltext

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <windows.h>
#include "resource.h"
//Dialogfunktion

BOOL APIENTRY DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch(message)
    {
    case WM_COMMAND:
        {
            switch(wParam)
            {
            case IDD_OK:
                {
                    EndDialog(hDlg,0);
                    break;
                }
            }
            return 0;
        }
    }
    return TRUE;
}
//Windowshauptfunktion

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow)
{
    DialogBox(hInstance,MAKEINTRESOURCE(IDD_DIALOG2),NULL,DlgProc);
    return 0;
}

:?:

dot

Supermoderator

Beiträge: 9 757

Wohnort: Graz

  • Private Nachricht senden

2

16.01.2007, 18:17

irgendwie fehlt mir da die default window prozedur...

Firefly

Alter Hase

  • »Firefly« ist der Autor dieses Themas

Beiträge: 484

Wohnort: Irgendwoundnirgendwo

  • Private Nachricht senden

3

16.01.2007, 18:22

@dot: Meinst du damit ein Default im DlgProc oder ein WndProc?
PS: Glückwunsch zum 1000. Post ;)

dot

Supermoderator

Beiträge: 9 757

Wohnort: Graz

  • Private Nachricht senden

4

16.01.2007, 18:25

^^ danke.

ich meinte DefWindowProc(). aber nachdems ein dialog is darf man das hier nicht...
das problem ist aber im prinzip das gleiche.

Zitat von »"MSDN"«


Typically, the dialog box procedure should return TRUE if it processed the message, and FALSE if it did not. If the dialog box procedure returns FALSE, the dialog manager performs the default dialog operation in response to the message.


versuchs mal so:

C-/C++-Quelltext

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <windows.h>
#include "resource.h"
//Dialogfunktion

BOOL APIENTRY DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch(message)
    {
    case WM_COMMAND:
        {
            switch(wParam)
            {
            case IDD_OK:
                {
                    EndDialog(hDlg,0);
                    break;
                }
            }
            return TRUE;
        }
    }
    return FALSE;
}
//Windowshauptfunktion

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow)
{
    DialogBox(hInstance,MAKEINTRESOURCE(IDD_DIALOG2),NULL,DlgProc);
    return 0;
}

Firefly

Alter Hase

  • »Firefly« ist der Autor dieses Themas

Beiträge: 484

Wohnort: Irgendwoundnirgendwo

  • Private Nachricht senden

5

17.01.2007, 13:43

juhu :D ! Danke, anscheinend wars genau dieses Problem...

Werbeanzeige