Project

General

Profile

Statistics
| Revision:

vdfsplat / AppSrc / cProgramObjects.pkg @ 67

History | View | Annotate | Download (22.8 KB)

1 19 wil
Use cOCXReader.pkg
2
3
4
Enum_List
5
   Define tvPDSRoot
6
   Define tvPDSClient
7
   Define tvPDSNormal
8
   Define tvPDSBitmap
9
   Define tvPDSCheckbox
10
   Define tvPDSCombo
11
   Define tvPDSContainer
12
   Define tvPDSEdit
13
   Define tvPDSSellist
14
   Define tvPDSForm
15
   Define tvPDSGrid
16
   Define tvPDSGroup
17
   Define tvPDSList
18
   Define tvPDSModalPanel
19
   Define tvPDSRadio
20
   Define tvPDSSpin
21
   Define tvPDSTabpage
22
   Define tvPDSTabDialog
23
   Define tvPDSTextbox
24
   Define tvPDSTrack
25
   Define tvPDSTreeview
26
   Define tvPDSView
27
   Define tvPDSRadioGroup
28
   Define tvPDSMenu
29
   Define tvPDSButton
30
   Define tvPDSActiveX
31 25 wil
   Define tvPDSPanel
32 19 wil
End_Enum_List
33
34
Enum_List
35
   Define bmpPDSRoot
36
   Define bmpPDSClient
37
   Define bmpPDSNormal
38
   Define bmpPDSBitmap
39
   Define bmpPDSCheckbox
40
   Define bmpPDSCombo
41
   Define bmpPDSContainer
42
   Define bmpPDSEdit
43
   Define bmpPDSSellist
44
   Define bmpPDSForm
45
   Define bmpPDSGrid
46
   Define bmpPDSGroup
47
   Define bmpPDSList
48
   Define bmpPDSModalPanel
49
   Define bmpPDSRadio
50
   Define bmpPDSSpin
51
   Define bmpPDSTabpage
52
   Define bmpPDSTabDialog
53
   Define bmpPDSTextbox
54
   Define bmpPDSTrack
55
   Define bmpPDSTreeview
56
   Define bmpPDSView
57
   Define bmpPDSRadioGroup
58
   Define bmpPDSMenu
59
   Define bmpPDSButton
60
   Define bmpPDSActiveX
61 25 wil
   Define bmpPDSPanel
62 19 wil
End_Enum_List
63
64
65 29 wil
Enum_List
66
   Define eDfUnknown
67
   Define eDfArray
68
   Define eDfBitmap
69
   Define eDfCheckbox
70
   Define eDfCombo
71
   Define eDfContainer
72
   Define eDfDataDictionary
73
   Define eDfEdit
74
   Define eDfForm
75
   Define eDfGrid
76
   Define eDfGroup
77
   Define eDfList
78
   Define eDfModalPanel
79
   Define eDfRadio
80
   Define eDfSpin
81
   Define eDfTabpage
82
   Define eDfTabDialog
83
   Define eDfTextbox
84
   Define eDfTrack
85
   Define eDfTreeview
86
   Define eDfView
87
   Define eDfRadioGroup
88
   Define eDfMenu
89
   Define eDfButton
90
//   Define eDfActiveX
91
   Define eDfPanel
92
End_Enum_List
93
94
95
96 19 wil
Struct tObj
97
  Boolean  bExists
98
  Handle   hID
99
  String   sName
100
  String   sShortName
101
  Integer  iChildCount
102
  Integer  eWindowsClass
103 29 wil
  String   sWindowsClass
104
  Integer  eDfClass
105 19 wil
  String   sProgID
106 25 wil
  String   sOCXName
107 29 wil
  Boolean  bDD             // is dd enabled
108
  Integer  iFile
109
  Integer  iField
110
  Integer  iInternalCount  // unused
111
  Handle   hParent
112 19 wil
  Handle   hFirstChild
113
  Handle   hLastChild
