home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / controls / drawpic / drawvbp / drawpic.frm next >
Text File  |  1998-03-26  |  3KB  |  108 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   4140
  5.    ClientLeft      =   1140
  6.    ClientTop       =   1515
  7.    ClientWidth     =   6690
  8.    Height          =   4545
  9.    Left            =   1080
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4140
  12.    ScaleWidth      =   6690
  13.    Top             =   1170
  14.    Width           =   6810
  15.    Begin VB.CommandButton Command3 
  16.       Caption         =   "Add Icons"
  17.       Height          =   375
  18.       Left            =   2520
  19.       TabIndex        =   3
  20.       Top             =   3360
  21.       Width           =   1455
  22.    End
  23.    Begin VB.CommandButton Command2 
  24.       Caption         =   "Clear Pictures"
  25.       Height          =   375
  26.       Left            =   4080
  27.       TabIndex        =   2
  28.       Top             =   3360
  29.       Width           =   1455
  30.    End
  31.    Begin VB.CommandButton Command1 
  32.       Caption         =   "Add Pictures"
  33.       Height          =   375
  34.       Left            =   960
  35.       TabIndex        =   1
  36.       Top             =   3360
  37.       Width           =   1455
  38.    End
  39.    Begin DRAWPICLib.DrawPic DrawPic1 
  40.       Height          =   2295
  41.       Left            =   1080
  42.       TabIndex        =   0
  43.       Top             =   480
  44.       Width           =   4335
  45.       _Version        =   65536
  46.       _ExtentX        =   7646
  47.       _ExtentY        =   4048
  48.       _StockProps     =   0
  49.    End
  50. End
  51. Attribute VB_Name = "Form1"
  52. Attribute VB_Creatable = False
  53. Attribute VB_Exposed = False
  54. ' This is a part of the Microsoft Foundation Classes C++ library.
  55. ' Copyright (C) 1992-1997 Microsoft Corporation
  56. ' All rights reserved.
  57. '
  58. ' This source code is only intended as a supplement to the
  59. ' Microsoft Foundation Classes Reference and related
  60. ' electronic documentation provided with the library.
  61. ' See these sources for detailed information regarding the
  62. ' Microsoft Foundation Classes product.'
  63. '
  64. Private Sub Command1_Click()
  65.     Dim Pic As Picture
  66.     Dim RetVal As Boolean
  67.     
  68.     Set Pic = LoadPicture(App.Path + "\Pic1.bmp")
  69.     RetVal = DrawPic1.AddPicture(Pic)
  70.     
  71.     Set Pic = LoadPicture(App.Path + "\Pic2.bmp")
  72.     RetVal = DrawPic1.AddPicture(Pic)
  73.     
  74.     Set Pic = LoadPicture(App.Path + "\Pic3.bmp")
  75.     RetVal = DrawPic1.AddPicture(Pic)
  76.     
  77.     Set Pic = LoadPicture(App.Path + "\Pic4.bmp")
  78.     RetVal = DrawPic1.AddPicture(Pic)
  79.     
  80. End Sub
  81.  
  82.  
  83. Private Sub Command2_Click()
  84.     DrawPic1.ClearImageList
  85. End Sub
  86.  
  87.  
  88. Private Sub Command3_Click()
  89.     Dim Pic As Picture
  90.     Dim RetVal As Boolean
  91.     
  92.     Set Pic = LoadPicture(App.Path + "\Pic1.ico")
  93.     RetVal = DrawPic1.AddPicture(Pic)
  94.     
  95.     Set Pic = LoadPicture(App.Path + "\Pic2.ico")
  96.     RetVal = DrawPic1.AddPicture(Pic)
  97.     
  98.     Set Pic = LoadPicture(App.Path + "\Pic3.ico")
  99.     RetVal = DrawPic1.AddPicture(Pic)
  100.     
  101.     Set Pic = LoadPicture(App.Path + "\Pic4.ico")
  102.     RetVal = DrawPic1.AddPicture(Pic)
  103.     
  104.  
  105. End Sub
  106.  
  107.  
  108.