Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QM dialog with systray, using systray to exit does refresh on desktop (and taskbar)
#1
I have the following empty/hidden dialog.
When I right click on the systray icon and select 'exit' the dialog (thread) and systray-icon exits but it does a complete refresh
of my taskbar, systray and desktop. It briefly becomes black (less then one second) and re-renders my desktop, taskbar and systray.

Is there anything I did wrong or can something be done about this.

(running on latest windows 11)

EDIT: maybe it is an issue that is from my end and not caused by script/qm


Dialog:

Function test_systray
 
Code:
Copy      Help
str dd=
F
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "test_systray"
;END DIALOG
;DIALOG EDITOR: "" 0x2040202 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0 0 128)) ret

#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,,int- main_dlg=hDlg
,,str icons=":97 c:\windows\system32\shell32.dll,5"
,,Tray- t.AddIcon(":97" "test_systray" 0 &test_systray_tray)

,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,cas



Systray function:

Function test_systray_tray
 
Code:
Copy      Help
function Tray&tray msg
sel msg
,case WM_RBUTTONUP
,,str- default_profile_path_sectioncontent
,,POINT p
,,int px(xm) py(ym)
,,p.x=px
,,p.y=py
,,
,,str s3=
,,F
,,;:100 c:\windows\system32\shell32.dll,2
,,;:101 c:\windows\system32\shell32.dll,3
,,
,,SetThreadMenuIcons "2=0 5=1" s3
,,int i=ShowMenu("5 User Tools[]-[]2 Exit" 0 p)
,,if(i=2)
,,,out
,,,out "EXIT icon clicked (X)"
,,,shutdown -6    0 "test_systray"        
,,if(i=5)    
,,,out
,,,out "Other icon clicked"
,,,
#2
Cannot reproduce.
Try to replace the shutdown line with
int- main_dlg; clo main_dlg
#3
Ok no problem.
Had a feeling it might be from my end.
Will try the method:
int- main_dlg; clo main_dlg

Thank you!


Forum Jump:


Users browsing this thread: 1 Guest(s)