malik7934
Messages postés1154Date d'inscriptionmardi 9 septembre 2003StatutMembreDernière intervention15 août 2009
-
25 août 2004 à 14:01
malik7934
Messages postés1154Date d'inscriptionmardi 9 septembre 2003StatutMembreDernière intervention15 août 2009
-
25 août 2004 à 14:45
Hello,
J'ai un prog qui commence avec une image qui s'affiche, ensuite vient une console:
int WINAPI WinMain(HINSTANCE hInst,HINSTANCE hPrev,LPSTR szCmdLine,int nCmdShow)
{
DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOGDEM), NULL, (DLGPROC) Demarrage);
return (int)DialogBox(hInst,MAKEINTRESOURCE(IDD_MAIN),NULL,MainDlgProc);
}
<table border=0 cellspacing=0 cellpadding=4 bgcolor=#E0E0E0><tr><td class=code>
Mon but est d'ajouter une étape intermédiaire avec des boutons radio, pour choisir quelle partie du programme on va charger. J'ai essayé ça:
<table border=0 cellspacing=0 cellpadding=4 bgcolor=#E0E0E0><tr><td class=code>
int WINAPI WinMain(HINSTANCE hInst,HINSTANCE hPrev,LPSTR szCmdLine,int nCmdShow)
{
DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOGDEM), NULL, (DLGPROC) Demarrage);
return (int)DialogBox(hInst,MAKEINTRESOURCE(IDD_DIALOG1),NULL,tentative);
}
...
BOOL CALLBACK tentative(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
switch((UINT)wParam)
{
case IDOK_RADIO:
if(SendMessage(GetDlgItem(hWnd,IDC_RADIO1),BM_GETCHECK,0,0) == BST_CHECKED)
return (int)DialogBox(hInst,MAKEINTRESOURCE(IDD_MAIN),NULL,MainDlgProc);
if(SendMessage(GetDlgItem(hWnd,IDC_RADIO5),BM_GETCHECK,0,0) == BST_CHECKED)
return EndDialog(hWnd,0);
...
Ca foire: hInst n'est pas visible dans "tentative"....
malik7934
Messages postés1154Date d'inscriptionmardi 9 septembre 2003StatutMembreDernière intervention15 août 200917 25 août 2004 à 14:45
Ok, la variable global, ça a pour effet que ça tourne. Par contre, mon menu (Tentative2) apparaît en transparent quoi que je lui mette comme propriétés dans VC++6!!!
Une idée?