UserOfPure, does this work for you on PB 4.20B4...
Code: Select all
Procedure WinCallback(hwnd, msg, wParam, lParam)
Select msg
Case #WM_CLOSE
DestroyWindow_(hwnd)
Case #WM_DESTROY
PostQuitMessage_(0)
result = 0
Default
result = DefWindowProc_(hwnd, msg, wParam, lParam)
EndSelect
ProcedureReturn result
EndProcedure
wStyle = #WS_BORDER | #WS_VISIBLE | #WS_OVERLAPPED | #WS_SYSMENU
wExStyle = #WS_EX_LEFT | #WS_EX_LTRREADING | #WS_EX_RIGHTSCROLLBAR | #WS_EX_WINDOWEDGE
WindowClass.s = "AnimateTest"
wc.WNDCLASSEX
wc\cbSize = SizeOf(WNDCLASSEX)
wc\hbrBackground = CreateSolidBrush_(GetSysColor_(#COLOR_3DFACE))
wc\hCursor = LoadCursor_(0, #IDC_ARROW)
wc\lpfnWndProc = @WinCallback()
wc\lpszClassName = @WindowClass
RegisterClassEx_(@wc)
hwnd = CreateWindowEx_(wExStyle, WindowClass, "Animation-Test", wStyle, 100, 100, 320, 240, 0, 0, 0, 0)
If hwnd
result.l = 0
If AnimateWindow_(hwnd, 1000, #AW_HIDE | #AW_BLEND)
result + 1
If AnimateWindow_(hwnd, 1000, #AW_SLIDE | #AW_HOR_POSITIVE)
result + 1
If AnimateWindow_(hwnd, 1000, #AW_HIDE | #AW_SLIDE | #AW_HOR_POSITIVE)
result + 1
If AnimateWindow_(hwnd, 1000, #AW_BLEND)
result + 1
If AnimateWindow_(hwnd, 1000, #AW_HIDE | #AW_BLEND)
result + 1
If AnimateWindow_(hwnd, 1000, #AW_CENTER)
result + 1
If AnimateWindow_(hwnd, 1000, #AW_HIDE | #AW_CENTER)
result + 1
If AnimateWindow_(hwnd, 1000, #AW_SLIDE | #AW_VER_POSITIVE)
result + 1
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf
MessageRequester("FYI", Str(result) + " successful transition(s) ", #PB_MessageRequester_Ok | #MB_ICONINFORMATION)
DestroyWindow_(hwnd)
While GetMessage_(msg.MSG, #Null, 0, 0 )
TranslateMessage_(msg)
DispatchMessage_(msg)
Wend
EndIf
What goes around comes around.
PB 5.21 LTS (x86) - Windows 8.1