api window change styles ?

Just starting out? Need help? Post your questions and find answers here.
doodlemunch
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Apr 05, 2005 11:20 pm

api window change styles ?

Post 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 ???
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
doodlemunch
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Apr 05, 2005 11:20 pm

Post 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 :( :D i can handle the button part though
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post 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
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
doodlemunch
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Apr 05, 2005 11:20 pm

Post by doodlemunch »

cool thank you
maybe dis will help someone else too!!!
thanks
Post Reply