.Overview

Category: Controls - .Customization

Date: 02-16-2022

Return to Index


 
http://msdn.microsoft.com/en-us/library/ms364048%28VS.80%29.aspx
http://codeidol.com/csharp/windows-forms-programming/Controls/Owner-Drawn-Controls/
http://kiranu.wordpress.com/2006/07/06/custom-draw-and-owner-draw/
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761817%28v=vs.85%29.aspx
 
'The various Common Controls readily support the creation of a wide range of applications.
'But eventually, most programmers run into the need for features not offered by the common
'controls.  Sometimes the need is for a control with just few minor changes from the features
'offerred by a common control.  Or sometimes, the need is for a control has no counter-part
'in the list of common controls.
 
'With respect to visual aspects of a control, the programmer has a variety of options on
'controlling how a control is drawn.
 
'Drawing Options:
 
'Custom Control            -  write all of the code for the control yourself
'Handling WM_Paint         -  do all of the painting yourself (existing control)
'Owner Draw                -  draw in response to request from Windows
'Custom Draw               -  selectively draw what you want to paint
'Handling WM_CtlColor      -  assign brush for Windows to use (basically color control)
'Handling WM_EraseBkGnd    -  handle background painting
 
'Limitations
'Custom Control            -  works on all custom controls
'Handling WM_Paint         -  works on all controls
'Owner Draw                -  works only with button, combobox, static, listview, menu, listbox, TAB
'Custom Draw               -  works only with button, header, listview, rebar, toolbar, tooltip, trackbar, treeview
'Handling WM_CtlColor      -  works only with (buttons, static, edit, scrollbars, listbox, combobox (listbox part), message box, dialog)
'Handling WM_EraseBkGnd    -  works on all controls ?
 
'Button: when we say button control, we also mean these PowerBASIC controls:
   ButtonCheck3StateCheckBoxFrameImgButtonImgButtonX
 
'Static: when we say static control, we also mean these PowerBASIC controls:
   GraphicImageImageXLabelLine
   
'Note that Custom Control is not the same thing as Custom Draw
'Note that Owner Draw (sometimes called Owner Drawn) is not the same thing as Custom Draw
 
'Owner Draw    Custom Draw    WM_CtlColor
'                             (Std Controls)
button            button         buttons
combobox                         combobox (listbox portion only)
                                 edit
                  header
static                           static
                                 listbox
                                 message boxes
listview          listview
menu
listbox
                  rebar
                                 scrollbar
TAB
                  toolbar
                  tooltip
                  trackbar
                  treeview
                                 dialog
 
 
'gbs_01162
'Date: 03-25-2012


created by gbSnippets
http://www.garybeene.com/sw/gbsnippets.htm