home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l391_1 / 4.ddi / CUSTEVNT.AS$ / CUSTEVNT.bin
Encoding:
Text File  |  1992-08-19  |  4.2 KB  |  116 lines

  1. ; ----------------------------------------------------------------------------
  2. ; CUSTEVNT.ASM: Custom Control Event Procedures
  3. ;
  4. ; Custom control event procedure templates created by
  5. ; CUSTGEN.EXE (Custom Control Template Generator).
  6. ;
  7. ; CUSTGEN.EXE is a utility provided to make custom
  8. ; control development easier.  It allows you to select
  9. ; the events you want your custom control to respond to,
  10. ; then generates code templates and a custom control
  11. ; registration routine for these events.
  12. ;
  13. ; Modify the code template file as necessary, then build
  14. ; your custom control as follows:
  15. ;    ML -c <RegisterFile>          ; Assumes Masm 6.0 compiler
  16. ;    ML -c <TemplateFile>
  17. ;    DEL <TemplateFile.LIB>        ; Delete existing library if exists
  18. ;    LIB <TemplateFile.LIB>+<RegisterFile.OBJ>+<TemplateFile.OBJ>
  19. ;    LINK /Q <TemplateFile.LIB>,<TemplateFile.QLB>,,VBDOSQLB.LIB;
  20. ; You can combine multiple custom controls into one Quick library for
  21. ; use within the programming environment as follows:
  22. ;    DEL <CombinedLib.LIB>         ; Delete existing library if exists
  23. ;    LIB <CombinedLib.LIB>+<Cust1.LIB>+<Cust2.LIB>+<CustN.LIB>
  24. ;    LINK /Q <CombinedLib.LIB>,<CombinedLib.QLB>,,VBDOSQLB.LIB;
  25. ;
  26. ;
  27. ; Copyright (C) 1982-1992 Microsoft Corporation
  28. ;
  29. ; You have a royalty-free right to use, modify, reproduce
  30. ; and distribute the sample applications and toolkits provided with
  31. ; Visual Basic for MS-DOS (and/or any modified version)
  32. ; in any way you find useful, provided that you agree that
  33. ; Microsoft has no warranty, obligations or liability for
  34. ; any of the sample applications or toolkits.
  35. ; ----------------------------------------------------------------------------
  36. ;
  37. ; Memory model and include files.
  38. .MODEL    medium, basic
  39.  
  40. ; Include file containing constant definitions for
  41. ; Property, Event, Method and ControlType ID numbers.
  42. INCLUDE   CUSTINCL.INC
  43.  
  44. ; Callback declarations for invoking methods and events and getting
  45. ; and setting properties.  These callbacks accept a variable number 
  46. ; and types of arguments depending on the method or event that is 
  47. ; being invoked.
  48. EXTRN InvokeEvent:FAR
  49. EXTRN InvokeMethod:FAR
  50. EXTRN GetProperty:FAR
  51. EXTRN SetProperty:FAR
  52. EXTRN GetContainer:FAR
  53. EXTRN SetAttribute:FAR            ; Refer to custom control section
  54.                                   ; in README.TXt for information on
  55.                                   ; using this callback.
  56.  
  57.  
  58. .CODE   MyControl_TEXT
  59.  
  60.  
  61. PUBLIC   MyControl_CClick
  62. MyControl_CClick PROC, Ctrl:WORD, ControlId:WORD
  63.  
  64. ;
  65. ; Place your comments and code for this event here.
  66. ; Basic errors are triggered by returning a non-zero value (ERR).
  67. ; Set and get properties and invoke methods and user events and 
  68. ; by using the appropriate callbacks declared above.
  69. ; PropertyID, EventID, and MethodID constant definitions are
  70. ; are contained in the CUSTINCL include file.
  71. ;
  72.  
  73. ; IMPORTANT: You must always have a return value.
  74.     XOR ax,ax                      ; Return no errors
  75.     RET
  76.  
  77. MyControl_CClick ENDP
  78.  
  79. PUBLIC   MyControl_CKeyPress
  80. MyControl_CKeyPress PROC, Ctrl:WORD, ControlId:WORD, KeyAscii:WORD
  81.  
  82. ;
  83. ; Place your comments and code for this event here.
  84. ; Basic errors are triggered by returning a non-zero value (ERR).
  85. ; Set and get properties and invoke methods and user events and 
  86. ; by using the appropriate callbacks declared above.
  87. ; PropertyID, EventID, and MethodID constant definitions are
  88. ; are contained in the CUSTINCL include file.
  89. ;
  90.  
  91. ; IMPORTANT: You must always have a return value.
  92.     XOR ax,ax                      ; Return no errors
  93.     RET
  94.  
  95. MyControl_CKeyPress ENDP
  96.  
  97. PUBLIC   MyControl_CIntegerGet
  98. MyControl_CIntegerGet PROC, Ctrl:WORD, ControlId:WORD, PropertyID:WORD, Value:WORD
  99.  
  100. ;
  101. ; Place your comments and code for this event here.
  102. ; Basic errors are triggered by returning a non-zero value (ERR).
  103. ; Set and get properties and invoke methods and user events and 
  104. ; by using the appropriate callbacks declared above.
  105. ; PropertyID, EventID, and MethodID constant definitions are
  106. ; are contained in the CUSTINCL include file.
  107. ;
  108.  
  109. ; IMPORTANT: You must always have a return value.
  110.     XOR ax,ax                      ; Return no errors
  111.     RET
  112.  
  113. MyControl_CIntegerGet ENDP
  114.  
  115. END
  116.