![]()  | 
 
mousewheel in CXTPControlEdit | 
 
    Post Reply  
   | 
  
| Author | |
   
   vjedlicka  
   
   Senior Member  
   Joined: 04 September 2007 Status: Offline Points: 122  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: mousewheel in CXTPControlEditPosted: 04 August 2009 at 3:05am  | 
 
| 
   
    
   Hello, 
 
   
  I need an editbox with spin buttons on a tooolbar - exactly as demonstrated in the CommandBarsControls sample. 
 Is it possible to add mousewheel support, so that users can change the numerical value by the mouse wheel? 
 | 
 |
| 
   
     
     Thank you 
   
  Vaclav --------------------- ToolkitPro 20.1.0 VS2010-2022, Windows 11  | 
 |
![]()  | 
 |
   
   Satyen  
   
   Groupie  
   Joined: 22 December 2008 Location: India Status: Offline Points: 16  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 27 July 2010 at 5:05am | 
 
| 
   
    
   Yes. Codejock control can be treated like standard windows controls (e.g. spinner on a dialog). You will need to implement mousewheel event. 
 
   
  Do something like this - 
// Scroll Handling. BOOL CSpinnerCtrl::OnHookMouseWheel(UINT nFlags, short zDelta, CPoint point) 
{ 
int nVal = 0; CString strSelection = GetEditText(); if(zDelta > 0) // Increased { nVal = (int)((int)_tstoi(strSelection) + 1);   } { nVal = (int)((int)_tstoi(strSelection) - 1); } CXTPControlEdit::OnHookMouseWheel(nFlags, zDelta, point);    return TRUE;  | 
 |
| 
   
     
     Thanks & Regards,  
   
  Satyenjit Bagal. Software Development Engineer. SIEMENS Automation and Drives.  | 
 |
![]()  | 
 |
   
   vjedlicka  
   
   Senior Member  
   Joined: 04 September 2007 Status: Offline Points: 122  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 29 July 2010 at 2:49am | 
 
| 
   
    
   Thanks!
 
   
    
    | 
 |
| 
   
     
     Thank you 
   
  Vaclav --------------------- ToolkitPro 20.1.0 VS2010-2022, Windows 11  | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |