sebastienbro
Messages postés246Date d'inscriptiondimanche 14 avril 2002StatutMembreDernière intervention 5 août 2004
-
1 mai 2003 à 18:21
sebastienbro
Messages postés246Date d'inscriptiondimanche 14 avril 2002StatutMembreDernière intervention 5 août 2004
-
2 mai 2003 à 18:42
Bonjour!
Je vous explique mon prob.
Je suis dans une dll, et je doit afficher une fenetre à l'écran.
La fenetre est stocké dans un fichier .res, et intégré à la dll.
Jusque là, aucun problème !
C'est après. Il faut ensuite que j'affiche cette fenetre. Pour cela, j'utilise l'API CreateDialog.
cs_Delphiprog
Messages postés4297Date d'inscriptionsamedi 19 janvier 2002StatutMembreDernière intervention 9 janvier 201332 2 mai 2003 à 08:36
La fonction DialogProc doit renvoyer une valeur booléenne à CreateDialogProc :
BOOL CALLBACK DialogProc(
HWND hwndDlg, // handle to dialog box
UINT uMsg, // message
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
Mais comme :
Return Values
Except in response to the WM_INITDIALOG message, the dialog box procedure should return nonzero if it processes the message, and zero if it does not. In response to a WM_INITDIALOG message, the dialog box procedure should return zero if it calls the SetFocus function to set the focus to one of the controls in the dialog box. Otherwise, it should return nonzero, in which case the system sets the focus to the first control in the dialog box that can be given the focus
Comme ta fonction DialogProc renvoie 0 dans tous les cas, je te laisse en tirer les conclusions.
May Delphi be with you