Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE ERROR CODE 0x80040154: CLASS NOT REGISTERED.
Message
From
01/09/2000 14:32:30
 
 
To
31/08/2000 14:28:33
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00408803
Message ID:
00411915
Views:
19
1/ On your form add SHAPE object and add on your form Doug Hennig’s class SFImageList
2/ In INIT method of the SFImageList you must add code:

#define ccNULL chr(0)
#define cnSUCCESS 0
#define cnRESERVED 0
#define cnREG_SZ 1
* the size of a data string
#define cnBUFFER_SIZE 256
* the size of the buffer for the key value
#define cnHKEY_CLASSES_ROOT -2147483648
#define cnHKEY_CURRENT_USER -2147483647
#define cnHKEY_LOCAL_MACHINE -2147483646
#define cnHKEY_USERS -2147483645
WITH THIS
loRegistry=NEWOBJECT('SFRegistry', ;
'SFRegistry.vcx', cnHKEY_CLASSES_ROOT)
IF EMPTY(.cOLEClass)
lcCLSID=IIF(LEFT(.cClassID,1)='{',.cClassID, ;
'{' + .cClassID + '}')
lcProgID=loRegistry.GetKey('CLSID\' + lcCLSID + ;
'\ProgID')
llOK = NOT EMPTY(lcProgID)
ELSE
lcProgID= .cOLEClass
lcCLSID= loRegistry.GetKey(lcProgID + '\CLSID')

IF EMPTY(lcCLSID)
lcProgID = .cOLEClass + '.1'
lcCLSID = loRegistry.GetKey(lcProgID + '\CLSID')
ENDIF EMPTY(lcCLSID)

llOK = NOT EMPTY(lcCLSID)
ENDIF EMPTY(.cOLEClass)

IF llOK
lcOCX = loRegistry.GetKey('CLSID\' + lcCLSID + ;
'\InProcServer32')
llOK = NOT EMPTY(lcOCX) AND FILE(lcOCX)
ENDIF llOK

llObject = NOT EMPTY(.cObjectName)

IF llObject
lcObject = .cObjectName
WITH .Parent.&lcObject
lnTop = .Top
lnLeft= .Left
lnWidth= .Width
lnHeight= .Height
ENDWITH
.Parent.RemoveObject(lcObject)
ENDIF llObject
lcObject = .cNewObjectName
.Parent.AddObject(lcObject, .cClass, lcProgID )

WITH .Parent.&lcObject
IF llObject
.Top = lnTop
.Left = lnLeft
.Width = lnWidth
.Height = lnHeight
ENDIF llObject
.Visible = .T.
ENDWITH

ENDWITH

IN hennig.zip you can find classes, test form treeview, newobject program
Link of Foxtalk: www.pinnaclepublishing.com/FT
hennig.zip file I send to you by E-mail.

Good Luck!
Previous
Reply
Map
View

Click here to load this message in the networking platform