MSVS 2012

Re: MSVS 2012

Postby TimStone » Tue May 21, 2013 6:11 pm

Got it ... I forgot we had that function in there !

I agree, and YES, I do want to move to MSVC.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: MSVS 2012

Postby Antonio Linares » Tue May 21, 2013 7:33 pm

Richard,

There was an error in the libs that I sent you (I forgot to rename a DATA oOLE into a DATA oOleAuto). Now it is much better, though still have some problems but not related to hb_gcAll() anymore.

I can't send you the libs now as I am coding on my laptop and I don't have MSVC installed on it. I am going to install it and little later I will send it to you, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: MSVS 2012

Postby Richard Chidiak » Tue May 21, 2013 8:08 pm

No problem Antonio

Take your time , there is no emergency. I will test as soon as i receive them,

Thank you for all your efforts,

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: MSVS 2012

Postby Richard Chidiak » Wed May 22, 2013 8:43 am

Antonio

No more gpf (good thing), the activex and panels show another good thing.

Still a problem in the events

some of them are rooted as numeric and others as char which make them hardly useable

expecting an event "DblClick" we get a numeric value

dbwin32 is only tracing numeric events , string events are shown in dbwin32 as event -1

instead of 50 for example we should see "DoRetrieveDayEvents"

Hth

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: MSVS 2012

Postby Richard Chidiak » Wed May 22, 2013 8:45 am

I added a counter to the class

in handleevent method i added this test, if you add it to the test you will see what is sent

::NCTR++
IF ::NCTR < 25
MSGINFO("EVENT " + CVALTOCHAR(EVENT) + " TYPE " + VALTYPE(EVENT))
ENDIF


Here is a snapshot of the dbwin32 log

6928: SHIMVIEW: ShimInfo(Complete)
6928: 19.00, ,
6928: 50.00, 22/05/2013, ,
6928: 15.00, , ,
6928: 1.00,
6928: 4.00, -1.00,
6928: 1.00,
6928: 1.00,
6928: 1.00,
6928: 4.00, -1.00,
6928: 4.00, -1.00,
6928: 4.00, -1.00,
6928: 60.00, 22/05/2013 10:25:42.000, 120.00, ,
6928: 14.00, 1.00, NIL,
6928: 4.00, -1.00,
6928: 4.00, -1.00,
6928: 19.00, ,
6928: 50.00, 20/05/2013, ,
6928: 15.00, , ,
6928: 19.00, ,
6928: 50.00, 21/05/2013, ,
6928: 15.00, , ,
6928: 19.00, ,
6928: 15.00, , ,
6928: 19.00, ,
6928: 50.00, 23/05/2013, ,
6928: 15.00, , ,
6928: 19.00, ,
6928: 50.00, 14/02/2013, ,
6928: 50.00, 13/02/2013, ,
6928: 50.00, 12/02/2013, ,
6928: 50.00, 29/11/2012, ,
6928: 50.00, 28/08/2013, ,
6928: 50.00, 29/08/2013, ,
6928: 50.00, 30/08/2013, ,
6928: 50.00, 10/12/2013, ,
6928: 50.00, 05/10/2012, ,
6928: 50.00, 04/10/2012, ,
6928: 50.00, 03/10/2012, ,
6928: 50.00, 27/01/2014, ,
6928: 50.00, 27/06/2014, ,
6928: 50.00, 28/06/2014, ,
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: MSVS 2012

Postby Antonio Linares » Wed May 22, 2013 9:53 am

Richard,

Please try this:

AEval( oActiveX:aEvents, { | a | MsgInfo( a[ 1 ] ) } )

That should show all the events names supported by the ActiveX. Please check if those that are missing are or not in aEvents, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: MSVS 2012

Postby Richard Chidiak » Wed May 22, 2013 10:59 am

Antonio Linares wrote:Richard,

Please try this:

AEval( oActiveX:aEvents, { | a | MsgInfo( a[ 1 ] ) } )

That should show all the events names supported by the ActiveX. Please check if those that are missing are or not in aEvents, thanks


Antonio

these are the event names in avents
Createasxml
Createasregistry
Createasbinary
Loadfromfile
Savetofile
Getsection
Exchange string
Exchange int
Loading
valid
Empty section

From handleevent these are the events received
19
50
15
Createasxml
Loadfromfile
60
Empty section
valid
-606

not too much logic in here

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: MSVS 2012

Postby Richard Chidiak » Wed May 22, 2013 11:32 am

Antonio

Getting closer

i can now display all the data , but there is a problem in loading the array for events

i explain

in codejock when Event == "DoRetrieveDayEvents" // now this is = "50"
we receive the event like this Event, aParms aparms is a table aparms[1] is the date and aparms[2] is a reference to the object

now we receive the info in a different way aparms[1] is the event "50" in our example aprams[2] is the date and aparms[3] is the object you should not be loading the first element of the table

again we have to search to all correspondance between numbers and the real names

another important problem i can not trace the event "DblClick" , looks like it is not carried by activex

it would be great if you can retreive the appropriate names "DblClick" "DoRetrieveDayEvents" etc... if not i will find a way to trace them

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: MSVS 2012

Postby Richard Chidiak » Wed May 22, 2013 12:19 pm

Closer more and more

I can retreive events , update , copy paste

though i don't know how to retreive some if them like "BeforeEditOperation" foe example , still searching

the handleevent looks like this

I have to go out this afternoon but will be back on it this evening, the end is close.

Richard

if valType( Event ) == "C"
Do Case
// Case Event == "DoRetrieveDayEvents"
Case EVENT = "50"
::lDoInsert := .f.
// ::RetrieveDayEvents( aParms[ 1 ], aParms[2] )
::RetrieveDayEvents( aParms[ 2 ], aParms[3] )
::lDoInsert := .T. // Bypass the InsertEvent Method because we put the data in here.

// Case Event == "DblClick"
Case Event == "-601"

if ::oCalex:ViewType() < xtpCalendarMonthView .OR. ::oCalex:ViewType() = xtpCalendarFullWeekView //day or week view only
IF ( oEvent := ::oCalex:ActiveView():HitTest():ViewEvent() ) != nil // EVENEMENT EXISTANT
oEvent := oEvent:Event()
::EditEvent( oEvent)
Else // new EVENt
// oday := ::oCalex:ActiveView():HitTest():Viewday():date // EX 31/03/2011 type = date
oTIME := ::oCalex:ActiveView():HitTest():HitDateTime() // DATE time EX 31/03/2011 12.30.00.00
::lDoInsert := .T. // Bypass the InsertEvent Method because we put the data in here.
cid := ::getuniqueid()
oEvent := ::oCalex:DataProvider:CreateEventex(CID)
oevent:customproperties:_Property("id",CID)

oevent:StartTime := oTIME
oevent:EndTime := ::GETENDTIME(oTIME)

IF PLANPREF->MULTIPERS
ORES = ::oCalex:MultipleResources:Item(::oCalex:ActiveView():Selection:GroupIndex)
IF ORES:SCHEDULEIDS():COUNT() = 1 // scheduleid for 1 person else it will be a group of persons and we need to add a function to retreive the id wanted
oEvent:Scheduleid := ORES:SCHEDULEIDS():item(0)
ENDIF
ENDIF
::InsertEvent( oEvent)
::lDoInsert := .f.
::oCalex:DataProvider:AddEvent( oEvent )
::lDoInsert := .f.
ENDIF
endif

case Event == "BeforeEditOperation" // occurs before insertevent
OpParms := aParms[ 1 ]
// OpParms:EventViews:ViewEvent( 0 ) = oevent
// aparms[ 1 ] holds a pointer to CalendarEditOperationParameters object.
// This object is referred to as opParms on documentation.
// OpParms:Operation is the edit operation taking place from Enumeration list
// OpParms:EventViews is an Object acting as an array with all event objects
// marked for editing on the calendar control.

// OpParms:EventViews:Count() length of the array
// OpParms:EventViews:ViewEvent( n ) returns the nth event in EventViews.
// aparms[ 2 ] sent by ref to inform .t. to cancel the operation of .f. to allow it.

if OpParms:Operation() == xtpCalendarEO_EditSubject_ByF2
aParms[ 2 ] := .T.

if OpParms:EventViews:Count() > 0
::EditEvent( OpParms:EventViews:ViewEvent( 0 ) )
endif

endif

