home *** CD-ROM | disk | FTP | other *** search
/ Dan Appleman's Visual Bas…s Guide to the Win32 API / Dan.Applmans.Visual.Basic.5.0.Programmers.Guide.To.The.Win32.API.1997.Ziff-Davis.Press.CD / VB5PG32.mdf / vbpg32 / samples5 / ch16 / mdipnt1b.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-02-16  |  1.4 KB  |  45 lines

  1. VERSION 5.00
  2. Begin VB.MDIForm MDIForm1 
  3.    BackColor       =   &H8000000F&
  4.    Caption         =   "MDIForm1"
  5.    ClientHeight    =   5580
  6.    ClientLeft      =   990
  7.    ClientTop       =   2340
  8.    ClientWidth     =   6240
  9.    LinkTopic       =   "MDIForm1"
  10.    Begin VB.PictureBox Picture1 
  11.       Align           =   1  'Align Top
  12.       Height          =   375
  13.       Left            =   0
  14.       Picture         =   "mdiPnt1B.frx":0000
  15.       ScaleHeight     =   345
  16.       ScaleWidth      =   6210
  17.       TabIndex        =   0
  18.       Top             =   0
  19.       Visible         =   0   'False
  20.       Width           =   6240
  21.    End
  22. Attribute VB_Name = "MDIForm1"
  23. Attribute VB_GlobalNameSpace = False
  24. Attribute VB_Creatable = False
  25. Attribute VB_PredeclaredId = True
  26. Attribute VB_Exposed = False
  27. Option Explicit
  28. ' Copyright 
  29.  1996-1997 by Desaware Inc. All Rights Reserved
  30. Private Const GWL_WNDPROC = (-4)
  31. ' GetWindow() Constants
  32. Private Sub MDIForm_Load()
  33.     Dim usewnd&
  34.     usewnd = GetWindow(hWnd, GW_CHILD)
  35.     ' Subclass the MDI client window
  36.     OldWindowProc = GetWindowLong(usewnd, GWL_WNDPROC)
  37.     Call SetWindowLong(usewnd, GWL_WNDPROC, AddressOf SubClass1_WndMessage)
  38.     Form1.Show
  39. End Sub
  40. Private Sub MDIForm_Unload(Cancel As Integer)
  41.     Dim usewnd&
  42.     usewnd = GetWindow(hWnd, GW_CHILD)
  43.     Call SetWindowLong(usewnd, GWL_WNDPROC, OldWindowProc)
  44. End Sub
  45.