Hi - what is OpenWindow using only a flag of $80000 doing? I see that the $80000 is part of the SystemMenu value of $C80000, which adds the TitleBar. Also $80000,$80001 and $80002 all work just as well. Guess this is because a full screen is centered.
It seems that with this flag I can open a window 1280x1024 and get that size including the borders. If I open a window with the same dimensions using SystemMenu the right and bottom border get cut off. This will eliminate my using MoveWindow_(.
Is this a valid PB constant? Does it have a name? Will it probably always work?
OpenWindow(... with flag of $80000
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Couple of points:
1. Sticking a value of $80000 in the OpenWindow command doesn't give you a window with the style set to $80000 as there are already style bits set. You actually get a style of $14C80000.
2. Using unsupported values instead of PB constants here is bad practice on several levels and you should resist the temptation to code this way. I'm guilty of doing it myself in the past but freak showed me the light and now I'm innocent of this coding misdemeanor.
3. While $80000 is indeed the value of #WS_EX_LAYERED, this extended style cannot be applied in this way. SetWindowLongPtr_() is necessary.
1. Sticking a value of $80000 in the OpenWindow command doesn't give you a window with the style set to $80000 as there are already style bits set. You actually get a style of $14C80000.
2. Using unsupported values instead of PB constants here is bad practice on several levels and you should resist the temptation to code this way. I'm guilty of doing it myself in the past but freak showed me the light and now I'm innocent of this coding misdemeanor.
3. While $80000 is indeed the value of #WS_EX_LAYERED, this extended style cannot be applied in this way. SetWindowLongPtr_() is necessary.
BERESHEIT
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
funny thing:
you can use#PB_Any to set every StyleBit #True, the styles seem to contradict heavily.
there will be no window in the Tasks, only the Process, no GadgetList but the EventQueue...
you can use#PB_Any to set every StyleBit #True, the styles seem to contradict heavily.
there will be no window in the Tasks, only the Process, no GadgetList but the EventQueue...
Code: Select all
OpenWindow( 0, 0,0, 800,600, "test" , #PB_Any )
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
oh... and have a nice day.