home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmEnumObjects
- BackColor = &H00C0C0C0&
- Caption = "EnumObjects"
- ClientHeight = 4485
- ClientLeft = 1395
- ClientTop = 795
- ClientWidth = 3270
- Height = 4890
- Left = 1335
- LinkTopic = "Form1"
- ScaleHeight = 4485
- ScaleWidth = 3270
- Top = 450
- Width = 3390
- Begin CommandButton cmdZur
- BackColor = &H00C0C0C0&
- Caption = "Zur
- Height = 330
- Left = 2100
- TabIndex = 6
- Top = 4080
- Width = 1065
- End
- Begin Frame fraComment
- BackColor = &H00C0C0C0&
- Height = 1695
- Left = 60
- TabIndex = 3
- Top = 2340
- Width = 3075
- Begin Label lblComment
- Alignment = 2 'Center
- BackColor = &H00000000&
- Caption = " Kommentar:"
- ForeColor = &H00FFFFFF&
- Height = 255
- Left = -60
- TabIndex = 5
- Top = 0
- Width = 3135
- End
- Begin Label lblCommentText
- BackStyle = 0 'Transparent
- Caption = "In der obigen Lsite sehen Sie alle Zeichen-Objekte (Zeichenstifte und Pinsel), die augenblicklich im DeviceContect (hDC) des Forms zur Verf
- gung stehen."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 1335
- Left = 60
- TabIndex = 4
- Top = 240
- Width = 2955
- End
- End
- Begin Frame fraEnumObjects
- BackColor = &H00C0C0C0&
- Height = 2235
- Left = 60
- TabIndex = 0
- Top = 60
- Width = 3075
- Begin ListBox lstEnumObjects
- Height = 1785
- Left = 60
- TabIndex = 1
- Top = 300
- Width = 2955
- End
- Begin Label lblEnumObjects
- Alignment = 2 'Center
- BackColor = &H00000000&
- Caption = "Object-Liste:"
- ForeColor = &H00FFFFFF&
- Height = 255
- Left = 0
- TabIndex = 2
- Top = 0
- Width = 3075
- End
- End
- Begin CBVBX EnumBrush
- CBType = 4 ' 4 - EnumObjectsProc
- Left = 0
- Top = 0
- End
- Begin CBVBX EnumPen
- CBType = 4 ' 4 - EnumObjectsProc
- Left = 0
- Top = 0
- End
- Option Explicit
- Sub cmdZur
- ck_Click ()
- Unload Me
- End Sub
- Sub EnumBrush_EnumObjectsProc (lpLogObject As Long, lpdata As Long, RetVal As Integer)
- Dim lb As LogBrush
- TypeAtAdress lb, ByVal lpLogObject, Len(lb)
- lstEnumObjects.AddItem "Brush: " & lb.lbColor
- RetVal = True 'weitermachen
- End Sub
- Sub EnumPen_EnumObjectsProc (lpLogObject As Long, lpdata As Long, RetVal As Integer)
- Dim lp As LogPen
- Dim l As Long
- TypeAtAdress lp, ByVal lpLogObject, Len(lp)
- TypeAtAdress l, ByVal lpdata, Len(l) 'zuerst zeiger derefenzieren
- lstEnumObjects.AddItem "Pen (" & l & "): " & lp.lopnColor
- l = l + 1 'wert erh
- TypeAtAdress ByVal lpdata, l, Len(l) 'neuen wert in adresse lpdata kopieren
- RetVal = True 'weitermachen
- End Sub
- Sub Form_Load ()
- Dim dummy
- Dim l&
- l& = 0
- dummy = EnumObjects(Me.hDC, OBJ_PEN, enumpen.CBAdress, l) 'Adresse von l
- bergeben
- l& = 0
- dummy = EnumObjects(Me.hDC, OBJ_BRUSH, enumbrush.CBAdress, l)
- End Sub
-