Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - problem in slider Appearance
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

problem in slider Appearance

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

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Topic: problem in slider Appearance
    Posted: 10 July 2008 at 1:39am
Hello,

CXTPRibbonGroup* pGroupColorCorrect = pTab->AddGroup(_T("ColorCorrectGroup"));CXTPControlScrollBar* pSliderBlurSharp = (CXTPControlScrollBar*)pGroupColorCorrect->Add(new CXTPControlScrollBar(), ID_SLIDER_BLUR_SHARP);pSliderBlurSharp->SetScrollBarStyle(xtpScrollStyleSlider);pSliderBlurSharp->SetRange(-75,75);pSliderBlurSharp->SetPos(50);//pSliderBlurSharp->SetFlags(xtpFlagNoMovable | xtpFlagSkipFocus); pSliderBlurSharp->SetFlags(xtpFlagSkipFocus); pSliderBlurSharp->SetWidth(150);pSliderBlurSharp->SetHeight(10);pSliderBlurSharp->SetTooltip(_T("Blur<--->Sharp"));

i created one slider using above code.But the sliding icon is not appearing on it.Please tell me what is the solution for this.you can see for first slider there is no sliding icon.

please give the solution for this problem.

Thanks And Regards,
Vijay.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2008 at 5:35am

its disabled.

 
You need enable it to add update handler for ID_SLIDER_BLUR_SHARP command or
 
pSliderBlurSharp->SetFlags(xtpFlagManualUpdate);
pSliderBlurSharp->SetEnabled(TRUE);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2008 at 7:25am
Thanks a lot for your reply.Lot of my work was pending because of this.Thanks again.
 
But now one new problem i am facing,if i click on ' + ' sign,the moving tab on slider moves properly,but if i click on ' - ' sign the moving tab doesnt move anywhere.it directly moves to 0 position when i click on ' - ' sign.
I tried many combinations of setrange() function,but unfortunately nothing worked.
Please guide me why the slider tab not moving properly.
 
Thanks And Regards,
Vijay
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2008 at 8:57am
Hi,
 
Right. now its our issue. :(
Slider always use "0" as minimum. Please use range 0 - 150 instead and manually convert it (Value - 75) in Execute event.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2008 at 11:20am
Originally posted by vijaymahajan vijaymahajan wrote:

 
Oleg, how can I create a slider with this appearance on a toolbar? I can't find any examples :-(
Simon HB9DRV
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2008 at 11:25am
Originally posted by Simon HB9DRV Simon HB9DRV wrote:

Originally posted by vijaymahajan vijaymahajan wrote:

 
Oleg, how can I create a slider with this appearance on a toolbar? I can't find any examples :-(
 
SetScrollBarStyle(xtpScrollStyleSlider); !!!
Simon HB9DRV
Back to Top
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2008 at 11:41pm

Hello,

if i handle the event of slider using ON_XTP_EXCECUTE(),then how can i check the SB_ENDSCROLL condition as i want to do something once the scroll ends.

Please guide me accordingly.
Thanks And Regards,
Vijay.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2008 at 2:47am

with XTP_EXECUTE you can't...

 
Solution is override CXTPControlScrollBar and its void CXTPControlScrollBar::OnScroll(UINT nSBCode, UINT nPos) method and add own code.
 
 
Original code:
 

void CXTPControlScrollBar::OnScroll(UINT nSBCode, UINT nPos)
{
 int nCurPos = GetPos();
 switch (nSBCode)
 {
  case SB_TOP: nCurPos = m_nMin; break;
  case SB_BOTTOM: nCurPos = m_nMax; break;
  case SB_LINEUP: nCurPos = max(nCurPos - 1, m_nMin); break;
  case SB_LINEDOWN: nCurPos = min(nCurPos + 1, m_nMax); break;
  case SB_THUMBTRACK: nCurPos = nPos; break;
  case SB_PAGEUP: nCurPos = max(nCurPos - m_nMax / 10, m_nMin); break;
  case SB_PAGEDOWN: nCurPos = min(nCurPos + m_nMax / 10, m_nMax); break;
 }
 if (nCurPos == m_nPos)
  return;
 m_nPos = nCurPos;
 RedrawParent(FALSE);
 NotifySite(CBN_XTP_EXECUTE);
}
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.109 seconds.