Such a window is desirable for applications whose primary communication with the user is a systray icon.
Code snippet shows a window being converted to message-only after 2 seconds using SetParent. It becomes invisible, loses the taskbar icon, and becomes a message pump only:
Code: Select all
#HWND_MESSAGE = -3
OpenWindow(0,0,0,512,512,"Message Window Test", #PB_Window_SystemMenu|#PB_Window_ScreenCentered) ; try to put it here :(
; wait 2 seconds
start = ElapsedMilliseconds()
While ElapsedMilliseconds()-start < 2000
WaitWindowEvent(1)
Wend
SetParent_(WindowID(0), #HWND_MESSAGE)
; wait 2 seconds
start = ElapsedMilliseconds()
While ElapsedMilliseconds()-start < 2000
WaitWindowEvent(1)
Wend
Debug "Test finished"