RE: The best "JOIN" -> calendar clix

new topic     » topic index » view thread      » older message » newer message

> BTW, do YOU know how to pick up clicks and/or double clicks on a
> month calendar control? I hate having to have a separate button to
> click once you've got your required day.
Andy,

You need to make the fDoMCN_SELCHANGE routine look like this in 
win32lib:

----------------------------------------------------
function fDoMCN_SELCHANGE(integer id, atom hWnd, atom wParam, atom 
lParam)
----------------------------------------------------

   id = getId( fetch(lParam, NMHDR_hwndFrom ) ) -- new line
   invokeHandler(id, w32HChange, {} )

   return {}
end function

Also, I would suggest changing the kNotifications definition in win32lib 
to this:

constant kNotifications =
         {
      TCN_SELCHANGE
   ,  LVN_COLUMNCLICK          
   ,  LVN_GETDISPINFO        
   ,  LVN_BEGINDRAG            
   ,  TVN_GETDISPINFO         
   ,  TVN_SELCHANGED
   ,  TVN_DELETEITEM
   ,  TTN_GETDISPINFO
-- Beg CJT01
--   ,  MCN_SELCHANGE
   ,  MCN_SELECT
-- End CJT01
   ,  TBN_GETBUTTONINFO
   ,  TBN_QUERYINSERT
   ,  TBN_QUERYDELETE
         }

If you use MCN_SELCHANGE your program will get a notification if the 
user changes the month.  Using MCN_SELECT will only send your program 
notification when the user actually selects a date.

Hope this helps.

Jonas Temple

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu