hi im trying to change a window style i just want the window title to show up no minimize and no close bottons if you get what i mean im trying to use SetWindowLong_() but i do not know whitch flags to send in because when i try to send #WS_EX_APPWINDOW only it was a mess there was no titlebar and i coulnt use the window that was in #GWL_EXSTYLE mode
i am not creatting this win i just want to change its style but how can i do that??? say with the windows calculator thanks!!!
how do i change the window style using windows api!??!
-
- Enthusiast
- Posts: 237
- Joined: Tue Apr 05, 2005 11:20 pm
-
- Enthusiast
- Posts: 252
- Joined: Fri Feb 20, 2004 5:43 pm
Try running this No close/minimise buttons in the corner 
Code: Select all
OpenWindow(0,0,0,400,400,#PB_Window_ScreenCentered,"Title")
Delay(3000)

-
- Enthusiast
- Posts: 237
- Joined: Tue Apr 05, 2005 11:20 pm
thanks but i think i said i aint creating the window in fact i said how would i apply this to the windows calculator ?
and if you create your window with the winapi you wont be able to use any #PB_Window_ constant i think but what i want to do is change a current opened window´s style its an windows api question more than purebasic
and if you create your window with the winapi you wont be able to use any #PB_Window_ constant i think but what i want to do is change a current opened window´s style its an windows api question more than purebasic
-
- Enthusiast
- Posts: 252
- Joined: Fri Feb 20, 2004 5:43 pm
Ok then, more of a challenge
This code's a bit messy (the minimising bit) but I was in a hurry. You should just be able to force the window to redraw.

Code: Select all
RunProgram("calc")
Delay(1000)
hWnd=FindWindow_(0,"Calculator")
style=GetWindowLong_(hWnd,#GWL_STYLE)
style=style!#WS_SYSMENU
SetWindowLong_(hWnd,#GWL_STYLE,style)
CloseWindow_(hWnd)
ShowWindow_(hWnd,#SW_RESTORE)
Delay(2000)
-
- Enthusiast
- Posts: 237
- Joined: Tue Apr 05, 2005 11:20 pm