Announcement

Collapse
No announcement yet.

Complete List of Control Events

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gary Beene
    replied
    In the scrollbar control events of the list I posted, you should be
    aware that there are only 3 notification events:

    %wm_ctlcolorscrollbar - control about to be drawn
    %wm_hscroll - horizontal scroll event (lo word of wParm)
    %wm_vscroll - vertical scroll event (lo word of wParm)


    The remainder of the scrollbar information I posted, the %sb_xxx
    values, are found in the wParm value, as shown in this code posted
    by Dominic Mitchell in an earlier thread. He showed how to extract
    the event information for a vertical scroll.

    Code:
        ' Filter message 
      SELECT CASE CB.MSG
        CASE %WM_VSCROLL  
    
          ' Filter control by ID
          SELECT CASE GetDlgCtrlID(CB.LPARAM)
            CASE %IDC_FORM1_VSCROLL1
               
              ' Filter scroll code 
              SELECT CASE LO(WORD, CB.WPARAM)
                CASE %SB_BOTTOM        
                CASE %SB_ENDSCROLL     
                CASE %SB_LINEDOWN      
                CASE %SB_LINEUP        
                CASE %SB_PAGEDOWN      
                CASE %SB_PAGEUP        
                CASE %SB_THUMBPOSITION 
                CASE %SB_THUMBTRACK    
                CASE %SB_TOP           
              END SELECT    
    
          END SELECT  
          
      END SELECT
    Last edited by Gary Beene; 19 Jan 2009, 10:59 PM. Reason: formatting

    Leave a comment:


  • Gary Beene
    started a topic Complete List of Control Events

    Complete List of Control Events

    I wanted a complete list of events that could go in callback functions for each control. So after the help I got from earlier posts I went online at MSDN and took the time to create the following list. I shortened (perhaps butchered?) the multiline definitions of the events into one-line versions to fit the size of this list.

    The list is organized by Windows common controls, just as MSDN lists them. I put the name of the 22 PowerBASIC controls along side each common control name as seemed appropriate.

    The one-line descriptions are pretty short, so be sure to check out the MSDN page for more details.

    http://msdn.microsoft.com/en-us/library/bb773169(VS.85).aspx

    I haven't done enough PB programming yet to know which of the events are the most important, but I was happy with just getting a complete list. Culling out the debris will come later.

    All that said, here's my list. The items with "-n" and "-c" before the description refer to %wm_notify and %wm_command messages. Those entries without either refer to events that come from a different message.

    Code:
    ----button:  button, check3state, checkbox, frame,
                 imgbutton, imgbuttonx, option
    %bcn_dropdown            -n click on drop down arrow on button
    %bcn_hotitemchange       -n mouse enters/leaves client area
    %bn_clicked              -c mouse click
    %bn_dblclk               -c mouse doubleclick
    %bn_disable              -c (n/a - win3.0 only)
    %bn_doubleclicked        -n mouse doubleclick
    %bn_hilite               -c (n/a - win3.0 only)
    %bn_killfocus            -c focus is lost
    %bn_paint                -c control should be painted
    %bn_pushed               -c (n/a - win3.0 only)
    %bn_setfocus             -n focus is received
    %bn_unhilite             -c when highlight should be removed 
    %bn_unpushed             -c (n/a - win3.0 only)
    %nm_customdraw           -n custom draw operation
    %wm_ctlcolorbtn          -  before drawing owner-drawn control
    
    ---combobox
    %cbn_closeup             -c list box closed
    %cbn_dblclk              -c double-clicks list box
    %cbn_dropdown            -c before list is shown
    %cbn_editchange          -c change made in edit box
    %cbn_editupdate          -c before change made in edit box
    %cbn_errspace            -c memory allocation problem
    %cbn_killfocus           -c keyboard focus lost
    %cbn_selchange           -c selection about to change (mouse or arrow keys)
    %cbn_selcancel           -c item selection canceled
    %cbn_selendok            -c item selection accepted
    %cbn_setfocus            -c keyboard focus received
    %wm_compareitem          -  postion of item in owner-drawn control
    %wm_drawitem             -  owner-drawn control has changed
    %wm_measureitem          -  owner-drawn control is created
    
    ----edit control:  textbox
    %en_change               -c text has changed (after screen updated)
    %en_errspace             -c insufficient space
    %en_hscroll              -c horizontal scroll bar clicked (before update)
    %en_killfocus            -c textbox loses keyboard focus
    %en_maxtext              -c maximum character length exceeded. truncates text.
    %en_setfocus             -c textbox receives keyboard focus
    %en_update               -c text change, before screen update
    %en_vscroll              -c vertical scrollbar clicked (before update)
    %wm_ctlcoloredit         -  before read-only/disabled control redrawn
    
    ---listbox
    %lbn_dblclk              -c doubleclick
    %lbn_errspace            -c not enough memory
    %lbn_killfocus           -c keyboard focus lost
    %lbn_selcancel           -c ignore initial user selection
    %lbn_selchange           -c selection about to be changed (arrow or mouse)
    %lbn_setfocus            -c keyboard focus received
    %wm_chartoitem           -  response to wm_char (lbs_wantkeyboardinput style only)
    %wm_ctlcolorlistbox      -  before system draws list box
    %wm_deleteitem           -  when listbox destroyed or item deleted 
    %wm_vkeytoitem           -  response to wm_keydown (lbs_wantkeyboardinput style only)
    
    ----listview
    %lvn_begindrag           -n left mouse drag/drop initiated
    %lvn_beginlabeledit      -n start of label editing
    %lvn_beginrdrag          -n right mouse drag/drop initiated
    %lvn_beginscroll         -  scrolling operation started
    %lvn_columnclick         -n column was clicked
    %lvn_columndropdown      -n dropdown button was clicked
    %lvn_columnoverflowclick -n overflow button is clicked
    %lvn_deleteallitems      -n about to delete all items
    %lvn_deleteitem          -n about to delete item
    %lvn_endlabeledit        -n label editing completed
    %lvn_endscroll           -  scrolling operation ends
    %lvn_getdispinfo         -n get item display information or sort list-view
    %lvn_getemptymarkup      -n control has no items
    vlvn_getinfotip          -n get tooltip information
    %lvn_hottrack            -n mouse moved over item
    %lvn_incrementalsearch   -n incremental search has started
    %lvn_insertitem          -n new item was inserted
    %lvn_itemactivate        -n item activated
    %lvn_itemchanged         -n item has changed
    %lvn_itemchanging        -n item is changing
    %lvn_keydown             -n key pressed
    %lvn_linkclick           -n link has been clicked
    %lvn_marqueebegin        -n bounding box selection has begun
    %lvn_odcachehint         -n display area has changed
    %lvn_odfinditem          -  request to find callback item
    %lvn_odstatechanged      -n state or range of items has changed
    %lvn_setdispinfo         -n request to update item information
    %nm_click                -n left mouse click
    %nm_customdraw           -n custom drawing operation
    %nm_dblclk               -n item double clicked
    %nm_hover                -n mouse is over item
    %nm_killfocus            -n focus lost
    %nm_rclick               -n right mouse click of item
    %nm_rdblclk              -n right mouse double click of item
    %nm_releasedcapture      -n mouse capture released
    %nm_return               -n ENTER key pressed
    %nm_setfocus             -n focus received
    
    ----progress bar
    no notifications
    
    ----scrollbar
    %wm_ctlcolorscrollbar    - control about to be drawn
    %wm_hscroll              - horizontal scroll event (lo word of wParm)
      %sb_endscroll          - ends scroll 
      %sb_left               - scroll to upper left
      %sb_right              - scroll to lower right
      %sb_lineleft           - scrolls left by one unit
      %sb_lineright          - scrolls right by one unit
      %sb_pageleft           - scrolls left by the width of the window
      %sb_pageright          - scrolls right by the width of the window
      %sb_thumbposition      - scroll box dragged and released
      %sb_thumbtrack         - scroll box is being dragged
    %wm_vscroll              - vertical scroll event (lo word of wParm)
      %sb_bottom             - scrolls to lower right
      %sb_endscroll          - ends scroll
      %sb_linedown           - scrolls one line down
      %sb_lineup             - scrolls one line up
      %sb_pagedown           - scrolls one page down
      %sb_pageup             - scrolls one page up
      %sb_thumbposition      - scroll box dragged and released
      %sb_thumbtrack         - scroll box is being dragged
      %sb_top                - scrolls to upper left
    
    ----static:  graphic, image, imagex, label, line
    %stn_clicked             -c mouse click
    %stn_dblclk              -c double slick
    %stn_disable             -c when control has been disabled
    %stn_enable              -c when control has been enabled
    %wm_ctlcolorstatic       -  about to be drawn
    
    ----statusbar
    %nm_click                -n mouse click
    %nm_dblclk               -n double click
    %nm_rclick               -n right mouse click
    %nm_rdblclk              -n right mouse double click
    %sbn_simplemodechange    -n simple mode has changed
    
    ----tab
    nm_click                 -n mouse click
    nm_dblclk                -n mouse doubleclick
    nm_rclick                -n right mouse click
    nm_rdblclk               -n right mouse double click
    nm_releasedcapture       -n relasing mouse capture
    tcn_focuschange          -  focus has changed
    tcn_getobject            -n object dragged over tab item
    tcn_keydown              -n key pressed
    tcn_selchange            -n selected tab has changed
    tcn_selchanging          -n tab is about to change
    
    ----toolbar
    %nm_char                 -n has received WM_CHAR message
    %nm_click                -n mouse click
    %nm_customdraw           -n custom drawing operation
    %nm_dblclk               -n mouse double click
    %nm_keydown              -n key pressed
    %nm_ldown                -  left mouse button pressed
    %nm_rclick               -n right mouse click
    %nm_rdblclk              -n right mouse double click
    %nm_releasedcapture      -n releasing mouse capture
    %nm_tooltipscreated      -n creted tooltip control
    %tbn_beginadjust         -n begun customizing toolbar
    %tbn_begindrag           -n begun dragging a button
    %tbn_custhelp            -n chosen Help button
    %tbn_deletingbutton      -  button about to be deleted
    %tbn_dragout             -n cursor moved off a clicked button
    %tbn_dragover            -  button being dragged over
    %tbn_dropdown            -n dropdown button clicked
    %tbn_dupaccelerator      -  use accelerator key on multiple toolbars
    %tbn_endadjust           -n toolbar customization has stopped
    %tbn_enddrag             -n dragging a button has stopped
    %tbn_getbuttoninfo       -n get customization information
    %tbn_getdispinfo         -n get display information for item
    %tbn_getinfotip          -n get infotip information for item
    %tbn_getobject           -  get drop target object
    %tbn_hotitemchange       -n highlighted (hot) item changed
    %tbn_initcustomize       -  customizing has started
    %tbn_mapaccelerator      -  get index of button with accelerator character
    %tbn_querydelete         -n pending deletion of button
    %tbn_queryinsert         -n pending insertion of button
    %tbn_reset               -n reset content of Customize Toolbar dialog box
    %tbn_restore             -  toolbar being restored
    %tbn_save                -  toolbar being saved
    %tbn_toolbarchange       -n customization complete
    %tbn_wrapaccelerator     -  get index of button with accelerator character
    %tbn_wraphotitem         -  hot item about to change
    
    ---treeview
    %nm_click                -n mouse click
    %nm_customdraw           -n custom drawing operations
    %nm_dblclk               -n mouse double click
    %nm_killfocus            -n lost focus
    %nm_rclick               -n right mouse click
    %nm_rdblclk              -n right mouse double click
    %nm_return               -n ENTER is pressed
    %nm_setcursor            -n setting cursor
    %nm_setfocus             -n focus received
    %tvn_asyncdraw           -n icon/overlay drawing failed
    %tvn_begindrag           -n left mouse drag/drop initiated
    %tvn_beginlabeledit      -n start of item label editing
    %tvn_beginrdrag          -n right mouse drag/drop initiated
    %tvn_deleteitem          -n item being deleted
    %tvn_endlabeledit        -n end of label editing
    %tvn_getdispinfo         -n get display information about item
    %tvn_getinfotip          -n get tooltip information about item
    %tvn_itemchanged         -n item attributes have changed
    %tvn_itemchanging        -n item attributes are about to change
    %tvn_itemexpanded        -n item has expanded/collapsed
    %tvn_itemexpanding       -n item about to expand/collapse
    %tvn_keydown             -n key pressed
    %tvn_selchanged          -n selection changed
    %tvn_selchanging         -n selection about to change
    %tvn_setdispinfo         -n request to update item info
    %tvn_singleexpand        -n single click expand/close of item
    Please let me know if you find any mistakes - either list items or descriptions that are off the mark. I've put the list in the PowerBASIC section of my website and keep it up to date there.
    Last edited by Gary Beene; 20 Jan 2009, 09:20 AM. Reason: correction/update to info
Working...
X