Print Page | Close Window

Can we send message to a slider?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=11563
Printed Date: 16 July 2025 at 8:34am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Can we send message to a slider?
Posted By: vijaymahajan
Subject: Can we send message to a slider?
Date 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.

 




Replies:
Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net