08-21-2026, 10:25 PM
The following code adds a submenu to a custom menu.
When the system menu is displayed on the right side of the desktop, the submenu in the custom menu overlaps the system menu. Clicking a menu item executes both the submenu item and the system menu item underneath it.
Is there a way to solve this?
Function Explorer_Menu_T
Trigger !v"" "#32768" /EXPLORER
When the system menu is displayed on the right side of the desktop, the submenu in the custom menu overlaps the system menu. Clicking a menu item executes both the submenu item and the system menu item underneath it.
Is there a way to solve this?
Function Explorer_Menu_T
Trigger !v"" "#32768" /EXPLORER

out
int hwnd=TriggerWindow
ARRAY(int) a; win("" "#32768" "explorer" 0 0 0 a); if(a.len>1) ret
SetTimer(0 0 100 &sub._Timer)
_s=
;1 Test 1
;> Test
;3 Test 3
;4 Test 4
;<
;5 Test 5
;6 Test 6
;7 Test 7
;8 Test 8
;9 Test 9
int x w; GetWinXY(hwnd x 0 w); out F"x: {x}; w: {w}"
POINT p; p.y=ym
if x < 200
,p.x=w+xm; _i=ShowMenu(_s 0 p 0 0)
else
,p.x=x; _i=ShowMenu(_s 0 p 0 8)
out _i
#sub _Timer v
function u1 u2 timer u3
if !IsWindowVisible(a[0]) && !(RealGetKeyState(1) or RealGetKeyState(2))
,KillTimer 0 timer
,EndMenu