114
  Handle   hPrevious
115 29 wil
  Handle   hNext
116 19 wil
End_Struct
117
118
119 20 wil
Class cProgramObjects is a cObject
120 19 wil
  Procedure Construct_Object
121
    Forward Send Construct_Object
122
    Property tObj[] pObjects
123
    Property tOCX[] pOCXs
124
125
  End_Procedure //
126
127
  Function ReadControlByProgID String sProgID Returns tOCX
128
    Handle  hoReader
129
    tOCX   OCX
130
131
    Move sProgID  To OCX.sProgID
132
    Get Create (RefClass(cOCXReader)) To hoReader
133
    If (hoReader) Begin
134
      Get ReadControlByProgID of hoReader sProgID To OCX
135
      Send Destroy       of hoReader
136
    End
137
    Function_Return OCX
138
  End_Function
139
140 25 wil
141
  Function IsOCXinArray String sProgID Returns Integer
142
    Integer iItem
143 19 wil
    Integer iOCX
144
    Integer iCount
145
    tOCX[]  OCXs
146
147 25 wil
    Move -1 To iItem
148 19 wil
    Get pOCXs To OCXs
149
    Move (SizeOfArray(OCXs)) To iCount
150
    For iOCX from 0 To (iCount-1)
151
      If (OCXs[iOCX].sProgID=sProgID) Begin
152 25 wil
        Move iOCX   To iItem
153 19 wil
        Move iCount To iOCX
154
      End
155
    Loop
156
157 25 wil
    Function_Return iItem
158 19 wil
  End_Function
159
160 25 wil
  Function AddToOCXArray String sProgID Returns String
161
    Integer iOCX
162
    String  sControlName
163 19 wil
    Integer iCount
164
    tOCX[]  OCXs
165
166
    Get pOCXs To OCXs
167
    Move (SizeOfArray(OCXs)) To iCount
168 25 wil
    Get IsOCXinArray sProgID To iOCX
169
    If (iOCX=-1) Begin
170 19 wil
      Get ReadControlByProgID sProgID To OCXs[iCount]
171 25 wil
      Set pOCXs To OCXs
172
      Move OCXs[iCount].sName To sControlName
173 19 wil
    End
174 25 wil
    Else Begin
175
      Move OCXs[iOCX].sName To sControlName
176
    End
177
    Function_Return sControlName
178
  End_Function //
179 19 wil
180 24 wil
  //
181
  // String eval return output comes with quotes (eww)
182
  //
183
  Function RemoveQuotes String sValue Returns String
184
    Move (Mid(sValue,length(sValue)-2,2)) To sValue
185
    Function_Return sValue
186
  End_Function
187
188 25 wil
  Function PropertyStringEval String sProperty Handle hObject Returns String
189 24 wil
    Handle  hoDebugger
190
    String  sResult
191
    String  sValue
192
    Boolean bOK
193
194
    Move "" To sValue
195
    Get phoDebugger To hoDebugger
196
    If (hoDebugger and sProperty<>"") Begin
197
      Move "" To sResult
198
      Get ComEval of hoDebugger (sProperty+"("+trim(hObject)+")") (&sResult) to bOK
199
      If (bOk) begin
200
        Get RemoveQuotes sResult To sValue
201
      End
202
    End
203
    Function_Return sValue
204
  End_Function
205
206 29 wil
  Function StringEval String sEval Returns String
207
    Handle  hoDebugger
208
    String  sResult
209
    String  sValue
210
    Boolean bOK
211
212
    Move "" To sValue
213
    Get phoDebugger To hoDebugger
214
    If (hoDebugger) Begin
215
      Move "" To sResult
216
      Get ComEval of hoDebugger (sEval) (&sResult) to bOK
217
      If (bOk) begin
218
        Get RemoveQuotes sResult To sValue
219
      End
220
    End
221
    Function_Return sValue
222
  End_Function
223
224 25 wil
  Function PropertyIntegerEval String sProperty Handle hObject Returns Integer
