Minimize without Resize

BlitzPlus Forums/BlitzPlus Programming/Minimize without Resize

Paulo(Posted 2004) [#1]
Is it possible to be set up a window so as you can minimize it but not allow the user to resize manually? I guess like a tool window with the ability to minimize.

And whilst Im on it.. Does anyone else hate having to cater for a chunky fat WindowsXP themes? In classic view my app size is perfect, but the extra fat theme on XP chucks all the numbers out the window..so to speak.. *sigh*
Death to 800x600! It should be illegal.

Sorry, had to get that off me chest.


CS_TBL(Posted 2004) [#2]
uh .. so you want a window that can be minimized, but not resized by the user?

You can always create a window and use the flags to prevent resizing.. (13)

with MinimizeWindow <yourwindow> you can minimize it..

But indeedy.. there's no minimize button then .. perhaps you can place a normal button somewhere that acts as minimize button ..

with RestoreWindow <yourwindow> you can restore your window ..


Eikon(Posted 2004) [#3]
I've got the userlib code at home and will edit this post with it when I get off in about an hour.


Paulo(Posted 2004) [#4]
Ah thank you.. well, ideally I dont want the windows buttons at all, but need their features.. but i can build my own minimize button, this is cool :) thanks.


Eikon(Posted 2004) [#5]
Userlib:
.lib "user32.dll"
SetWindowLong%(hWnd%,Val%,Long%):"SetWindowLongA"
GetWindowLong%(hWnd%,Val%):"GetWindowLongA"
B+ Code:
Parent = CreateWindow("Window", ClientWidth(Desktop())/2 - 157, ClientHeight(Desktop())/2 - 118, 314, 236, 0, 1 + 4) 

; Window Style
hWnd = QueryObject(Parent, 1)
ret = GetWindowLong(hWnd, -16)
ret = ret Or $20000
SetWindowLong hWnd, -16, ret
An UpdateWindowMenu Parent may be required to see the changes.


Paulo(Posted 2004) [#6]
Userlib things are still a little mysterious to me, but I'll have a look into them. Thanks again. :)