[Implemented] Constants for network events
1. That's not the xor binary operator. This is the xor binary operator: !Fred wrote:Yes, you can using the xor binary operator: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).
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
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
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

perhaps this?
c ya,
nco2k
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
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
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
Useful, thanks for sharing this a ways back!Fred wrote:Yes, you can using the xor binary operator: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).
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
Intrigued - Registered PureBasic, lifetime updates user