225 24 wil
    Handle  hoDebugger
226
    String  sResult
227
    Integer iValue
228
    Boolean bOK
229
230
    Move 0 To iValue
231
    Get phoDebugger To hoDebugger
232
    If (hoDebugger and sProperty<>"") Begin
233
      Move "" To sResult
234
      Get ComEval of hoDebugger (sProperty+"("+trim(hObject)+")") (&sResult) to bOK
235
      If (bOk) begin
236
        Move sResult To iValue
237
      End
238
    End
239
    Function_Return iValue
240
  End_Function
241
242 53 wil
  Function PropertyVariantEval String sProperty Handle hObject Returns Variant
243
    Handle  hoDebugger
244
    String  sResult
245
    Variant vValue
246
    Boolean bOK
247
248
    Move (NullComObject()) To vValue
249
    Get phoDebugger To hoDebugger
250
    If (hoDebugger and sProperty<>"") Begin
251
      Move "" To sResult
252
      Get ComEval of hoDebugger (sProperty+"("+trim(hObject)+")") (&sResult) to bOK
253
      If (bOk) begin
254
        Move sResult To vValue
255
      End
256
    End
257
    Function_Return vValue
258
  End_Function
259
260 25 wil
  Function PropertyHandleEval String sProperty Handle hObject Returns Handle
261
    Handle  hoDebugger
262
    String  sResult
263
    Integer hoValue
264
    Boolean bOK
265
266
    Move 0 To hoValue
267
    Get phoDebugger To hoDebugger
268
    If (hoDebugger and sProperty<>"") Begin
269
      Move "" To sResult
270
      Get ComEval of hoDebugger (sProperty+"("+trim(hObject)+")") (&sResult) to bOK
271
      If (bOk) begin
272
        Move sResult To hoValue
273
      End
274
    End
275
    Function_Return hoValue
276
  End_Function
277
278
  Function PropertyBooleanEval String sProperty Handle hObject Returns Boolean
279
    Handle  hoDebugger
280
    String  sResult
281
    Boolean bValue
282
    Boolean bOK
283
284
    Move False To bValue
285
    Get phoDebugger To hoDebugger
286
    If (hoDebugger and sProperty<>"") Begin
287
      Move "" To sResult
288
      Get ComEval of hoDebugger (sProperty+"("+trim(hObject)+")") (&sResult) to bOK
289
      If (bOk) begin
290
        Move sResult To bValue
291
      End
292
    End
293
    Function_Return bValue
294
  End_Function
295
296 19 wil
  Function Program_Total_Objects Returns Integer
297
    String  sResult
298
    Handle  hoDebugger
299
    Integer iTotalObjects
300
    Boolean bOK
301
302
    Move 0 To iTotalObjects
303
    Get phoDebugger To hoDebugger
304
    If (hoDebugger) Begin
305
      Move "" To sResult
306
      Get ComEval of hoDebugger "total_objects" (&sResult) to bOK
307
      If (bOk) begin
308
        Move (sResult) To iTotalObjects
309
      End
310
    End
311
    Function_Return iTotalObjects
312
  End_Function
313
314
315
  Function Debuggee_Window_Handle Handle hObject Returns Handle
316
    String  sResult
317
    Handle  hoDebugger
318
    Handle  hWnd
319
    Boolean bOK
320
321
    Move 0 To hWnd
322
    Get phoDebugger To hoDebugger
323
    If (hoDebugger) Begin
324
      Move "" To sResult
325
      Get ComEval of hoDebugger ("Window_Handle("+trim(hObject)+")") (&sResult) to bOK
326
      If (bOk) begin
327
        Move (sResult) To hWnd
328
      End
329
    End
330
    Function_Return hWnd
331
  End_Function
332
333
334
  Function WindowsClassname Integer hObject Returns String
335
    String  sClassName
336
    Handle  hWnd
337
    Integer nChar
338
339
    Move "" To sClassName
