Page 1 of 1
Maximize animation on XP
Posted: Sat Feb 07, 2015 8:57 am
by chi
If you maximize a window on XP and the visual style option "Animate windows when minimizing and maximizing" is enabled, you'll get an ugly theme-colored titelbar to visualize the animation...
Any chance to suppress/ownerdraw that animation? I'm drawing the whole window by myself
(|on my own???) and it looks kinda lame

.
thx, chi
Re: Maximize animation on XP
Posted: Sat Feb 07, 2015 1:38 pm
by RASHAD
Hi
Code: Select all
Global Animflag
OpenWindow(0,0,0,100,100,"Test",#PB_Window_SystemMenu| #PB_Window_ScreenCentered|#PB_Window_MaximizeGadget)
anm.ANIMATIONINFO
anm\cbSize = SizeOf(anm)
SystemParametersInfo_(#SPI_GETANIMATION, SizeOf(anm), @anm, 0)
Animflag = anm\iMinAnimate
If Animflag = 1
anm\iMinAnimate = 0
SystemParametersInfo_(#SPI_SETANIMATION, SizeOf(anm), @anm, 0)
EndIf
;ShowWindow_(WindowID(0),#SW_MAXIMIZE)
ButtonGadget(1,10,10,80,25,"Test")
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
anm\iMinAnimate = Animflag
SystemParametersInfo_(#SPI_SETANIMATION, SizeOf(anm), @anm, 0)
Q = 1
Case #PB_Event_Gadget
Select EventGadget()
Case 1
EndSelect
EndSelect
Until Q = 1
Re: Maximize animation on XP
Posted: Sat Feb 07, 2015 6:14 pm
by chi
I was hoping for a more app-wide (rather than system-wide) solution but since it's only buggin' me on XP's maximize animation I can definitely live with that!

Thanks a lot RASHAD!
Re: Maximize animation on XP
Posted: Sat Feb 07, 2015 7:00 pm
by RASHAD
Hi chi
Check the next and report please
Code: Select all
#SC_CLOSE = $F060
#SC_MAXIMIZE = $F030
#SC_MINIMIZE = $F020
#SC_RESTORE = $F120
Procedure WndProc(hwnd, uMsg, wParam, lParam)
result = #PB_ProcessPureBasicEvents
Select uMsg
Case #WM_SYSCOMMAND
Select wParam
Case #SC_CLOSE,#SC_MAXIMIZE,#SC_MAXIMIZE,#SC_MINIMIZE
SendMessage_(WindowID(0),#WM_SETREDRAW,1,0)
EndSelect
EndSelect
ProcedureReturn result
EndProcedure
OpenWindow(0,0,0,100,100,"Test",#PB_Window_SystemMenu| #PB_Window_MinimizeGadget| #PB_Window_MaximizeGadget |#PB_Window_ScreenCentered)
ButtonGadget(1,10,10,80,25,"Test")
SetWindowCallback(@WndProc())
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Q = 1
Case #PB_Event_Gadget
Select EventGadget()
Case 1
EndSelect
EndSelect
Until Q = 1
Re: Maximize animation on XP
Posted: Sat Feb 07, 2015 7:58 pm
by chi
Hello and thanks again!
Unfortunately your last example didn't work BUT it led me to DrawAnimatedRects()
https://msdn.microsoft.com/en-us/librar ... 85%29.aspx...
I'll let you know if it works ^^
Edit: Nope, not what I expected

. Guess I'll have to stick with your first solution!