How to get WM_VCSROLL ?
-
Hello everyone: I have a tree window, before scroll to the last line, I want to delete the tree and re-install it, and then scroll. For to do it, I want to get WM_VCSROLL before OnVScroll() is called. 1.I tryed to get the msg in PreTranslateMessage, but WM_VSCROLL is not sent into the function. 2.I tryed to get the msg in WinProc, but I cannot. How to get it? Thank you. -Freehawk
-
Hello everyone: I have a tree window, before scroll to the last line, I want to delete the tree and re-install it, and then scroll. For to do it, I want to get WM_VCSROLL before OnVScroll() is called. 1.I tryed to get the msg in PreTranslateMessage, but WM_VSCROLL is not sent into the function. 2.I tryed to get the msg in WinProc, but I cannot. How to get it? Thank you. -Freehawk
WinProc? You program in WIN32? :confused: Did you mean DefWindowProc()? Anyway, that's not important. I guess this problem is because your message is sent to another window. Under the MFC framework, all messages would be sent to DefWindowProc( ) if their message handler are not defined (Ex: user defiend messages ). So your problem sounds quite strange...;P ( In Win32, you need to define all message handlers if you want to do something when these messages are sent. Otherwise, DefWindowProc( ) would be called. ) In addition, in Visual Studio you can use a tool Spy++ to "SPY" any message in your window. I hope that will help. Good luck!;)