home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Coop2
- BorderStyle = 1 'Fixed Single
- Caption = "Coop2"
- ClientHeight = 1650
- ClientLeft = 1875
- ClientTop = 4320
- ClientWidth = 4065
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 2055
- Left = 1815
- LinkTopic = "Form1"
- ScaleHeight = 1650
- ScaleWidth = 4065
- Top = 3975
- Width = 4185
- Begin VB.CommandButton ExitBut
- Caption = "Exit"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 525
- Left = 2700
- TabIndex = 8
- Top = 990
- Width = 1245
- End
- Begin DwsbcLibDemo.SubClass SubClass1
- Left = 3450
- Top = 480
- _Version = 262144
- _ExtentX = 847
- _ExtentY = 847
- _StockProps = 0
- CtlParam = ""
- Persist = 0
- RegMessage1 = ""
- RegMessage2 = ""
- RegMessage3 = ""
- RegMessage4 = ""
- RegMessage5 = ""
- Type = 0
- Messages = "COOP2.frx":0000
- End
- Begin VB.Label TotalLab
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1170
- TabIndex = 7
- Top = 1260
- Width = 1155
- End
- Begin VB.Label AmountLab
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1170
- TabIndex = 6
- Top = 900
- Width = 1155
- End
- Begin VB.Label CountLab
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1170
- TabIndex = 5
- Top = 540
- Width = 1155
- End
- Begin VB.Label CompanyLab
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1170
- TabIndex = 4
- Top = 180
- Width = 2745
- End
- Begin VB.Label Label1
- Caption = "Total"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 3
- Left = 150
- TabIndex = 3
- Top = 1260
- Width = 915
- End
- Begin VB.Label Label1
- Caption = "Amount"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 2
- Left = 150
- TabIndex = 2
- Top = 900
- Width = 915
- End
- Begin VB.Label Label1
- Caption = "Count"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 1
- Left = 150
- TabIndex = 1
- Top = 540
- Width = 915
- End
- Begin VB.Label Label1
- Caption = "Company"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 0
- Left = 150
- TabIndex = 0
- Top = 180
- Width = 915
- End
- Attribute VB_Name = "Coop2"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub ExitBut_Click()
- Unload Me
- End Sub
- Private Sub Form_Load()
- Me.Caption = Me.Caption & " hWnd is " & Hex$(Me.hWnd)
- SubClass1.HwndParam = Me.hWnd
- SubClass1.RegMessage1 = COOP_MESSAGE
- End Sub
- #If Win32 Then
- Private Sub SubClass1_WndMessage(wnd As Long, msg As Long, wp As Long, lp As Long, retval As Long, nodef As Integer)
- #Else
- Private Sub SubClass1_WndMessage(wnd As Integer, msg As Integer, wp As Integer, lp As Long, retval As Long, nodef As Integer)
- #End If
- Dim cs As CoopStructure
- Dim lpcs As Long, lres As Long
- ' Get the address of this local CoopStructure
- ' and copy the contents of the lp address to
- ' this local CoopStructure
- lpcs = dwGetAddressForObject(cs)
- #If Win32 Then
- lres = dwXCopyDataBynumFrom(lpcs, lp, Len(cs), wp)
- #Else
- dwCopyDataBynum lp, lpcs, Len(cs)
- #End If
- ' Place the contents of from the CoopStructure into
- ' the Labels on this form.
- #If Win32 Then
- CompanyLab.Caption = StrConv(cs.CompanyName, vbUnicode)
- #Else
- CompanyLab.Caption = cs.CompanyName
- #End If
- CountLab.Caption = cs.count
- AmountLab.Caption = cs.Amount
- TotalLab.Caption = cs.Total
- retval = &H100000FF 'return a value
- nodef = True
- End Sub
-