BarryG wrote: Fri Aug 23, 2024 11:42 am
I didn't know unhiding a window even had these flags. They're not mentioned in the History.
Me neither, I've looked at this function's documentation numerous times and somehow that piece of info never stuck with me. Here are all the flags, from the docs:
#PB_Window_NoActivate : the window will be shown but not activated (only valid when un-hiding the window).
#PB_Window_ScreenCentered: the window will be screen centered (only valid when un-hiding the window).
#PB_Window_WindowCentered: the window will be window centered (only valid when un-hiding the window).
Fred wrote: Fri Aug 23, 2024 11:35 am
Both flags can't be used together, what should it do ?
ParentId is by default zero, equals #HWND_DESKTOP.
Shouldn't a desktop-centered window or a screen-centered window be similar? But here comes none of both. They disable one another.
But screen centered | window centered makes no sense at all, I mean you EITHER want it centered in the screen or in the parent window, not both at once because that would be contradicting.
No no, the empty ParentId should MEAN the desktop as the parent, thus equals the screenCentered flag.
Both flags should not turn off each other because there IS ONE case in which they mean the same.
If WindowCentered is superior to ScreenCentered, then i can understand it turns that later off, but if no ParentId is given, technically the desktop is the parent, so it should center on the screen nevertheless.
(( If there is no difference whether the sysTray shall take influence on the center position or not. ))
es_91 wrote: Fri Aug 23, 2024 9:25 pm
No no, the empty ParentId should MEAN the desktop as the parent, thus equals the screenCentered flag.
Both flags should not turn off each other because there IS ONE case in which they mean the same.
If WindowCentered is superior to ScreenCentered, then i can understand it turns that later off, but if no ParentId is given, technically the desktop is the parent, so it should center on the screen nevertheless.
(( If there is no difference whether the sysTray shall take influence on the center position or not. ))