a Purebasic-only example to use a skin(with bitmaps) is available at
Pauls site(hope so )

http://www.reelmediaproductions.com/PB
Sorry no snippet here,coz there are a lot of bmp's in it.
Getting better with a little help from my friends....thx Siggi
Getting better with a little help from my friends....thx SiggiGood work...
..and next time with rounded corners please.
Addition: cant you use WaitWindowEvent() ??
WindowEvent() makes the CPUs hot...
cya,
...Danilo
(registered PureBasic user)
;
; ------------------------------------------------------------
;
; Rounded Corners - Window example file
;
; (c) 2002 - Siegfried Rings
;
; ------------------------------------------------------------
#WinParam = #PB_Window_SystemMenu|#PB_Window_MinimizeGadget
Procedure MakeRoundedWindow(X1,Y1,X2,Y2,X3,Y3)
Structure Rect
Left.l
Top.l
Right.l
Bottom.l
EndStructure
RectRegion.Rect
WindowDC= GetDC_(WindowID())
Region1 = PathToRegion_(WindowDC)
GetRgnBox_(Region1,RectRegion)
Region2 = CreateRoundRectRgn_(X1,Y1,X2,Y2,X3,Y3)
CombineRgn_(Region2,Region2,Region1,Flag)
DeleteObject_(Region1)
ReleaseDC_(WindowID(),WindowDC)
SetWindowRgn_(WindowID(),Region2,1)
SelectObject_(WindowDC,Font)
SetWindowPos_(WindowID(),#HWND_TOPMOST,(GetSystemMetrics_(#SM_CXSCREEN)/2)-(WindowWidth()/2),(GetSystemMetrics_(#SM_CYSCREEN)/2)-(WindowHeight()/2),X2,Y2,0)
EndProcedure
;
; Open a window, and do some stuff with it...
;
X1=1
Y1=1
X2=200
Y2=100
X3=20
Y3=20
;hwnd=OpenWindow(0, 100, 100, 195, 260, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget, "PureBasic Window")
hwnd=OpenWindow(0, 100, 100, 195, 260, #WS_POPUP, "ROUNDED CORNERS")
If hwnd
;MessageRequester("info","MakeRoundedcorners",0)
MakeRoundedWindow(X1,Y1,X2,Y2,X3,Y3)
InitGadget(2)
CreateGadgetList(WindowID())
ButtonGadget(1,180,5,17,17,"X")
ButtonGadget(2,160,5,17,17,"?")
Repeat
EventID.l = WaitWindowEvent()
If EventID = #WM_LBUTTONDOWN
ReleaseCapture_()
SendMessage_(hwnd,#WM_NCLBUTTONDOWN, #HTCAPTION,0)
EndIf
If EventID = #PB_EventCloseWindow ; If the user has pressed on the close button
Quit = 1
EndIf
If EventID=#PB_EventGadget ;#PB_EventGadget
GadNR.l=EventGadgetID()
If GadNR.l=1
Quit=1
EndIf
EndIf
Until Quit = 1
EndIf
End
Edited by - Danilo on 31 January 2002 05:54:35