IF OpParms:Operation() == xtpCalendarEO_DeleteEvent // Intercepté avant delete !!! pouvoir inverser delete, comment ???
// msginfo("DELETE")
ENDIF
case Event == "DoCreateEvent" // "EventAddedEx"
IF ::lDoInsert
::InsertEvent( aParms[ 1 ], @aParms[2], @aParms[3] ) // oEvent, nId, lResult
ENDIF
case Event == "DoUpdateEvent" .and. aParms[ 1 ]:CustomProperties:Property( "id" ) != Nil
::UpdatefromEvent( aParms[ 1 ] )
case Event == "DoDeleteEvent" .and. aParms[ 1 ]:CustomProperties:Property( "id" ) != Nil
// ::oCalex:ActiveView():UNDO()
case Event == "EventDeletedEx" .and. aParms[ 1 ]:CustomProperties:Property( "id" ) != Nil
// ::DeleteEvent( aParms[ 1 ] ) // delete from ::appdetail and prompt for delete more secure
// Case Event == "MouseMove" .OR. Event == "MouseDown" // aParms[ 3] = x , aParms[ 4] = y
Case Event == "-605" .OR. Event == "-607" // aParms[ 3] = x , aParms[ 4] = y
// IF aParms[ 1 ] = 2 // 1 = left click , 2 = right click
IF aParms[ 2 ] = 2 // 1 = left click , 2 = right click
IF ::oCalex:ViewType() < xtpCalendarMonthView .OR. ::oCalex:ViewType() = xtpCalendarFullWeekView //day or week view only
cId := SPACE(12)
oEvent := ::oCalex:ActiveView():HitTest():ViewEvent()
IF oEvent # nil
oEvent := oEvent:Event()
CID := oEvent:CustomProperties:Property( "id" )
ENDIF
// ::CONTEXTMENU(CID,aParms[ 3],aParms[4])
::CONTEXTMENU(CID,aParms[ 4],aParms[5])
ENDIF
ENDIF
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: MSVS 2012

Postby Antonio Linares » Wed May 22, 2013 12:27 pm

Richard,

We should compare oActiveX:aEvents using TActiveX and THActiveX and chech the names differences
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: MSVS 2012

Postby Antonio Linares » Wed May 22, 2013 1:45 pm

Richard,

There is something wrong that needs to be fixed in function ActXEvents() as previously we were getting another values. I have tested FWH/samples/webexp.prg and this is what we get with FWH 13.04:

StatusTextChange
ProgressChange
CommandStateChange
DownloadBegin
DownloadComplete
TitleChange
PropertyChange
BeforeNavigate2
NewWindow2
NavigateComplete2
DocumentComplete
OnQuit
OnVisible
OnToolBar
OnMenuBar
OnStatusBar
OnFullScreen
OnTheaterMode
WindowSetResizable
WindowSetLeft
WindowSetTop
WindowSetWidth
WindowSetHeight
WindowClosing
ClientToHostWindow
SetSecureLockIcon
FileDownload
NavigateError
PrintTemplateInstantiation
PrintTemplateTeardown
UpdatePageStatus
PrivacyImpactedStateChange
NewWindow3
SetPhishingFilterStatus
WindowStateChanged
NewProcess
ThirdPartyUrlBlocked
RedirectXDomainBlocked
BeforeScriptExecute
WebWorkerStarted
WebWorkerFinsihed

but with recent changes, we get:

QueryInterface
AddRef
Release
GetTypeInfoCount
GetTypeInfo
GetIDsOfNames
Invoke
GoBack
GoForward
GoHome
GoSearch
Navigate
Refresh
Refresh2
Stop
Application
Parent
Container
Document
TopLevelContainer
Type
Left
Left
Top
Top
Width
Width
Height
Height
LocationName
LocationURL
Busy
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: MSVS 2012

Postby Antonio Linares » Wed May 22, 2013 2:14 pm

Richard,

I just emailed you a new set of FWH libraries that should be ok :-)

At least, now function ActXEvents() is working as expected
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: MSVS 2012

Postby Richard Chidiak » Wed May 22, 2013 4:28 pm

Antonio

i have an error at link time

FiveHC32.lib(ACTX.obj) : error LNK2019: symbole externe non résolu "struct IDispatch * __cdecl hb_oleParam(int)" (?hb_oleParam@@YAPAUIDispatch@@H@Z) référencé dans la fonction _HB_FUN_ACTXEVENTS
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: MSVS 2012

Postby Antonio Linares » Wed May 22, 2013 6:14 pm

Richard,

Sorry I missed that one as I tested it with Borland. I just sent you the modified libs for msvc 2010, thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: MSVS 2012

Postby Richard Chidiak » Wed May 22, 2013 8:00 pm

Antonio

Eureka ! this is the good one.

Events are fired with their names, we retreive exactly the same names.

I have only one regret , the param table is not sent like in xharbour , we would have a 100% compatibility

I explain

to fire the events we have
::ocalex:bOnEvent = { | event, aParms, pParams | ::handleEvent( Event, aParms, pParams ) }

aparms holds all the pointers to the event

in xharbour aparms[01] = DATE aparms[02] = object
in this version aparms[01] = object number aparms[02] = DATE aparms[03] = object

so we have to use tables slightly different (+1) , it is not a big deal , i accept it like this. I have made the changes. I will do some more testings tomorrow to make sure we have no other problem but i am much more confortable with it now.

Thank you :D

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 105 guests