Solved

Detect the diff ID of the sliders??

Posted on 1998-10-09
2
155 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
2 Comments
 
LVL 8

Accepted Solution

by:
Answers2000 earned 10 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
cat dog challenge 18 122
Separate into files by filename 12 67
twoTwo  challenge 35 86
pre4 challenge 19 88
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now