340
    If (hObject>1) Begin
341
      Get Debuggee_Window_Handle hObject To hWnd
342
      If (hWnd<>0) Begin
343 54 wil
        ZeroString 120 to sClassName
344
        Move (GetClassName(hWnd,AddressOf(sClassName),119)) To nChar
345 19 wil
        If (nChar<>0) Begin
346 54 wil
          Move (Left(CString(sClassName),nChar)) To sClassName
347 19 wil
        End
348
        Else Move "" To sClassname
349
      End
350
      Else Move "" To sClassname
351
    End
352
    Function_Return sClassName
353
  End_Function // WindowsClassname
354
355
  Function Debuggee_Object_id Handle hObject Returns Handle
356
    String  sResult
357
    Handle  hoDebugger
358
    Handle  hObjectID
359
    Boolean bOK
360
361
    Move 0 To hObjectID
362
    Get phoDebugger To hoDebugger
363
    If (hoDebugger) Begin
364
      Move "" To sResult
365
      Get ComEval of hoDebugger ("Object_id("+trim(hObject)+")") (&sResult) to bOK
366
      If (bOk) begin
367
        Move (sResult) To hObjectID
368
      End
369
    End
370
    Function_Return hObjectID
371
  End_Function
372
373
  Function Debuggee_Object_Label Integer hObject Returns String
374
    Handle  hoDebugger
375
    String  sResult
376
    String  sLabel
377
    Boolean bOK
378
379
    Move "" To sLabel
380
    Get phoDebugger To hoDebugger
381
    If (hoDebugger) Begin
382
      Move "" To sResult
383
      Get ComEval of hoDebugger ("Object_Label("+trim(hObject)+")") (&sResult) to bOK
384
      If (bOk) begin
385 22 wil
        Get RemoveQuotes sResult To sLabel
386 19 wil
      End
387
    End
388
    Function_Return sLabel
389
  End_Function
390
391
  Function Debuggee_Object_Name Integer hObject Returns String
392
    Handle  hoDebugger
393
    String  sResult
394
    String  sName
395
    Boolean bOK
396
397
    Move "" To sName
398
    Get phoDebugger To hoDebugger
399
    If (hoDebugger) Begin
400
      Move "" To sResult
401
      Get ComEval of hoDebugger ("Name("+trim(hObject)+")") (&sResult) to bOK
402
      If (bOk) begin
403 22 wil
        Get RemoveQuotes sResult To sName
404 19 wil
      End
405
    End
406
    Function_Return sName
407
  End_Function
408
409
  Function Debuggee_Object_Child_Count Integer hObject Returns Integer
410
    Handle  hoDebugger
411
    String  sResult
412
    Integer iChildCount
413
    Boolean bOK
414
415
    Move 0 To iChildCount
416
    Get phoDebugger To hoDebugger
417
    If (hoDebugger) Begin
418
      Move "" To sResult
419
      Get ComEval of hoDebugger ("Child_Count("+trim(hObject)+")") (&sResult) to bOK
420
      If (bOk) begin
421
        Move (sResult) To iChildCount
422
      End
423
    End
424
    Function_Return iChildCount
425
  End_Function
426
427
  Function Debuggee_Object_Parent Integer hObject Returns handle
428
    String  sResult
429
    Handle  hoDebugger
430
    Handle  hParent
431
    Boolean bOK
432
433
    Move 0 To hParent
434
    Get phoDebugger To hoDebugger
435
    If (hoDebugger) Begin
436
      Move "" To sResult
437
      Get ComEval of hoDebugger ("Parent("+trim(hObject)+")") (&sResult) to bOK
438
      If (bOk) begin
439
        Move (sResult) To hParent
440
      End
441
    End
442
    Function_Return hParent
443
  End_Function
444 20 wil
445
  Function Debuggee_Client_Area_State Integer hObject Returns Boolean
446
    String  sResult
447
    Handle  hoDebugger
448
    Boolean bState
