Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Detect the diff ID of the sliders??

Posted on 1998-10-09
2
Medium Priority
?
203 Views
Last Modified: 2013-11-20
Hi there!

I have a two sliders attached to a dialog based application.
How do i detect which slider i had click on inside the WM_VScroll message call...??? Thanx.
Urgently needed!!!!!!!!
0
Comment
Question by:Ah_Kua
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
Answers2000 earned 20 total points
ID: 1323137
1. In response to WM_VSCROLL sent to the dialog

//f OnVScroll MFC override use
HWND hWndScroll = pScrollBar->m_hWnd ;
// SDK style equivalent: (unpacking the message manually) is
// HWND hWndScroll = (HWND) lParam;      


if  ( hWndScroll == ::GetDlgItem(m_hWnd,IDC_SLIDER1) )
{
 // slider #1
}
else if  ( hWndScroll == ::GetDlgItem(m_hWnd,IDC_SLIDER2) )
{
 // slider #2
}

0
 

Author Comment

by:Ah_Kua
ID: 1323138
Thanx anyway but i solve already using pointer in the init dialog to reference it....
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question