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.

Dynamische Menüeintrage

Empfohlene Antworten

Veröffentlicht

Hi und Hallo,

bin neu hier und habe ein schwieriges Problem:

Ich möchte ein dynamisches Menü erstellen, und zwar, welches zum CMainFrame gehört. Jedoch sollen sich die Einträge ändern, jenachdem was gerade in einem View angezeigt wird (meine App ist MDI). Ich habe es bis jetzt in die

"OnInitialUpdate"-Methode des Views geschrieben.

Hier mal etwas Code wie ich es bis jetzt mache (habe es aus einem Buch, aba kann nicht kanz verstehe warum dort "static CMenu" verwendet wird)


CMenu* menu;
menu = AfxGetMainWnd()->GetMenu();

CMenu* subMenu(menu->GetSubMenu(3));

subMenu->DeleteMenu(0,MF_BYPOSITION);
static CMenu popUp;
CMenu* popUpMenu = NULL;
popUpMenu = & popUp;

popUpMenu->CreatePopupMenu();
popUpMenu->AppendMenuW(MF_STRING,ID_POPUP_ITEM_1,L"Text 1");
[/PHP]

So wie es jetzt funktioniert, funktioniert es fast schon so wie es soll, auser:

ich öffne das 1. Dokument -> View wird erstellt und angezeigt --> das Menü wird angepasst!

ich öffne das 2. Dokument -> View wird erstellt und angezeigt -->das Menü wird NICHT angepasst !!!

Ich klicke auf View von Doku1 -> View von Doku 1 schiebt sich vor View von Doku 2.

Ich klicke dann auf View von Doku2 ->View von Doku 2 schiebt sich vor View von Doku 1 -----> Menü ist nun wie es sein soll.

Öffne ich ein 3. Dokument, dann ist dieses Menü wieder dem des 2. Dokumentes gleich.

Ich denke da läuft dann etwas bei der Aktualisierung falsch!!

Kann mir jemand einen Tipp geben?

Ciao

Nun gut,

ich verstehe! Aber meine Daten, von deren Abhängigkeit das Menü sich veränder soll, befindet sich ja in einem Document.

Nagut, aber da wird es sicher wege geben, das zu managen!!!

Thx + Bye

ahh,

na klar. Ok ich versuche das dann mal das nächste mal! Sage dann bescheid wie es funktioniert hat! So in 2-3 Tagen!

Bye + Danke

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.