Page 1 of 1
api window change styles ?
Posted: Fri May 27, 2005 2:42 am
by doodlemunch
how can i change an apiwindow style once its opened is it even possible i cant find out how it is done or if its even possible with out destroing the window and creating a new ones does anbody know about this ???
Posted: Fri May 27, 2005 3:11 am
by Sparkie
Posted: Fri May 27, 2005 3:22 am
by doodlemunch
thanks but i dont understand hm i found some examples that uses that procedure in the codearchiv!!! buut they were all of fading effekts and all taht stuff i just want o change a normal window into a tool window during runtime by pressing a button

i can handle the button part though
Posted: Fri May 27, 2005 3:36 am
by Sparkie
Something like this...
Code: Select all
If OpenWindow(0, 100, 100, 320, 300, #PB_Window_SystemMenu , "SetWindowLong_() Test") And CreateGadgetList(WindowID())
ButtonGadget(0, 10, 10, 100, 20, "ToolWindow")
Repeat
event = WaitWindowEvent()
If event = #PB_EventGadget And EventGadgetID() = 0
oldStyle = GetWindowLong_(WindowID(), #GWL_EXSTYLE)
SetWindowLong_(WindowID(), #GWL_EXSTYLE, oldStyle | #WS_EX_TOOLWINDOW)
DisableGadget(0, 1)
SetWindowPos_(WindowID(), 0, -1 , -1, -1, -1, #SWP_NOSIZE | #SWP_NOMOVE | #SWP_NOZORDER | #SWP_FRAMECHANGED | #SWP_SHOWWINDOW)
EndIf
Until event = #PB_Event_CloseWindow
EndIf
End
Posted: Fri May 27, 2005 3:47 am
by doodlemunch
cool thank you
maybe dis will help someone else too!!!
thanks