home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pcmagazi / 1992 / 11 / labnotes / ctrlhwnd.asm next >
Assembly Source File  |  1992-02-24  |  962b  |  30 lines

  1. ;HwndCtrl.ASM -- Function to return hWnd of Visual Basic Control
  2. ;Copyright (c) 1992 Jay Munro
  3. ;First published in PC Magazine June 16, 1992
  4.  
  5. ;----------------------------------------------------------------------------
  6. ;ControlHwnd receives the name of a control (hCtl) and calls Visual Basics
  7. ;internal routine VBGetControlHwnd.  The hWnd of that control is
  8. ;returned in AX.
  9. ;----------------------------------------------------------------------------
  10.  
  11. .286P
  12. .Model Medium
  13.  
  14. Include Labnotes.Inc                     ;Macros etc...  
  15. Public ControlHwnd
  16.  
  17. Extrn VBGetControlHwnd:Proc 
  18.  
  19. .Code
  20. ControlHwnd Proc Far                    ;Export
  21.    ShortWinProlog                       ;DS is never used
  22.    Push Word Ptr [BP+8]                 ;push hiword of hCtl
  23.    Push Word Ptr [BP+6]                 ;push loword of hCtl
  24.    Call VBGetControlHwnd                ;call Visual Basic's API
  25.    ShortWinEpilog
  26.    Ret 4
  27. ControlHwnd EndP
  28.  
  29. End
  30.