Library tutorials & articles
Subclassing
By James Crowley, published on 14 Jul 2001
Other Messages
Below is a list of some of the other messages you can catch when subclassing, and when they occur. For the constant declarations, use the API Viewer. Take a look at the SDK documentation in MSDN for extensive definitions and what is actually passed in the lParam and wParam parameters (these vary from message to message)
| Message | Occurs... |
| WM_MOVE | when the form is moved |
| WM_NCLBUTTONDOWN | when the left mouse button is pressed on the title bar |
| WM_NCLBUTTONUP | when the left mouse button is raised off the title bar |
| WM_NCLBUTTONDBLCLK | when the left mouse button is double clicked on the title bar |
| WM_NCRBUTTONDOWN | when the right mouse button is pressed on the title bar |
| WM_NCRBUTTONUP | when the right mouse button is raised off the title bar |
| WM_NCRBUTTONDBLCLK | when the right mouse button is double clicked on the title bar |
| WM_NCMOUSEMOVE | when the mouse is moved over the titlebar |
| WM_NCACTIVATE | when the title bar is activated |
| WM_ACTIVATE | when the form is activated |
| WM_EXITSIZEMOVE | when the mouse is released after moving the form |
| WM_VSCROLL | when the textbox is scrolled vertically |
| WM_HSCROLL | when the textbox is scrolled horizontally |
| WM_MENUSELECT | when a menu is moved over by the mouse. |
| WM_PAINT | when the form is redrawn |
| WM_GETMINMAXINFO | when windows requests the minimum and maximum form sizes |
| WM_NOTIFY | when a control on the form is sent a message |
Related articles
Related discussion
-
Run-time error '91'
by converter2009 (1 replies)
-
VB6 Runtime error 381 subsript out of range Error
by Uncle (2 replies)
-
passing and reading parameters from using Shell
by jigartoliya (0 replies)
-
Convert C++ code to VB6
by mawcot (4 replies)
-
listbox scrollbar
by Dennijr (10 replies)
Related podcasts
-
Christian Beauclair
14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...
Pretty hacky functions... Try these:
GetLowWord = Word Mod 65536
End Function
Public Function GetHighWord(Word As Long)
GetHighWord = (Word \ 65536) Mod 65536
End Function
Those will chop off the 1st/2nd and 3rd/4th bytes respectively using pure math. Much faster and more universal.
Hummmm..... This code looks surprisingly like the code in the GETMINMAXINFO example at http://www.mvps.org/vbvision/ Right down to the exact same comments! Coincidence? You be the judge!
http://www.vbaccelerator.com/home/VB/Code/Libraries/Subclassing/SSubTimer/article.asp
the link Download the SSubTmr project code (no DLL) (9kb) not working.
This thread is for discussions of Subclassing.