[Implemented] Maximized option for OpenWindow()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
tony
User
User
Posts: 26
Joined: Thu May 01, 2003 1:35 am
Location: California
Contact:

[Implemented] Maximized option for OpenWindow()

Post by tony »

Add one more option to OpenWindow() so that you can have it maximized, minized, or normal.

I know it's the WinAPI but could be neat

Tony
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Post by Tipperton »

Simple enough to do...

Just change this

Code: Select all

OpenWindow(#Window, x, y, InnerWidth, InnerHeight, Flags, Title$ [, ParentWindowID])
to this for maximized

Code: Select all

OpenWindow(#Window, x, y, InnerWidth, InnerHeight, Flags | $1000000, Title$ [, ParentWindowID])
or to this for minimized

Code: Select all

OpenWindow(#Window, x, y, InnerWidth, InnerHeight, Flags | $20000000, Title$ [, ParentWindowID])
Viola! :)
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2138
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Post by Andre »

So its only needed to add two new PB constants.... :wink:
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Post by Tipperton »

Andre wrote:So its only needed to add two new PB constants.... :wink:
Yup! :)

Code: Select all

#PB_Window_WindowMaximized = $1000000
#PB_Window_WindowMinimized = $20000000
If you want to follow the current constants naming convention.
Post Reply