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

Anfängerfragen zum Programmieren mit PureBasic.
Benutzeravatar
nco2k
Beiträge: 892
Registriert: 08.09.2004 23:13

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

Beitrag 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
~|__/
..o.o.. <--- This is Einkaufswagen. Copy Einkaufswagen into your signature to help him on his way to world domination.
Benutzeravatar
freedimension
Admin
Beiträge: 1987
Registriert: 08.09.2004 13:19
Wohnort: Ludwigsburg
Kontaktdaten:

Beitrag von freedimension »

Das ist mAn ein normales Frame3D-Gadget, 2px Höhe und Flag "#PB_Frame3D_Single" gesetzt.
Beginne jeden Tag als ob es Absicht wäre!
Bild
BILDblog
Benutzeravatar
nco2k
Beiträge: 892
Registriert: 08.09.2004 23:13

Beitrag von nco2k »

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

c ya,
nco2k
~|__/
..o.o.. <--- This is Einkaufswagen. Copy Einkaufswagen into your signature to help him on his way to world domination.
Benutzeravatar
edel
Beiträge: 3667
Registriert: 28.07.2005 12:39
Computerausstattung: GameBoy
Kontaktdaten:

Beitrag 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
Antworten