Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #10084

Re: Month selector

From "Karl-Heinz" <invalid@invalid.invalid>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Month selector
Date 2016-12-19 08:58 +0100
Message-ID <ebpiauFfb8tU1@mid.individual.net> (permalink)
References (1 earlier) <ebdh6jFil8dU1@mid.individual.net> <5caec2e2-9b90-44d4-954e-fc4bfe7e8b68@googlegroups.com> <ebg1vvF6p3nU1@mid.individual.net> <ebg5hgF7lesU1@mid.individual.net> <925b3451-498a-427e-b5ec-d923f868891e@googlegroups.com>

Show all headers | View raw


Hi Sebastian,

>
> One last question, is there is any way to know if the user click on < >,
> the year, or a month?
>

I have no idea why you need that, but here“s a quick shot ...


BTW. The result shown in the owner caption should be one of the MCHT_xxx
constants described here:

https://msdn.microsoft.com/en-us/library/windows/desktop/bb760927(v=vs.85).aspx

-------------

METHOD Dispatch(oEvent) CLASS BaseDateTimepicker
LOCAL pnMHDR AS _winNMHDR
LOCAL hMonthControl AS PTR
LOCAL struMCHitTest IS _winMCHITTESTINFO
LOCAL struPoint IS _winPoint


  DO CASE

  CASE oEvent:Message == WM_NOTIFY

          pnMHDR := PTR ( _CAST , oEvent:lParam )


          IF pnMHDR._code == MCN_VIEWCHANGE  .OR. pnMHDR._code ==
MCN_SELCHANGE


           hMonthControl := SendMessage(SELF:Handle() , DTM_GETMONTHCAL , 0
, 0L )

         GetCursorPos ( @struPoint )
         ScreenToClient (hMonthControl , @struPoint )


              struMCHitTest.cbSize := _SIZEOF ( _winMCHITTESTINFO )
              struMCHitTest.pt := struPoint

              SendMessage ( hMonthControl , MCM_HITTEST , 0 , LONG ( _CAST ,
@struMCHitTest  ) )

              SELF:owner:caption := NTrim ( struMCHitTest.uHit  )


          ENDIF

  ENDCASE


    RETURN SUPER:Dispatch(oEvent)

----------

regards
Karl-Heinz 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Month selector ccyasa.sbassano@gmail.com - 2016-12-14 07:33 -0800
  Re: Month selector "Karl-Heinz" <invalid@invalid.invalid> - 2016-12-14 19:26 +0100
    Re: Month selector ccyasa.sbassano@gmail.com - 2016-12-14 13:04 -0800
    Re: Month selector ccyasa.sbassano@gmail.com - 2016-12-15 04:47 -0800
      Re: Month selector "Karl-Heinz" <invalid@invalid.invalid> - 2016-12-15 18:25 +0100
        Re: Month selector ccyasa.sbassano@gmail.com - 2016-12-15 10:23 -0800
        Re: Month selector "Karl-Heinz" <invalid@invalid.invalid> - 2016-12-15 19:24 +0100
          Re: Month selector ccyasa.sbassano@gmail.com - 2016-12-15 10:34 -0800
          Re: Month selector ccyasa.sbassano@gmail.com - 2016-12-17 03:47 -0800
            Re: Month selector D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2016-12-18 18:01 +0100
            Re: Month selector "Karl-Heinz" <invalid@invalid.invalid> - 2016-12-19 08:58 +0100
              Re: Month selector ccyasa.sbassano@gmail.com - 2016-12-20 11:39 -0800
                Re: Month selector "Karl-Heinz" <invalid@invalid.invalid> - 2016-12-21 06:47 +0100

csiph-web