449
    Boolean bOK
450
451
    Move False To bState
452
    Get phoDebugger To hoDebugger
453
    If (hoDebugger) Begin
454
      Move "" To sResult
455
      Get ComEval of hoDebugger ("Client_Area_State("+trim(hObject)+")") (&sResult) to bOK
456
      If (bOk) begin
457
        Move (sResult) To bState
458
      End
459
    End
460
    Function_Return bState
461
  End_Function
462 19 wil
463
  Procedure CreateObjectArray
464
    Integer  iItem
465
    Integer  iChildCount
466
    Integer  iTotalObjects
467
    Integer  eClassName
468
    Handle   hObject
469
    Handle   hParent
470 29 wil
    Handle   hPrevious
471 19 wil
    String   sShortName
472
    String   sClassName
473
    String   sName
474
    String   sProgID
475 25 wil
    String   sOCXName
476 19 wil
    tObj[]   Obj
477
    tOCX[]   OCXs
478
479
    Move (ResizeArray(OCXs,0)) To OCXs
480
    Set pOCXs To OCXs
481
482
    Move (ResizeArray(Obj,0)) To Obj
483
    Get Program_Total_Objects To iTotalObjects
484 54 wil
    For iItem from 1 To iTotalObjects         // iItem is actually the DataFlex object id
485
      Get Debuggee_Object_Id iItem To hObject // is the object id valid?
486 19 wil
      If (hObject<>0) begin
487 25 wil
        Move "" To sOCXName
488
        Move "" To sProgID
489 19 wil
        Get Debuggee_Object_Label       iItem To sShortName
490
        Get Debuggee_Object_Name        iItem To sName
491
        Get Debuggee_Object_Child_Count iItem To iChildCount
492
        Get Debuggee_Object_Parent      iItem To hParent
493
        Get WindowsClassName iItem To sClassname
494
        Get WindowsClassFromString sClassName To eClassName
495
        If (eClassName=bmpPDSActiveX) Begin
496 24 wil
          Get PropertyStringEval "psProgId" iItem to sProgID
497 19 wil
          If (sProgID<>"") Begin
498 25 wil
            Get AddToOCXArray sProgID To sOCXName
499 19 wil
          End
500
        End
501
502
        Move True        To Obj[iItem].bExists
503
        Move iItem       To Obj[iItem].hID
504
        Move sShortName  To Obj[iItem].sShortName
505
        Move sName       To Obj[iItem].sName
506
        Move iChildCount To Obj[iItem].iChildCount
507
        Move hParent     To Obj[iItem].hParent
508
        Move eClassName  To Obj[iItem].eWindowsClass
509 29 wil
        Move sClassName  To Obj[iItem].sWindowsClass
510 19 wil
        Move sProgID     To Obj[iItem].sProgID
511 25 wil
        Move sOCXName    To Obj[iItem].sOCXName
512 29 wil
        If (hParent<iItem) Begin // should always be the case
513
          If (Obj[hParent].hFirstChild=0) Begin
514
            Move iItem To Obj[hParent].hFirstChild
515
          End
516
          If (Obj[hParent].hLastChild<>0) Begin
517
            // Previous Child
518
            Move Obj[hParent].hLastChild To hPrevious
519
            If (hPrevious<iItem) Begin
520
              Move iItem     To Obj[hPrevious].hNext
521
              Move hPrevious To Obj[iItem].hPrevious
522
            End
523
          End
524
          Move iItem To Obj[hParent].hLastChild
525
        End
526 19 wil
      End
527
    Loop
528
    Set pObjects To Obj
529
  End_Procedure
530
531
   Function WindowsClassFromString String sClassName Returns Handle
532
    Integer iiImage
533
    Integer hWnd     hWnd2
534
    String  sObjName
535 54 wil
536
    Move (Lowercase(sClassName)) To sClassName
537 19 wil
    Case Begin
538
      Case (sClassname="dfform")
