Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo,

eine Frage :

ich will aus einem Modalem1 Dialog einen anderen Modalen2 Dialog starten und den Modalen1 Dialog dann aber automatisch schließen, wenn ich aber will aus Modalem2 zurück zu Modalem1 sollte es auch gehen das ganze hab mir so vorgestellt:


void Modalen2gDlg::OnZuruck()
{
CDialog::EndDialog(0);
Modalen1Dlg healthdlg;
healthdlg.DoModal();
}

[/PHP]

genau so auch mit Modalen1 wenn ich zu Modalen2 gehen soll.

Es hat bis jetzt auch wunderbar funktioniert obwohl ich weis nicht ob es sauber ist ;(

Jetzt obwohl ich nichts gemacht habe kriege einen Fehler und zwar in DoModal() Funktion auf die Stelle AfxHookWindowCreate(this);Auch wenn ich CDialog::EndDialog(0) auskommentire ???!

Sauber ist das sicher nicht. Warum übergibst du beim Aufruf von EndDialog nicht einen Wert, an dem die Funktion, die Modalen2gDlg::DoModal aufgerufen hat, erkennt, dass danach Modalen1Dlg angezeigt werden soll?

Zu dem anderen Problem:

Was für ein Fehler tritt auf?

  • Autor
Originally posted by Klotzkopp

Zu dem anderen Problem:

Was für ein Fehler tritt auf?

Debug Assertion Failed !

File afxwin2.inl

Line: 602

Und wenn ich auf ignorieren klicke komme ich weite also in Dialog2 wenn wiederholen

Die Ausnahme „unknown software exception“(0x8000000003)ist in der Anwendung an der Stelle 0x5f483f2f aufgetreten

Originally posted by 007ski

Gibt’s eine andere Lösung ??

Ziel ist das ich einfach den Dialog1 nicht sehen will ?

Wie ich schon sagte: Lass den zweiten Dialog durch dieselbe Funktion anzeigen, die auch den ersten anzeigt. Der Wert, den du bei EndDialog als Parameter angibst, erscheint als Rückgabewert von DoModal:

...
Modalen2Dlg dlg2;
if( [B]25[/B] == dlg2.DoModal() )
{
Modalen1Dlg healthdlg;
healthdlg.DoModal();
...


void Modalen2gDlg::OnZuruck()
{
CDialog::EndDialog( [B]25[/B] );
}
[/CODE]

  • Autor

Moment in OnInitDialog schreibe ich


M1Dlg dlg1;

	if(25==dlg1.DoModal())

	{

		M2Dlg dlg2;

		Dlg2..DoModal();		

	}


bis jetzt läuft noch gut und dann wenn der User weiter will in On Weiter

CDialog::EndDialog(25); // Hier bricht er ab

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.