Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The C0000005 Fatal Exception Error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00183223
Message ID:
00184029
Vues:
150
>>It's unfortunate that this problem is persistant. Apperantly, Microsoft knows about this problem and they can't do anything about because they can't seem to recreate the problem on a constant basis. You seem to have found a way of recreating this problem time and time again. You may want to report it to MS so they can recreate the problem and debug it because it's driving me NUTS!
>Hi Victor,
>
>Since Randy Brown frequents this place here's the code.
* This is a separate prg file named cIList.
>DEFINE CLASS cImageList AS OLECONTROL
>  .Height = 45
>  .Left = 141
>  .Top = 145
>  .Width = 52
>ENDDEFINE
>* This is the code for the subclassed TreeView in CTView.prg
>DEFINE CLASS CTreeView AS OLECONTROL
>  #INCLUDE TreeView.h
>
>  .Object.Appearance = 1
>  .Object.BorderStyle = 0
>  .Object.Height = 185
>  .Object.Indentation = 20
>  .Object.LabelEdit = tvwManual
>  .Object.Left = 12
>  .Object.LineStyle = tvwTreeLines
>  .Object.MousePointer = 0
>  .Object.OLEDragMode = 0
>  .Object.OLEDropMode = 0
>  .Object.Style = tvwTreelinesPlusMinusPictureText
>  .Object.Top = 12
>  .Object.Width = 150
>
>  Height = 185
>  Left = 12
>  Top = 12
>  Width = 150
>
>  PROCEDURE Click
>
>    This.Parent.DisableCk.Refresh
>  ENDPROC
>ENDDEFINE
>* This is the method code in the class library
>IF "6." $ VERSION()
>  lctreeclass = "MSComctlLib.Treectrl.2"
>  lcimageclass = "MSComctlLib.ImageListCtrl.2"
>ELSE
>  lctreeclass = "COMCTL.Treectrl.1"
>  lcimageclass = "COMCTL.ImageListCtrl.1"
>ENDIF
>SET PROCEDURE TO cIList ADDITIVE
>* VFP Reports a Syntax error here first
>* On second attempt a C0000005 error occurs.
>This.AddObject('ObjImages', "cImageList", lcimageclass)
>* This does not (Note: SET PROCEDURE line removed)
>This.AddObject('ObjImages', "OLEControl", lcimageclass)
>* The following works fine.
>WITH This.ObjImages
>  .Height = 45
>  .Left = 141
>  .Top = 145
>  .Width = 52
>  .MaskColor = 16777215
>  .ImageHeight = 16
>  .ImageWidth = 17
>  .MaskColor = .T.
>  FOR lni = 0 TO 17
>    .ListImages.Add(,,ThisForm.CtrlPicClip.GraphicCell(lni))
>  NEXT
>ENDWITH
>SET PROCEDURE TO CTView ADDITIVE
>This.AddObject('ObjTree', "CTreeView", lctreeclass)
>WITH This.ObjTree
>  .Font.Name = "MS Sans Serif"
>  .Font.Size = 8.25
>  .ImageList = ThisForm.ObjImages.Object
>  .Visible = .T.
>ENDWITH
>I hasten to point out that this was done in VFP 6.0.

Thanks for code sample. I'll take a look at it asap.

RB
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform