MSVS 2012

Re: MSVS 2012

Postby Antonio Linares » Mon May 20, 2013 3:17 pm

This is a very reduced codejock sample, I built it for testing. Using THActiveX makes it work fine :-)

Code: Select all  Expand view  RUN
#include "FiveWin.ch"

static oWnd

function Main()

   local oGblSettings, oBar

   oGblSettings := CreateObject( "Codejock.CalendarGlobalSettings.15.0.2" )
   oGblSettings:License = "Calendar Control Copyright (c) 2003-2011 Codejock Software" + CRLF + ;
               "PRODUCT-ID: Codejock.Calendar.ActiveX.v15.0" + CRLF +"VALIDATE-CODE: XXX-XXX-XXX-XXX"

   DEFINE WINDOW oWnd MDI
   
   DEFINE BUTTONBAR oBar OF oWnd SIZE 50, 60 2010

   DEFINE BUTTON OF oBar ACTION One()

   DEFINE BUTTON OF oBar ACTION Two()

   ACTIVATE WINDOW oWnd MAXIMIZED

return nil

function One()

   local oWndChild, oCalex
   
   DEFINE WINDOW oWndChild MDICHILD OF oWnd
   
   oCalex = THActiveX():New( oWndChild, "Codejock.CalendarControl.15.0.2" )
   
   oWndChild:oClient = oCalex
   
   ACTIVATE WINDOW oWndChild
 
return nil

function Two()

   local oWndChild, oCalex
   
   DEFINE WINDOW oWndChild MDICHILD OF oWnd
   
   oCalex = THActiveX():New( oWndChild, "Codejock.DatePicker.15.0.2" )
   
   oWndChild:oClient = oCalex
   
   ACTIVATE WINDOW oWndChild
 
return nil
regards, saludos

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

Re: MSVS 2012

Postby Richard Chidiak » Mon May 20, 2013 3:29 pm

Antonio

yes it could be a solution

The BuildStdDialogs() does not show , so the left part of the panel is not present but No gpf this is a very good point.

For my information, what is the difference between Tactivex and THactivex ?

i am trying to adapt the other object creation like ::OBJcalendar := TOleAuto():New( ::oCalex:oOleAuto:__hObj )

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 Antonio Linares » Mon May 20, 2013 3:42 pm

Richard,

Class THActiveX is only available for Harbour. It is similar to FWH Class TActiveX, but internally is based on ATL Harbour implementation:

http://msdn.microsoft.com/en-us/library/599w5e7x(v=vs.80).aspx

We use it as an alternative to TActiveX when TActiveX (somehow) fails.

Keep your code for ::OBJcalendar := TOleAuto():New( ::oCalex:oOleAuto:__hObj ) it should work fine too :-)
regards, saludos

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

Re: MSVS 2012

Postby Richard Chidiak » Mon May 20, 2013 3:46 pm

Antonio

unfortunately No

TRY
::objcalendar := nil
::oCalexStdDlgs := CreateObject( "Codejock.CalendarDialogs.15.0.2" )

::OBJcalendar := TOleAuto():New( ::oCalex:oOleAuto:__hObj )
::oCalexStdDlgs:Calendar := ::OBJcalendar

::oCalexStdDlgs:RemindersWindowShowInTaskBar = .t.
::oCalexStdDlgs:CreateRemindersWindow()
CATCH oErr
MsgInfo( "Manque composants dialogues Standard oerr " + cvaltochar(oerr))
END

we catch error , i have tried also ::oBJCALENDAR = TOleAuto():New( ::oCalex )

same we catch error

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 Antonio Linares » Mon May 20, 2013 3:50 pm

Richard,

Please change this line:

::OBJcalendar := TOleAuto():New( ::oCalex:oOleAuto:__hObj )

into:

::OBJcalendar := TOleAuto():New( ::oCalex:oOle:__hObj )
regards, saludos

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

Re: MSVS 2012

Postby Richard Chidiak » Mon May 20, 2013 3:59 pm

Antonio

Ok for this one , no more gpf but no event is showing.... :?

is there something to change with the dataprovider syntax ?

with object ::oCalex
:VisualTheme = ( xtpCalendarThemeOffice2007 )
:bOnEvent = { | event, aParms, pParams | ::handleEvent( Event, aParms, pParams ) }
:SetDataProvider( "Provider=custom" )

if ! :DataProvider:open()
:DataProvider:Create()
endif

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 Antonio Linares » Mon May 20, 2013 5:40 pm

Richard,

