Wouldn't that make semantical sense?
'Opening' implicates that it already exists, but it's not even technically defined before.
In broader sense, should a new window not per default be invisible until shown using ShowWindow () function?, which btw would make more semantical sense than HideWindow () (?).
openWindow to createWindow, Hide-functions to Show-functions
Re: openWindow to createWindow, Hide-functions to Show-funct
Your wish is my command:
Code: Select all
Macro CreateWindow(Window,X,Y,InnerWidth,InnerHeight,Title,Flags=0,ParentWindowID=0)
OpenWindow(Window,X,Y,InnerWidth,InnerHeight,Title,Flags|#PB_Window_Invisible,ParentWindowID)
EndMacro
CreateWindow(0,200,200,100,100,"test",#PB_Window_SystemMenu) ; Created invisibly.
Repeat
ev=WaitWindowEvent(1)
If GetAsyncKeyState_(#VK_CONTROL) & $8000
HideWindow(0,#False) ; Show it when Ctrl is pressed.
EndIf
Until ev=#PB_Event_CloseWindow
Re: openWindow to createWindow, Hide-functions to Show-funct
Well, i still ask for this sort of comfort.
Nice script kiddie-like API warm-up btw, Dude .
Nice script kiddie-like API warm-up btw, Dude .
Re: openWindow to createWindow, Hide-functions to Show-funct
The reason for this is that it's using the "open/close" paradigm. If you just change it to "create" then suddenly it's "create/close" which is weird. That paradigm is typically "create/destroy".