Categories

CODE
Visual C++ Programming
C++ (Non Visual C++ Issues)
Modern Windows Apps (Metro)
C++ and WinAPI
Managed C++ and C++/CLI
Visual C++ Bugs & Fixes
Graphics Programming
Multithreading
Network Programming
Driver Development
Visual Basic 6.0 Programming
Visual Basic .NET
Crystal Reports
C-Sharp Programming
Managed C++
Visual Basic .NET
ASP.NET
.NET Framework
ADO.NET
Windows Presentation Foundation (WPF) & XAML forum
Silverlight
.NET Installation and Configuration Issues
Java Programming
AJAX
Scripting - Client Side
Database
XML
Wireless/Mobile Development
Assembly
Scripting - Server Side (PHP, Perl, etc.)
Python
General Developer Topics
Project Planning, Design, and Management
Testers and Testing
Algorithms & Data Structures
General Discussion / Chit Chat
Announcements, Press Releases, & News
Feedback
Articles Suggestions
Testing Area
Programming Projects
C# Game(s) Project
Game Engine Project
C++ Coding Project
Project: Code War
Slow Chat: Talk with Microsoft Developer Teams
Slow Chat: Developing Multithreaded Applications
Slow Chat: C++0x
Slow Chat: Visual C++: Yesterday, Today, and Tomorrow
Directory Services
General Windows and DNA Programming
Windows OS Issues
Open Positions (Jobs)
Looking for Work
Visual Basic .NET FAQs
Visual Basic FAQs
CodeGuru Individual FAQs
CodeGuru Individual Visual Basic FAQs

Resources

Java Database
Linux
Coding
Mobile
Hardware
Software Development
Software Development
iOS,OS X
iOS,OS X
ORACLE
IBM DEVELOPER
IBM DEVELOPER
MSDN
MSDN


Tags

Visual C++ Programming

Ask questions about Windows programming with Visual C++ and help others by answering their questions.

CSliderCtrl event handeling


I have read many previous threads regaurding MFC CSliderCtrl's, and I still cant get the event handler to work....    I have a simple Slider with a range set (0,1);    when the user moves the slider I want to recieve a message....    I have tried many things in my message map, according to my book this should work    ON_NOTIFY(TB_ENDTRACK , IDC_SLIDER,  OnRelay1Slider)    the event handeler function is declared as protected  afx_msg void OnRelay1Slider(NMHDR *pNMHDR, LRESULT *pResult);      am i missing something here.... any suggestions or pointer will be greatly appreciated...thx  				  			

  				  					TB_THUMBTRACK dont work neither...  				  			

  				  					To which class have you added this handler ?  				  			

  				  					I added this handler to the same class in which the slider is declared, the class is dirived as followes CPropertyPage -> AnotherPropertyPage->MYPropertyPage(the one I am declaring and attempting to handle slider events in)....On a side note, Im handling ON_BN_CLICKED events just fine....  				  			

  				  					You need to handle WM_HSCROLL or WM_VSCROLL. Trackbar does not send WM_NOTIFY.    Read this from MSDN:  Trackbar Notification Messages  A trackbar notifies its parent window of user actions by sending the parent a WM_HSCROLL or WM_VSCROLL message. A trackbar with the TBS_HORZ style sends WM_HSCROLL messages. A trackbar with the TBS_VERT style sends WM_VSCROLL messages. The low-order word of the wParam parameter of WM_HSCROLL or WM_VSCROLL contains the notification code. For the TB_THUMBPOSITION and TB_THUMBTRACK notifications, the high-order word of the wParam parameter specifies the position of the slider.  				  			

  				  					thx for your help...    http://www.codeguru.com/forum/showth...hlight=CSlider


Related Links

How do I open an existing MFC app from within Internet Explorer?
Terminate Application
Binary FIle Write Exception
Incrementing a Counter Text File
a little confusion about array index
IClassFactory problem
help with 3 way split and CListView/CListCtrl
Stopping an inactive dialog from being redrawn when the active one is moved over it
CSocket
Using CHtmlView to produce dynamic web page
Register application
Vector insertion question
Control related question
Class instance
VARIANT does not work?? How bizarre.
Help: detect windows version