I am doing some tests and I will email you FWH modified libs
regards, saludos

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

Re: MSVS 2012

Postby TimStone » Mon May 20, 2013 7:03 pm

Just a quick note.

Richard, what you sent me yesterday seems to work fine and is not showing any GPF at this time. I have applied the changes you suggested to the MSVC version.

I did test moving about the controls in the dialog and had no problem. I was also able to open and close the edit boxes repeatedly without a problem. I don't know if this is what you are having problems with, but if so, you are using the Codejock controls more aggressively than I am, so that may make a difference. I'm sticking with a single schedule and you have multiples.

Antonio, the lastest combobox code is working now. All problems that I observed were resolved.
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: 2945
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: MSVS 2012

Postby Richard Chidiak » Tue May 21, 2013 3:38 am

Tim

Your copy of codjock has also the problem

Dialogs that cause the crash are those called from button bar , ie printing in your case or settings

Dialogs inside the control have no problem.

The problem occurs second time you enter the dialog. To reproduce it , enter the control , call one of the dialogs from the button bar, close the control, do it again .

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 Antonio Linares » Tue May 21, 2013 6:32 am

Richard,

Here it was failing even if the dialogs are not shown. Second time accessing generated the crash.

I have the events wroking with Class THActiveX, the only problem is that the events are coming as numbers, not as strings, so it requires some changes in your code.

I am working to change that and keep using strings as usual.
regards, saludos

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

Re: MSVS 2012

Postby Antonio Linares » Tue May 21, 2013 8:20 am

Richard,

I have just emailed you the FWH libs with changes in Class THActiveX. Events are routed now but as numbers, not as strings.

Also I have renamed DATA oOle as oOleAuto, so we are compatible with FWH Class TActiveX code.

Please run and keep open dbwin:
https://fivewin-contributions.googlecod ... bwin32.zip

so you can see there the events numbers easily
regards, saludos

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

Re: MSVS 2012

Postby Antonio Linares » Tue May 21, 2013 8:26 am

Richard,

In fact I already got the events as strings with THActiveX too but I am not sure if it is doing it right.

Please try this:

oCalex = THActiveX():New( oWndChild, "Codejock.CalendarControl.15.0.2" )

AEVal( oCalex:aEvents, { | c | MsgInfo( c[ 1 ] ) } )

As you see, we have the names but I am not sure yet if they are the right ones.
regards, saludos

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

Re: MSVS 2012

Postby Richard Chidiak » Tue May 21, 2013 4:40 pm

Antonio

oCalex = THActiveX():New( oWndChild, "Codejock.CalendarControl.15.0.2" )

oCalex = THActiveX():New(::opanelcalex, "Codejock.CalendarControl.15.0.2" ) // this is for me

does not work gpf without message , did you set it for a mdichild ? , i run ocalex on a panel at main mdi window

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 TimStone » Tue May 21, 2013 5:40 pm

Richard,

I have two copies of this with Codejock. One is with xHarbour ( older version ) and of course the other is with MSVC 2010.

You indicated that the controls on the button bar would gpf even on my application. I've tested it on both. I can't get it to fail. No GPF.

You specifically mentioned the printers. On mine I have the codejock implementation of views, and also my own custom report with pop up dialogs. None of these, even if repeated, can cause a GPF.

I'm wondering may have something to do with the fact your program builds multiple calendar displays within the window for different groups.

I'm just trying to help pinpoint the problem. I'm still having a combobox issue ... but that's in a different thread.

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: 2945
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: MSVS 2012

Postby Richard Chidiak » Tue May 21, 2013 6:01 pm

Tim

the test we use is like yours very simple , no muiltischedules. The problem is Harbour activex not the calendar. Please remove the hb_gcall() function from your tests to reproduce.
In order to make it work we added

function hb_gcAll()
return nil

This is only for testing purposes and can not remain in the software, there will be no more calls to garbage collector and some results may be unpredictable, so just for testing, your copy has this function.

It only gpf's with Harbour BCC or MSVC. This happens at second call , very easy to reproduce Antonio and i reproduced it .

At this stage , Codejock is not yet useable with Harbour, memory is not properly released and that can make a serious problem , we have to wait for the tests with Antonio to end succesfully.

There is no problem with Codejock + xharbour , it is rock solid, i have been using it very intensively since 2 years without any problem, you share the same experience, Reinaldo too.

But since we want to move to MSVC (at least i do) , we have to deal with Harbour and make sure it works 100% , hopefully we'll be there very soon.

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

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 21 guests