Página 1 de 1

Codejock ActiveX Calendar Constants

Publicado: Lun Mar 31, 2008 12:31 am
por Nick Hilder
Hi Xailer Team
In the Code Jock Calendar control there is a HitTest method. Using this and
the mouse down I can tell what the user clicked on.
The HitTest object has a property called nHitCode, I can use this in a CASE
..
Like this
CASE nHitCode == xtpCalendarHitTestDayArea
::oListBox1:AddItem("You clicked on the DayArea" +
Str(oCalendarHitTestInfo:Hitcode))
CASE nHitCode == xtpCalendarHitTestDayHeader
::oListBox1:AddItem("You clicked on the DayHeader" +
Str(oCalendarHitTestInfo:Hitcode))
The problem I have is that nHitCode is quite often not correct.
For example when I click on the calendar cell I get number 8193 from the
nHitCode. I would have expected it to be this
xtpCalendarHitTestDayViewCell => 8192
It one number off. (not always though) Some work, some don't
If you think this could be something Xailer/Xharbour related I can send a
small self contained sample.
BTW, I have checked the type lib and all the constants came through
correctly.
Nick

Codejock ActiveX Calendar Constants

Publicado: Lun Mar 31, 2008 6:07 pm
por jfgimenez
Nick,
probably you need to test the values using the "numeric and" operator (or
it's Xailer equivalent function nAnd() ):
IF nAnd( nHitCode, xtpCalendarHitTestDayArea ) != 0
...
ENDIF
IF nAnd( nHitCode, xtpCalendarHitTestDayHeader ) != 0
...
ENDIF
If there are values which code to execute is mutually exclusive, you may use
ELSEIF instead ENDIF / IF
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info

Codejock ActiveX Calendar Constants

Publicado: Lun Mar 31, 2008 6:07 pm
por jfgimenez
Nick,
probably you need to test the values using the "numeric and" operator (or
it's Xailer equivalent function nAnd() ):
IF nAnd( nHitCode, xtpCalendarHitTestDayArea ) != 0
...
ENDIF
IF nAnd( nHitCode, xtpCalendarHitTestDayHeader ) != 0
...
ENDIF
If there are values which code to execute is mutually exclusive, you may use
ELSEIF instead ENDIF / IF
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info

Codejock ActiveX Calendar Constants

Publicado: Mar Abr 01, 2008 12:51 am
por Nick Hilder
Hi Jose
I have educated myself on the nAnd function etc...something I did not really
ever want to know about ;-)
What I don't understand though is why this required, why doesn't the
HitTest:HitCode translate correctly in the first place?
Cheers
Nick
"Jose F. Gimenez" <jfgimenez@wanadoo.es> wrote in message
news:47f10c32$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Nick,
>
> probably you need to test the values using the "numeric and" operator (or
> it's Xailer equivalent function nAnd() ):
>
> IF nAnd( nHitCode, xtpCalendarHitTestDayArea ) != 0
> ...
> ENDIF
> IF nAnd( nHitCode, xtpCalendarHitTestDayHeader ) != 0
> ...
> ENDIF
>
> If there are values which code to execute is mutually exclusive, you may
> use ELSEIF instead ENDIF / IF
>
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
> http://www.xailer.info
>

Codejock ActiveX Calendar Constants

Publicado: Mar Abr 01, 2008 12:51 am
por Nick Hilder
Hi Jose
I have educated myself on the nAnd function etc...something I did not really
ever want to know about ;-)
What I don't understand though is why this required, why doesn't the
HitTest:HitCode translate correctly in the first place?
Cheers
Nick
"Jose F. Gimenez" <jfgimenez@wanadoo.es> wrote in message
news:47f10c32$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Nick,
>
> probably you need to test the values using the "numeric and" operator (or
> it's Xailer equivalent function nAnd() ):
>
> IF nAnd( nHitCode, xtpCalendarHitTestDayArea ) != 0
> ...
> ENDIF
> IF nAnd( nHitCode, xtpCalendarHitTestDayHeader ) != 0
> ...
> ENDIF
>
> If there are values which code to execute is mutually exclusive, you may
> use ELSEIF instead ENDIF / IF
>
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
> http://www.xailer.info
>