DCACTIVEXCONTROL ... SUBCLASS
DCACTIVEXCONTROL ... SUBCLASS
Hi Roger,
The following program is not working form me. It appear the SUBCLASS is not working for DCACTIVEXCONTROL
Function MSOCtrl()
LOCAL GetList[0], GetOptions, oCtrl
@ 0,0 DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDBOX ;
SIZE 96,23.5 ;
OBJECT oStatic ;
RESIZE DCGUI_RESIZE_REPOSONLY_Y
@ .2,.5 DCACTIVEXCONTROL oCtrl SIZE 95,23;
PARENT oStatic;
CLSID 'Ultra.OfficeControl' SUBCLASS 'MSOfficeCTRL()'
DCGETOPTIONS PIXEL TOOLTIPFONT '12.Lucida Console Bold'
DCREAD GUI FIT TITLE 'MS office Control' OPTIONS GetOptions
RETURN nil
*
CLASS MSOfficeCTRL From DC_XbpActiveXControl
EXPORTED:
INLINE METHOD Init()
DCMSGBOX 'I am not what you think.', ;
'You think I am DC_XbpPushButtonXP', ;
'but I am really ' + ::className() ;
FONT '12.Lucida Console Bold' ;
TIMEOUT 5
self:DC_XbpActiveXControl:Init()
RETURN self
ENDCLASS
The following program is not working form me. It appear the SUBCLASS is not working for DCACTIVEXCONTROL
Function MSOCtrl()
LOCAL GetList[0], GetOptions, oCtrl
@ 0,0 DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDBOX ;
SIZE 96,23.5 ;
OBJECT oStatic ;
RESIZE DCGUI_RESIZE_REPOSONLY_Y
@ .2,.5 DCACTIVEXCONTROL oCtrl SIZE 95,23;
PARENT oStatic;
CLSID 'Ultra.OfficeControl' SUBCLASS 'MSOfficeCTRL()'
DCGETOPTIONS PIXEL TOOLTIPFONT '12.Lucida Console Bold'
DCREAD GUI FIT TITLE 'MS office Control' OPTIONS GetOptions
RETURN nil
*
CLASS MSOfficeCTRL From DC_XbpActiveXControl
EXPORTED:
INLINE METHOD Init()
DCMSGBOX 'I am not what you think.', ;
'You think I am DC_XbpPushButtonXP', ;
'but I am really ' + ::className() ;
FONT '12.Lucida Console Bold' ;
TIMEOUT 5
self:DC_XbpActiveXControl:Init()
RETURN self
ENDCLASS
Re: DCACTIVEXCONTROL ... SUBCLASS
It looks like I never tested subclass with DC_ActiveXControl.
You can fix this problem in _DCGETBX.PRG.
Look for the following code:
Rebuild DCLIPX.DLL by running build19_sl1.bat
This fix will be in the next build.
Here is another workaround if you don't want to change dclipx.dll :
Change your code to:
You can fix this problem in _DCGETBX.PRG.
Look for the following code:
Code: Select all
ELSEIF nType == GETLIST_ACTIVEX
#if XPPVER > 1900000
IF Valtype(cSubClass)=='C' .AND. IsFunction(Strtran(cSubClass,'()',''))
oXbp := &(cSubClass+'()') <<<<<<< was (remove this)
oXbp := &cSubClass <<<<<<< IS (add this)
oXbp := oXbp:new( oParent, , ;
{ nStartCol, nStartRow }, { nWidth, nHeight }, ;
_Pres(aGetListItem[aGETLIST_PRESENTATION]), lVisible, self )
ELSE
oXbp := DC_XbpActiveXControl():new( oParent, , ;
{ nStartCol, nStartRow }, { nWidth, nHeight }, ;
_Pres(aGetListItem[aGETLIST_PRESENTATION]), lVisible, self )
ENDIF
::createObject(oXbp)
#endif
This fix will be in the next build.
Here is another workaround if you don't want to change dclipx.dll :
Change your code to:
Code: Select all
@ .2,.5 DCACTIVEXCONTROL oCtrl SIZE 95,23;
PARENT oStatic;
CLSID 'Ultra.OfficeControl' SUBCLASS 'MSOfficeCTRL'
The eXpress train is coming - and it has more cars.
Re: DCACTIVEXCONTROL ... SUBCLASS
Thanks Roger
I prefer the second option and it works. I hope it still be an option in future release.
Joseph
I prefer the second option and it works. I hope it still be an option in future release.
Joseph
Re: DCACTIVEXCONTROL ... SUBCLASS
I fixed the code so it will work both ways.I prefer the second option and it works. I hope it still be an option in future release.
The eXpress train is coming - and it has more cars.
Re: DCACTIVEXCONTROL ... SUBCLASS
Hello
by DCBROWSE with "SUBCLASS" and "USEVISUALSTYLE" the System freeze and i got an error
with "no" USEVISUALSTYLE Command - its ok
The Question is - is this a anomalie or a mistake?
Edit: the error is only when the "manifest-file" is aktiv, without "manifest" and "USEVISUALSTYLE" in sourcecode it seems ok - no error
by DCBROWSE with "SUBCLASS" and "USEVISUALSTYLE" the System freeze and i got an error
Code: Select all
@ 3,0 DCBROWSE ::oBrowse ALIAS ::KALMAU SIZE 137,28.6+nHoehe NOHSCROLL;
PRESENTATION aPres;
SUBCLASS "XbpBrowseCustom()"; // Ownerdraw!
ITEMSELECTED {|| ::nRec := (::KALMAU)->(RecNo()),DoKalU_Zeig(::KALMAU, ::lNew, ::nRec, ::oBrowse:colpos ),::oBrowse:refreshall(),DC_SetAppFocus(::oBrowse) };
EVAL {|o| o:ItemRbDown:={|aMPos,aLC,oBr|ActRbMenu(aMPos,aLC,oBr,oPopupMenu)} };
FONT {|| "8.Tahoma"};
ID "Fenster";
NOVSCROLL ;
SCOPE;
AUTOREFRESH 3000;
HEADLINES 3
* bei SUBCLASS kein "USEVISUALSTYLE" !!!
Code: Select all
FEHLERPROTOKOLL von MSI-WORKS Ver.1.90.5.000 "D:\PROJEKTE\FAKT\faktxpp-gui\FAKTXPPGUI.EXE" Datum: 26.12.2012 15:47:24
Xbase++ Version : Xbase++ (R) Version 1.90.355
Betriebssystem : Windows 7 06.01 Build 07601 Service Pack 1
Memory (RAM_AVAIL) : 588.80 of 2095.10 MB
DiskSpace D: : 44994.49 MB
Alias() : leer
Recno() : leer
Found() : NO
NetError() : NO
Select() : 1
IndexOrd() : 0
WorkSpaceList :
------------------------------------------------------------------------------
Asxml10.dll : Xbase++ Development Tool
ot4xb.dll : 1.90.0331 Open Tools for Xbase++
------------------------------------------------------------------------------
oError:args :
-> VALTYPE: O CLASS: XbpCellGroup
-> VALTYPE: N VALUE: 0
oError:canDefault : N
oError:canRetry : N
oError:canSubstitute: J
oError:cargo : NIL
oError:description : Interne Datenstrukturen besch„digt
oError:filename :
oError:genCode : 41
oError:operation : :GetCell
oError:osCode : 0
oError:severity : 2
oError:subCode : 5
oError:subSystem : BASE
oError:thread : 2
oError:tries : 0
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1705)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(502)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1768)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(500)
Aufgerufen von STANDARDEH(272)
Aufgerufen von (B)ERRORSYS(110)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1705)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(502)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1768)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(500)
Aufgerufen von STANDARDEH(272)
Aufgerufen von (B)ERRORSYS(110)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1705)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(502)
Aufgerufen von STANDARDEH(272)
Aufgerufen von (B)ERRORSYS(110)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1705)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(500)
Aufgerufen von ERRORLOG(610)
Aufgerufen von STANDARDEH(292)
Aufgerufen von (B)ERRORSYS(110)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1705)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(502)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1768)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(500)
Aufgerufen von STANDARDEH(272)
Aufgerufen von (B)ERRORSYS(110)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1705)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(502)
Aufgerufen von STANDARDEH(272)
Aufgerufen von (B)ERRORSYS(110)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1705)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(502)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1768)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(500)
Aufgerufen von ERRORLOG(610)
Aufgerufen von STANDARDEH(292)
Aufgerufen von (B)ERRORSYS(110)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1705)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(502)
Aufgerufen von STANDARDEH(272)
Aufgerufen von (B)ERRORSYS(110)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1705)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(500)
Aufgerufen von STANDARDEH(272)
Aufgerufen von (B)ERRORSYS(110)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1705)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(502)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1768)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(500)
Aufgerufen von STANDARDEH(272)
Aufgerufen von (B)ERRORSYS(110)
Aufgerufen von XBPBROWSECUSTOM:CUSTOMDRAWCELL(1705)
Aufgerufen von XBPBROWSE:HANDLEEVENT(1566)
Aufgerufen von DC_XBPBROWSE:HANDLEEVENT(1101)
Aufgerufen von FORWARDCUSTOMDRAWCELL(1522)
Aufgerufen von (B)XBPCOLUMN:CREATE(502)
The Question is - is this a anomalie or a mistake?
Edit: the error is only when the "manifest-file" is aktiv, without "manifest" and "USEVISUALSTYLE" in sourcecode it seems ok - no error
best regards
Hans
Hans
Re: DCACTIVEXCONTROL ... SUBCLASS
I have not seen any problem when combining Ownerdrawing and UseVisualStyle.
Look at the sample program in \exp19\samples\browse\ownerdraw.prg.
It works fine.
Look at the sample program in \exp19\samples\browse\ownerdraw.prg.
It works fine.
The eXpress train is coming - and it has more cars.
Re: DCACTIVEXCONTROL ... SUBCLASS
hi Hans,
did it happend on same PC where my old Ownerdraw Sample did not run ?
if yes @Roger : if remember right on Hans PC the AntiVirus Application AVAST (?) had "change something"
did it happend on same PC where my old Ownerdraw Sample did not run ?
if yes @Roger : if remember right on Hans PC the AntiVirus Application AVAST (?) had "change something"
greetings by OHR
Jimmy
Jimmy
Re: DCACTIVEXCONTROL ... SUBCLASS
NO - another PC and another OS (now Win7 prof.32Bit) (bevor WinXP)
YES - AVAST is Installed but not Running (to test)
I found that the Error is only when the "Manifest" ist availible
it's the combination - Command SUBCLASS, USEVISUALSTYLE and the MANIFEST-File
with no "MANIFEST" it is ok - or i remove USEVISUALSTYLE and have the "MANIFEST" File
any Idea?
YES - AVAST is Installed but not Running (to test)
I found that the Error is only when the "Manifest" ist availible
it's the combination - Command SUBCLASS, USEVISUALSTYLE and the MANIFEST-File
with no "MANIFEST" it is ok - or i remove USEVISUALSTYLE and have the "MANIFEST" File
any Idea?
best regards
Hans
Hans
Re: DCACTIVEXCONTROL ... SUBCLASS
i got thisI have not seen any problem when combining Ownerdrawing and UseVisualStyle.
Look at the sample program in \exp19\samples\browse\ownerdraw.prg.
It works fine.

when i rename the "dropfilter.exe.manifest" it works.
best regards
Hans
Hans
Re: DCACTIVEXCONTROL ... SUBCLASS
This sounds like a bug in your version of Xbase++.
I don't have any problems with a manifest file.
I suspect that you may not be using the latest hotfixes.
I don't have any problems with a manifest file.
I suspect that you may not be using the latest hotfixes.
The eXpress train is coming - and it has more cars.