Menu Aktionen per API

Windowsspezifisches Forum , API ,..
Beiträge, die plattformübergreifend sind, gehören ins 'Allgemein'-Forum.
Andreas21
Beiträge: 390
Registriert: 30.08.2004 09:05
Computerausstattung: Desktop
Windows 10 Pro x64
CPU: AMD Ryzen 5 2600 3.40 GHz
Ram: 16GB RAM
Grafik: NVIDA Geforce 1060
PB: 5.72 X86/X64
Wohnort: Heidelberg

Menu Aktionen per API

Beitrag von Andreas21 »

Hallo,

kenn jemand einen weg wie man Menu ereignisse per API auswerten kann. Also ich meine eine Möglichkeit das man per API auslesen kann welcher Menu punkt ausgewählt wurden.

Bei PB Fenster geht das ja Super nur wenn ich jetzt das Menu auf einem von API erzeugten Fenster anzeige geht das Leider nicht mehr.... :-(
Windows 10 x64 Pro - PB 5.61 X64 / x32 - PB 4.6 x32
Benutzeravatar
Falko
Admin
Beiträge: 3535
Registriert: 29.08.2004 11:27
Computerausstattung: PC: MSI-Z590-GC; 32GB-DDR4, ICore9; 2TB M2 + 2x3TB-SATA2 HDD; Intel ICore9 @ 3600MHZ (Win11 Pro. 64-Bit),
Acer Aspire E15 (Win11 Home X64). Purebasic LTS 6.11b1
HP255G8 Notebook @AMD Ryzen 5 5500U with Radeon Graphics 2.10 GHz 3.4GHz, 32GB_RAM, 3TB_SSD (Win11 Pro 64-Bit)
Kontaktdaten:

Beitrag von Falko »

Vielleicht geht es hiermit?
The GetMenu function retrieves the handle of the menu assigned to the given window.

HMENU GetMenu(

HWND hWnd // handle of window
);


Parameters

hWnd

Identifies the window whose menu handle is retrieved.



Return Values

If the function succeeds, the return value is the handle of the menu. If the given window has no menu, the return value is NULL. If the window is a child window, the return value is undefined.

See Also

GetSubMenu, SetMenu



Aber ein API-Beispielcode, wie es nicht läuft, wäre gut.

Gruß Falko
Bild
Win11 Pro 64-Bit, PB_6.11b1
Andreas21
Beiträge: 390
Registriert: 30.08.2004 09:05
Computerausstattung: Desktop
Windows 10 Pro x64
CPU: AMD Ryzen 5 2600 3.40 GHz
Ram: 16GB RAM
Grafik: NVIDA Geforce 1060
PB: 5.72 X86/X64
Wohnort: Heidelberg

Beitrag von Andreas21 »

Ich will ein Menü von einem anderen Fenster auslessen. Leider nutzt mir WindowsEvent nichts da ich das Fenster nicht mit PB erzeugt habe.
Windows 10 x64 Pro - PB 5.61 X64 / x32 - PB 4.6 x32
Antworten