Page 63 - DCAP408_WEB_PROGRAMMING
P. 63

Unit 4: Windows Controls




          4.5.6 Button Notification Codes                                                       Notes


          Notifications

           Topic                     Contents
           BCN_DROPDOWN              Sent  when  the  user  clicks  a  drop down  arrow  on  a button.  The
                                     parent window  of the control obtains  this notification  code in the
                                     form of  a WM_NOTIFY  message.
           BCN_HOTITEMCHANGE         Informs  the  button  control  owner  that  the mouse  is  entering  or
                                     leaving the  client area  of the  button control.  The button  control
                                     sends this notification code in the form of a WM_NOTIFY message.

           BN_CLICKED                Sent when the user clicks a button. The parent window of the button
                                     obtains  the  BN_CLICKED  notification  code  through  the
                                     WM_COMMANDmessage.
           BN_DBLCLK                 Sent when the user double-clicks a button. This notification code is
                                     sent  automatically  for  BS_USERBUTTON,BS_RADIOBUTTON,
                                     and  BS_OWNERDRAW  buttons.  Other  button  types  send
                                     BN_DBLCLK only if  they have the BS_NOTIFY style. The parent
                                     window of  the button  obtains the  BN_DBLCLK notification  code
                                     via the WM_COMMAND message.

           BN_DISABLE                Sent when a button is disabled. This notification code is offered only
                                     for  compatibility  with  16-bit  versions  of  Windows  earlier  than
                                     version  3.0.  Applications  should  use  the  BS_OWNERDRAW
                                     button style  and the  DRAWITEMSTRUCT structure  for this  task.
                                     The  parent  window  of  the  button  obtains  the  BN_DISABLE
                                     notification code via the WM_COMMANDmessage.
           BN_DOUBLECLICKED          Sent when the user double-clicks a button. This notification code is
                                     sent  automatically  for  BS_USERBUTTON,BS_RADIOBUTTON,
                                     and  BS_OWNERDRAW  buttons.  Other  button  types  send
                                     BN_DOUBLECLICKED  only  if  they  have  the  BS_NOTIFY  style.
                                     The parent window of the button obtains the BN_DOUBLECLICKED
                                     notification  code via the WM_COMMAND message.
           BN_HILITE                 Sent when the user selects a button. This notification code is offered
                                     only for compatibility with 16-bit versions of Windows earlier than
                                     version  3.0.  Applications  should  use  the  BS_OWNERDRAW
                                     button style  and the  DRAWITEMSTRUCT structure  for this  task.
                                     The  parent  window  of  the  button  obtains  the  BN_HILITE
                                     notification  code via the WM_COMMAND message.
           BN_KILLFOCUS              Sent when a button loses the keyboard focus. The button must have
                                     the  BS_NOTIFY  style  to  send  this  notification  code.  The  parent
                                     window  of the  button  receives  the BN_KILLFOCUS  notification
                                     code  via the  WM_COMMANDmessage.
           BN_PAINT                  Sent  when  a button  should  be  painted. This  notification  code  is
                                     offered only  for compatibility  with 16-bit  versions  of  Windows
                                     earlier  than  version  3.0.  Applications  should  use  the
                                     BS_OWNERDRAW  button  style  and  the  DRAWITEMSTRUCT
                                     structure for this task. The parent window of the button obtains the
                                     BN_PAINT  notification  code  through  the  WM_COMMAND
                                     message.
           BN_PUSHED                 Sent  when  the  push  state  of  a  button  is  set  to  pushed.  This
                                     notification  code  is  offered  only  for  compatibility  with  16-bit
                                     versions of Windows earlier than version 3.0. Applications should
                                                                                 Contd...




                                           LOVELY PROFESSIONAL UNIVERSITY                                   57
   58   59   60   61   62   63   64   65   66   67   68