Solved

Detect the diff ID of the sliders??

Posted on 1998-10-09
2
169 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

863 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

24 Experts available now in Live!

Get 1:1 Help Now