Page 2 of 2

Posted: Mon Jan 23, 2006 2:01 pm
by Fred
Missing constants added.

Posted: Mon Jan 23, 2006 10:12 pm
by Trond
Fred wrote:
Trond wrote:or something, so that you didn't have to type everything everytime. It would of course also be nice if constants could be removed from the chain, for example if you could remove #PB_Window_ScreenCentered and add #PB_Window_WindowCentered (this may already be possible for all I know).
Yes, you can using the xor binary operator:

Code: Select all

#PB_Window_Standard = #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget

OpenWindow(0, 0, 0, 640, 480, #PB_Window_Standard & ~#PB_Window_SizeGadget, "Test")

Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
1. That's not the xor binary operator. This is the xor binary operator: !
2. It doesn't work:

Code: Select all

#PB_Window_Standard = #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget 

OpenWindow(0, 0, 0, 640, 480, #PB_Window_Standard & ~#PB_Window_MaximizeGadget, "Test") 

Repeat 
Until WaitWindowEvent() = #PB_Event_CloseWindow
3. The xor binary operator (which I tested before posting) doesn't work either:

Code: Select all

#PB_Window_Standard = #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget 

OpenWindow(0, 0, 0, 640, 480, #PB_Window_Standard ! #PB_Window_MaximizeGadget, "Test") 

Repeat 
Until WaitWindowEvent() = #PB_Event_CloseWindow
So what did you mean, because it would be interresting to know. :)

Posted: Mon Jan 23, 2006 10:12 pm
by Trond
Fred wrote:Missing constants added.
Thank you.

Posted: Mon Jan 23, 2006 10:16 pm
by nco2k
perhaps this?

Code: Select all

#PB_Window_Standard = #PB_Window_SystemMenu ! #PB_Window_SizeGadget ! #PB_Window_MinimizeGadget ! #PB_Window_MaximizeGadget 

OpenWindow(0, 0, 0, 640, 480, #PB_Window_Standard | #PB_Window_ScreenCentered, "Test") 

Repeat 
Until WaitWindowEvent() = #PB_Event_CloseWindow
c ya,
nco2k

Posted: Mon Jan 23, 2006 10:18 pm
by Trond
That's ADDING to the constant, not removing from it.

Posted: Mon Jan 23, 2006 10:45 pm
by Fred
true, it's the 'not' operator. May be it doesn't work because Maximize is a combined constant. Theorically, it should work tough.

Posted: Tue Jan 24, 2006 2:44 pm
by Trond
But it doesn't.

Posted: Tue Jan 24, 2006 3:10 pm
by Fred
Maximize is defined like this, that's why it doesn't work:

Code: Select all

#PB_Window_MaximizeGadget = $10000 | #PB_Window_TitleBar | #PB_Window_SystemMenu
.

Posted: Tue Feb 07, 2006 1:36 am
by Intrigued
Fred wrote:
Trond wrote:or something, so that you didn't have to type everything everytime. It would of course also be nice if constants could be removed from the chain, for example if you could remove #PB_Window_ScreenCentered and add #PB_Window_WindowCentered (this may already be possible for all I know).
Yes, you can using the xor binary operator:

Code: Select all

#PB_Window_Standard = #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget

OpenWindow(0, 0, 0, 640, 480, #PB_Window_Standard & ~#PB_Window_SizeGadget, "Test")

Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Useful, thanks for sharing this a ways back!