Dialoge
-
Hallo!
Ich habe einen Dialog mit CreateDialog, (von einer Resuorce) gestartet.
Ich will den Dialog jetzt aufgrund eines anderen Ereignises von ausserhalb Beenden!Meine Frage: Bleibt das Programm bis zum Beenden des Dialoges in dieser CreateDialog-Funktion?
-
Soweit ich weiß ja. Und das was du bei EndDialog() angibst, ist der Rückgabewert der CreateDialog()-Funktion.
ChrisM
-
moin meister ...
NEIN !
Das Progragramm bleibt nur in der Funktion bis zum beenden, wenn Du DialogBox
anstatt CreateDialog verwendest.mfg
RBAuszug aus win32.hlp
CreateDialog:
The CreateDialog macro creates a modeless dialog box from a dialog box template resource.After CreateDialog returns, the application displays the dialog box (if it is not already displayed) by using the ShowWindow function. The application destroys the dialog box by using the DestroyWindow function.
DialogBox:
The DialogBox macro creates a modal dialog box from a dialog box template resource.When the dialog box procedure calls the EndDialog function, DialogBox destroys the dialog box, ends the message loop, enables the owner window (if previously enabled), and returns the nResult parameter specified by the dialog box procedure when it called EndDialog.
-
Bei CreateDialog brauchst du noch eien Message-Loop. Nimmst du DialogBox übernimmt das der Dialog-Manager von Windows.