539
        Move bmpPDSForm to iiImage
540
        Case break
541
      Case (sClassname="dfeditbox")
542
        Move bmpPDSEdit to iiImage
543
        Case break
544
      Case (sClassname="dftextbox")
545
        Move bmpPDSTextbox to iiImage
546
        Case break
547
      Case (sClassname="dfmenu")
548
        Move bmpPDSButton to iiImage
549
        //Move bmpPDSMenu To iImage
550
        //Get name Of hObj To sObjName
551
        //Get Window_Handle Of hObj To hWnd  // --> returns incorrect value
552
        //Get Container_Handle Of hObj To hWnd2
553
        //Showln "<" sClassname "> --[" sObjName "] HANDLE = $" (IntToHex(hWnd)) "== CONTHWND $" (IntToHex(hWnd2))
554
        Case break
555
      Case (sClassname="dfgroup") // group
556
        Move bmpPDSGroup to iiImage
557
        Case break
558
      Case (sClassname="dfdialogclass") // container
559
        Move bmpPDSContainer to iiImage
560
        Case break
561
      Case (sClassname="dfcombobox") // comboform
562
        Move bmpPDSCombo to iiImage
563
        Case break
564
      Case (sClassname="dfmdichildclass") // view
565
        Move bmpPDSView To iiImage
566
        Case break
567
      Case (sClassname="dfwinclass") // toolpanel
568
        Move bmpPDSModalPanel to iiImage
569
        Case break
570
      Case (sClassname="dfmdiclient") // ClientArea
571
        Move bmpPDSModalPanel to iiImage
572
        Case break
573
      Case (sClassname="dfsystabcontrol32") // Tabdialog
574
        Move bmpPDSTabDialog to iiImage
575
        Case break
576
      Case (sClassname="dfformlist") // Grid (or List)
577
        Move bmpPDSGrid to iiImage
578
        Case break
579
      Case (sClassname="cvdfshape") // DFShape (some bitmapalike object)
580
        Move bmpPDSBitmap to iiImage
581
        Case break
582
      Case (sClassname="afxolecontrol42") // activex
583
        Move bmpPDSActiveX to iiImage
584
        Case break
585 25 wil
      Case (sClassname="dfframeclass") // panel
586
        Move bmpPDSPanel to iiImage
587
        Case break
588 19 wil
      Case Else
589
        Move -1 To iiImage
590
    Case End
591
    Function_Return iiImage
592
  End_Function // WindowsClassFromString
593 29 wil
594
   //
595
   // Obsolete, use ObjectWindowsClassName instead.
596
   //
597 19 wil
   Function WindowsClassToString Integer eClassName Returns String
598
    String  sClassName
599
600
    Case Begin
601
      Case (eClassname=bmpPDSForm)
602
        Move "dfForm" To sClassName
603
        Case break
604
      Case (eClassname=bmpPDSEdit)
605
        Move "dfEditBox" To sClassName
606
        Case break
607
      Case (eClassname=bmpPDSTextbox)
608
        Move "dfTextBox" To sClassName
609
        Case break
610
      Case (eClassname=bmpPDSButton)
611
        Move "dfmenu" To sClassName
612
        Case break
613
      Case (eClassname=bmpPDSGroup)
614
        Move "dfGroup" To sClassName
615
        Case break
616
      Case (eClassname=bmpPDSContainer)
617
        Move "dfDialogClass" To sClassName
618
        Case break
619
      Case (eClassname=bmpPDSCombo)
620
        Move "dfComboBox" To sClassName
621
        Case break
622
      Case (eClassname=bmpPDSView)
623
        Move "dfMDIChildClass" To sClassName
624
        Case break
625
      Case (eClassname=bmpPDSModalPanel)
626
        Move "dfWinClass" To sClassName
627
        Case break
628
      Case (eClassname=bmpPDSModalPanel) // ClientArea
629
        Move "dfMDIClient" To sClassName
630
        Case break
631
      Case (eClassname=bmpPDSTabDialog) // Tabdialog
632
        Move "dfSysTabControl32" To sClassName
633
        Case break
634
      Case (eClassname=bmpPDSGrid) // Grid (or List)
635
        Move "dfFormList" To sClassName
636
        Case break
637
      Case (eClassname=bmpPDSBitmap) // DFShape (some bitmapalike object)
638
        Move "cVdfShape" To sClassName
639
        Case break
640
      Case (eClassname=bmpPDSActiveX) // activex
641
        Move "AfxOleControl42" To sClassName
642
        Case break
643 25 wil
      Case (eClassname=bmpPDSPanel) // panel
644
        Move "dfFrameClass" To sClassName
645
        Case break
646 19 wil
      Case Else
647
        Move "Unknown" To sClassName
648
    Case End
649
    Function_Return sClassName
650
  End_Function // WindowsClassToString
651
652
   Function xBitmapIDForObj Integer hObj Returns Handle
653
    Integer iiImage
654
    Integer hWnd     hWnd2
655
    String  sObjName
656
    String  sClassname
657 20 wil
    Boolean bClientArea
658 19 wil
659
    Integer eWindowsClass
660
    Integer iCount
661
    Integer iChildCount
662
    tObj[]  Obj
663
664
    Get pObjects To Obj
665
    Move (SizeOfArray(Obj)) To iCount
666
    If (hObj<iCount and hObj<>0) Begin
667
      If (Obj[hObj].bExists)  Begin
668
        Move Obj[hObj].eWindowsClass To eWindowsClass
669
      End
670
    End
671
672
    If (eWindowsClass=-1) Begin
673
      //Get name Of hObj To sObjName
674
      Get Debuggee_Object_Name hObj To sObjName
675
      Get WindowsClassName hObj To sClassname
676 24 wil
//      Showln "<" sClassname "> --[" sObjName "]"
677 20 wil
      Get Debuggee_Client_Area_State hObj to bClientArea
678
      If bClientArea Begin
679 19 wil
        Move bmpPDSClient to iiImage
680
      End
681
      Else Begin
682
        Move bmpPDSNormal to iiImage
683
      End
684
    End
685
    Else Begin
686
      Move eWindowsClass To iiImage
687
    End
688
    Function_Return iiImage
689
  End_Function // xBitmapIDForObj
690
691
692
  Function ChildCount Handle hParent Returns Handle
693
    Integer iCount
694
    Integer iChildCount
695
    tObj[]  Obj
696
697
    Get pObjects To Obj
698
    Move (SizeOfArray(Obj)) To iCount
699
    If (hParent<iCount and hParent<>0) Begin
700
      If (Obj[hParent].bExists)  Begin
701
        Move Obj[hParent].iChildCount To iChildCount
702
      End
703
    End
704
    Function_Return iChildCount
705
  End_Function
706
707
708
  Function ShortName Handle hObj Returns String
709
    Integer iCount
710
    String  sName
711
    tObj[]  Obj
712
713
    Get pObjects To Obj
714
    Move (SizeOfArray(Obj)) To iCount
715
    If (hObj<iCount and hObj<>0) Begin
716
      If (Obj[hObj].bExists)  Begin
717
        Move Obj[hObj].sShortName to sName
718
      End
719
    End
720
    Function_Return sName
721
  End_Function
722
723
  Function ProgID handle hObj Returns String
724
    Integer iCount
725
    String  sProgID
726
    tObj[]  Obj
727
728
    Move "" To sProgID
729
    Get pObjects To Obj
730
    Move (SizeOfArray(Obj)) To iCount
731
    If (hObj<iCount and hObj<>0) Begin
732
      If (Obj[hObj].bExists and Obj[hObj].eWindowsClass=bmpPDSActiveX)  Begin
733
        Move Obj[hObj].sProgID to sProgID
734
      End
735
    End
736
    Function_Return sProgID
737
  End_Function
