home *** CD-ROM | disk | FTP | other *** search
- Option Explicit
-
- '---------------------------------------------------------------'
- ' VB-ASM, Version 1.00 '
- ' Copyright (c) 1994 SoftCircuits Programming '
- ' Redistributed by Permission. '
- ' '
- ' SoftCircuits Programming '
- ' P.O. Box 16262 '
- ' Irvine, CA 92713 '
- ' CompuServe: 72134,263 '
- ' '
- ' This program may be used and distributed freely on the '
- ' condition that it is distributed in full and unchanged, and '
- ' that no fee is charged for such use and distribution with the '
- ' exception or reasonable media and shipping charges. '
- ' '
- ' You may also incorporate any or all portions of this program, '
- ' and/or include the VB-ASM DLL, as part of your own programs '
- ' and distribute such programs without payment of royalties on '
- ' the condition that such program do not duplicate the overall '
- ' functionality of VB-ASM and/or any of its demo programs, and '
- ' that you agree to the following disclaimer. '
- ' '
- ' WARNING: Accessing the low-level services of Windows, DOS and '
- ' the ROM-BIOS using VB-ASM is an extremely powerful technique '
- ' that, if used incorrectly, can cause possible permanent '
- ' damage and/or loss of data. You are responsible for '
- ' determining appropriate use of any and all files included in '
- ' this package. SoftCircuits will not be held liable for any '
- ' damages resulting from the use of these files. '
- ' '
- ' SOFTCIRCUITS SPECIFICALLY DISCLAIMS ALL WARRANTIES, '
- ' INCLUDING, WITHOUT LIMITATION, ALL IMPLIED WARRANTIES OF '
- ' MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND '
- ' NON-INFRINGEMENT OF THIRD PARTY RIGHTS. '
- ' '
- ' UNDER NO CIRCUMSTANCES WILL SOFTCIRCUITS BE LIABLE FOR '
- ' SPECIAL, INCIDENTAL, CONSEQUENTIAL, INDIRECT, OR ANY OTHER '
- ' DAMAGES OR CLAIMS ARISING FROM THE USE OF THIS PRODUCT, '
- ' INCLUDING LOSS OF PROFITS OR ANY OTHER COMMERCIAL DAMAGES, '
- ' EVEN IF WE HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH '
- ' DAMAGES. '
- ' '
- ' Please contact SoftCircuits Programming if you have any '
- ' questions concerning these conditions. '
- ' '
- ' This program shows how to use the vbRecreateCtrl routine to '
- ' set the LBS_NOINTREGALHEIGHT style of a list box. This style '
- ' tells the list box not to automatically adjust its size to be '
- ' an exact multiple of the height of each item (preventing any '
- ' item form being only partially displayed). Normally, this '
- ' style can only be specified when Windows creates the list '
- ' box is created. '
- '---------------------------------------------------------------'
-
- 'VB-ASM DLL declarations
- Type REGS
- AX As Integer
- BX As Integer
- CX As Integer
- DX As Integer
- BP As Integer
- SI As Integer
- DI As Integer
- Flags As Integer
- DS As Integer
- ES As Integer
- End Type
-
- 'REGS Flags bit values
- Global Const FLAGS_CARRY = &H1
- Global Const FLAGS_PARITY = &H4
- Global Const FLAGS_AUX = &H10
- Global Const FLAGS_ZERO = &H40
- Global Const FLAGS_SIGN = &H80
-
- Declare Function vbGetCtrlModel Lib "VBASM.DLL" (ByVal Ctrl As Long) As Long
- Declare Sub vbGetData Lib "VBASM.DLL" (ByVal Pointer As Long, Variable As Any, ByVal nCount As Integer)
- Declare Function vbGetLongPtr Lib "VBASM.DLL" (nVariable As Any) As Long
- Declare Function vbHiByte Lib "VBASM.DLL" (ByVal nValue As Integer) As Integer
- Declare Function vbHiWord Lib "VBASM.DLL" (ByVal nValue As Long) As Integer
- Declare Function vbInp Lib "VBASM.DLL" (ByVal nPort As Integer) As Integer
- Declare Function vbInpw Lib "VBASM.DLL" (ByVal nPort As Integer) As Integer
- Declare Sub vbInterrupt Lib "VBASM.DLL" (ByVal IntNum As Integer, InRegs As REGS, OutRegs As REGS)
- Declare Sub vbInterruptX Lib "VBASM.DLL" (ByVal IntNum As Integer, InRegs As REGS, OutRegs As REGS)
- Declare Function vbLoByte Lib "VBASM.DLL" (ByVal nValue As Integer) As Integer
- Declare Function vbLoWord Lib "VBASM.DLL" (ByVal nValue As Long) As Integer
- Declare Function vbMakeLong Lib "VBASM.DLL" (ByVal nLoWord As Integer, ByVal nHiWord As Integer) As Long
- Declare Function vbMakeWord Lib "VBASM.DLL" (ByVal nLoByte As Integer, ByVal nHiByte As Integer) As Integer
- Declare Sub vbOut Lib "VBASM.DLL" (ByVal nPort As Integer, ByVal nData As Integer)
- Declare Sub vbOutw Lib "VBASM.DLL" (ByVal nPort As Integer, ByVal nData As Integer)
- Declare Function vbPeek Lib "VBASM.DLL" (ByVal nSegment As Integer, ByVal nOffset As Integer) As Integer
- Declare Function vbPeekw Lib "VBASM.DLL" (ByVal nSegment As Integer, ByVal nOffset As Integer) As Integer
- Declare Sub vbPoke Lib "VBASM.DLL" (ByVal nSegment As Integer, ByVal nOffset As Integer, ByVal nValue As Integer)
- Declare Sub vbPokew Lib "VBASM.DLL" (ByVal nSegment As Integer, ByVal nOffset As Integer, ByVal nValue As Integer)
- Declare Function vbRealModeIntX Lib "VBASM.DLL" (ByVal IntNum As Integer, InRegs As REGS, OutRegs As REGS) As Integer
- Declare Function vbRecreateCtrl Lib "VBASM.DLL" (ByVal Ctrl As Long) As Integer
- Declare Function vbSAdd Lib "VBASM.DLL" (Variable As String) As Integer
- Declare Sub vbSetData Lib "VBASM.DLL" (ByVal Pointer As Long, Variable As Any, ByVal nCount As Integer)
- Declare Function vbShiftLeft Lib "VBASM.DLL" (ByVal nValue As Integer, ByVal nBits As Integer) As Integer
- Declare Function vbShiftRight Lib "VBASM.DLL" (ByVal nValue As Integer, ByVal nBits As Integer) As Integer
- Declare Function vbSSeg Lib "VBASM.DLL" (Variable As String) As Integer
- Declare Function vbVarPtr Lib "VBASM.DLL" (Variable As Any) As Integer
- Declare Function vbVarSeg Lib "VBASM.DLL" (Variable As Any) As Integer
-
- 'MODEL structure used by each VB control
- Type MODEL
- usVersion As Integer 'VB version used by control
- fl As Long 'Bitfield structure
- pctlproc As Long 'The control proc.
- fsClassStyle As Integer 'Window class style
- flWndStyle As Long 'Default window style
- cbCtlExtra As Integer '# bytes alloc'd for HCTL structure
- idBmpPalette As Integer 'BITMAP id for tool palette
- npszDefCtlName As Integer 'Default control name prefix
- npszClassName As Integer 'Visual Basic class name
- npszParentClassName As Integer 'Parent window class if subclassed
- npproplist As Integer 'Property list
- npeventlist As Integer 'Event list
- nDefProp As String * 1 'Index of default property
- nDefEvent As String * 1 'Index of default event
- nValueProp As String * 1 'Index of control value property
- usCtlVersion As Integer 'Identifies the current version of the custom control. The values 1
- End Type 'and 2 are reserved for custom controls created with VB 1.0 and 2.0
-
- Global Const LBS_NOINTEGRALHEIGHT = &H100&
-
-