Seite 1 von 1

Wie erstelle ich so eine Linie / Seperator im Fenster ??

Verfasst: 02.01.2006 07:53
von nco2k
hi folks,

ich frage mich wie man so eine linie erstellen kann, ohne sie selber aufs fenster zeichnen zu müssen. das geht doch bestimmt ganz leicht mit der winapi, als so eine art gadget ?! finde jedoch nicht so leicht die gewünschten infos. :(

Bild
(die drei horizontalen linien sind gemeint)

c ya,
nco2k

Verfasst: 02.01.2006 07:59
von freedimension
Das ist mAn ein normales Frame3D-Gadget, 2px Höhe und Flag "#PB_Frame3D_Single" gesetzt.

Verfasst: 02.01.2006 08:08
von nco2k
hmm ja das kommt hin. an frame3d hab ich grad überhaupt nicht gedacht, danke! :allright:

c ya,
nco2k

Verfasst: 02.01.2006 12:47
von edel
oder so

Code: Alles auswählen


  Procedure StaticSep(id,x,y,cx,cy,parent,flag)
    Protected style.l
    If flag = #true
      style = #SS_ETCHEDHORZ|#WS_CHILD|#WS_VISIBLE
    Else
      style = #SS_ETCHEDVERT|#WS_CHILD|#WS_VISIBLE
    EndIf   
    CreateWindowEx_(0,"static","",style,x,y,cx,cy,parent,id,0,0)
  EndProcedure
  
  hwnd = OpenWindow(0,0,0,200,200,1|#WS_SYSMENU,"")
  
  CreateGadgetList(hwnd)
  StaticSep(2,64,14,80,20 ,hwnd)
  
  Repeat
    
  Until WaitWindowEvent()=#PB_Event_CloseWindow
V4

Code: Alles auswählen

Procedure StaticSep(id,x,y,cx,cy,parent,flag=0)
  Protected style.l
  If flag = #True
    style = #SS_ETCHEDHORZ|#WS_CHILD|#WS_VISIBLE
  Else
    style = #SS_ETCHEDVERT|#WS_CHILD|#WS_VISIBLE
  EndIf   
  CreateWindowEx_(0,"static","",style,x,y,cx,cy,parent,id,0,0)
EndProcedure
  
hwnd = OpenWindow(0,0,0,200,200,"")
  
CreateGadgetList(hwnd)
StaticSep(2,64,14,80,20 ,hwnd,1)
StaticSep(3,64,40,20,80 ,hwnd)
  
Repeat
  
Until WaitWindowEvent()=#PB_Event_CloseWindow