Bonjour,

Sous visual C++ 2005 express
J'affiche une dialogue box avec :
DialogBox(hInst, _T("INPUT_MODE_DIALOG") , hwnd_mode, (DLGPROC)Dialog1Proc);

Le comportement est différent en debug / release.
En Debug pas de soucis. En Release la fenêtre n'est pas affichée.
Ai-je oublié un message ?

et voici pour la gestion des messages
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 
BOOL APIENTRY Dialog1Proc(HWND hDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
 
    switch (uMsg)
    {
    case WM_INITDIALOG:
        {
            if(mode.TinyTrak3 == TRUE)
                CheckDlgButton(hDlg, ID_MODE_CB_TINITRAK, BST_CHECKED);
            if(mode.FullSerial == TRUE)
                CheckDlgButton(hDlg, ID_MODE_CB_FULLSERIAL, BST_CHECKED);
            return TRUE;
        }
    case WM_COMMAND:
 
        if (LOWORD(wParam) == ID_MODE_CB_FULLSERIAL)
        {
            if (IsDlgButtonChecked(hDlg, ID_MODE_CB_FULLSERIAL)) 
            {
                CheckDlgButton(hDlg, ID_MODE_CB_TINITRAK, BST_UNCHECKED);
            }
        }
        if (LOWORD(wParam) == ID_MODE_CB_TINITRAK)
        {
            if (IsDlgButtonChecked(hDlg, ID_MODE_CB_TINITRAK))
            {
                CheckDlgButton(hDlg, ID_MODE_CB_FULLSERIAL, BST_UNCHECKED);
            }
        }
        if (LOWORD(wParam) == IDOK )
        {
            if(IsDlgButtonChecked(hDlg, ID_MODE_CB_TINITRAK) == BST_CHECKED)
            {
                mode.FullSerial = FALSE;
                mode.TinyTrak3 = TRUE;
            }
            else  
            {
                mode.FullSerial = TRUE;
                mode.TinyTrak3 = FALSE;
            }
 
            EndDialog(hDlg,0);
            return TRUE;
        }
        if (LOWORD(wParam) == IDCANCEL)
        {
            EndDialog(hDlg,0);
            return TRUE;
        }
 
    default:
        DefWindowProc(hDlg,uMsg,wParam,lParam);
        return FALSE;
    }
}
pense à mettre la balise de code,Merci Farscape