738
739 29 wil
  Function ObjectWindowsClassName handle hObj Returns String
740
    Integer iCount
741
    String  sClassName
742
    tObj[]  Obj
743
744
    Move "" To sClassName
745
    Get pObjects To Obj
746
    Move (SizeOfArray(Obj)) To iCount
747
    If (hObj<iCount and hObj<>0) Begin
748
      If (Obj[hObj].bExists)  Begin
749
        Move Obj[hObj].sWindowsClass to sClassName
750
      End
751
    End
752
    Function_Return sClassName
753
  End_Function
754
755 25 wil
  Function ActivexName handle hObj Returns String
756
    Integer iCount
757
    String  sOCXName
758
    tObj[]  Obj
759
760
    Move "" To sOCXName
761
    Get pObjects To Obj
762
    Move (SizeOfArray(Obj)) To iCount
763
    If (hObj<iCount and hObj<>0) Begin
764
      If (Obj[hObj].bExists and Obj[hObj].eWindowsClass=bmpPDSActiveX)  Begin
765
        Move Obj[hObj].sOCXName to sOCXName
766
      End
767
    End
768
    Function_Return sOCXName
769
  End_Function
770
771 19 wil
  Function IsActiveXControl handle hObj Returns Boolean
772
    Integer iCount
773
    Integer eClassName
774
    String  bIsActiveX
775
    tObj[]  Obj
776
777
    Move False To bIsActiveX
778
    Get pObjects To Obj
779
    Move (SizeOfArray(Obj)) To iCount
780
    If (hObj<iCount and hObj<>0) Begin
781
      If (Obj[hObj].bExists and Obj[hObj].eWindowsClass=bmpPDSActiveX)  Begin
782
        Move True To bIsActiveX
783
      End
784
    End
785
    Function_Return bIsActiveX
786
  End_Function
787
788 29 wil
  Function DetermineDataFlexClass handle hObj Returns Integer
789
    Integer iCount
790
    Integer eWinClass
791
    Integer eDFClass
792
    tObj[]  Obj
793
794
    Move eDFUnknown To eDFClass
795
    Get pObjects To Obj
796
    Move (SizeOfArray(Obj)) To iCount
797
    If (hObj<iCount and hObj<>0) Begin
798
      If (Obj[hObj].bExists)  Begin
799
        //Move True To bIsActiveX
800
      End
801
    End
802
    Function_Return eDFClass
803
  End_Function
804
805 19 wil
  Function FirstChild Handle hParent Returns Handle
806
    Integer iCount
807
    Handle  hChild
808
    tObj[]  Obj
809
810
    Move 0 To hChild
811
    Get pObjects To Obj
812
    Move (SizeOfArray(Obj)) To iCount
813
    If (hParent<iCount and hParent<>0) Begin
814 29 wil
      Move Obj[hParent].hFirstChild To hChild
815 19 wil
    End
816
    Function_Return hChild
817
  End_Function
818
819 29 wil
  Function NextChild Handle hChild Returns Handle
820 19 wil
    Integer iCount
821
    Handle  hNextChild
822
    tObj[]  Obj
823
824
    Move 0 To hNextChild
825
    Get pObjects To Obj
826
    Move (SizeOfArray(Obj)) To iCount
827 29 wil
    If (hChild<iCount and hChild<>0) Begin
828
      Move Obj[hChild].hNext To hNextChild
829 19 wil
    End
830
    Function_Return hNextChild
831
  End_Function
832
833
  Function LastChild Handle hParent Returns Handle
834
    Integer iCount
835
    Handle  hChild
836
    tObj[]  Obj
837
838
    Move 0       To hChild
839
    Get pObjects To Obj
840
    Move (SizeOfArray(Obj)) To iCount
841
    If (hParent<iCount and hParent<>0) Begin
842 29 wil
      Move Obj[hParent].hLastChild To hChild
843 19 wil
    End
844
    Function_Return hChild
845
  End_Function
846
847
End_Class