Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Handling Spinner control on ribbon bar.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Handling Spinner control on ribbon bar.

 Post Reply Post Reply
Author
Message
Satyen View Drop Down
Groupie
Groupie
Avatar

Joined: 22 December 2008
Location: India
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Satyen Quote  Post ReplyReply Direct Link To This Post Topic: Handling Spinner control on ribbon bar.
    Posted: 22 December 2008 at 9:28am
I want to implement a spinner control on ribbon bar.
I am using ‘CXTPControlEdit’ as my control class. I am able add the control and handle its event using following NotifySpinChanged function.

 

But I am not able to fire event when mouse wheel is rotated. I.e. changing spin value using mouse scroll. (This functionality is not implemented in Microsoft word also).

 

My class is as follows -

 

// Combo box class for Font list.

class JTranslucencyCtrl: public CXTPControlEdit

{

public:

   

      virtual CString GetSelecteFont()

    {

            return GetEditText();

    }

 

      virtual void NotifySpinChanged(int incr, int dir)

      {

            CString strSelection =  GetEditText();

 

            CXTPControlEdit::NotifySpinChanged(incr, dir);

      }

 

      DECLARE_XTP_CONTROL(JTranslucencyCtrl);

};

 

Please let me know, how to handle scroll events

 
 
Thanks & Regards,
Satyenjit Bagal.
Software Development Engineer.
SIEMENS Automation and Drives.
Back to Top
ColtSeavers View Drop Down
Newbie
Newbie
Avatar

Joined: 30 October 2007
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote ColtSeavers Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2008 at 4:10pm
I found a similar issue when using a slider control.  The only way I found was to use the CN_UPDATE_COMMAND_UI (OnUpdate...) handler and check for changes in the control's position.  I haven't decided whether to leave this in the program for the released version or try and find a better way to handle this.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.033 seconds.