Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Can we send message to a slider?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Can we send message to a slider?

 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: Can we send message to a slider?
    Posted: 24 July 2008 at 8:15am
Hello,
i have created one slider control in status bar,and handled the messages in view class as follows -
ON_UPDATE_COMMAND_UI(ID_STATUSBAR_ZOOMSLIDER,OnUpdateZoomScroll)

ON_NOTIFY(XTP_SBN_SCROLL, ID_STATUSBAR_ZOOMSLIDER, OnZoomSliderScroll)

now,whenever i click on slider it works properly,But i have one more requirement.

I want to send the message from another function.
i was trying as follows -

pView->SendMessage(XTP_SBN_SCROLL,ID_STATUSBAR_ZOOMSLIDER);

But it didnt worked.
How can i do the sendmessage,please help me.
 
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: 25 July 2008 at 1:24am
Try this cdoe
 
 CWnd* pParent = pView

 NMXTPSCROLL nmScroll;
 nmScroll.hdr.code = XTP_SBN_SCROLL;
 nmScroll.hdr.idFrom = GetID();
 nmScroll.hdr.hwndFrom = m_pStatusBar->GetSafeHwnd();
 nmScroll.pSender = this;
 nmScroll.nPos = pos;
 nmScroll.nSBCode = cmd;

 LRESULT lResult = 0;
 AFX_NOTIFY notify;
 notify.pResult = &lResult;
 notify.pNMHDR = (NMHDR*)&nmScroll.hdr;

 pParent->OnCmdMsg(GetID(), MAKELONG(XTP_SBN_SCROLL, WM_NOTIFY), &notify, NULL);

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.188 seconds.