Click here to Skip to main content
15,920,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unable to move slider position using mouse Pin
Mark Salsbery26-Jan-09 5:50
Mark Salsbery26-Jan-09 5:50 
GeneralRe: Unable to move slider position using mouse [modified] Pin
John50226-Jan-09 6:05
John50226-Jan-09 6:05 
GeneralRe: Unable to move slider position using mouse Pin
Mark Salsbery26-Jan-09 6:23
Mark Salsbery26-Jan-09 6:23 
GeneralRe: Unable to move slider position using mouse [modified] Pin
John50226-Jan-09 6:43
John50226-Jan-09 6:43 
GeneralRe: Unable to move slider position using mouse Pin
Mark Salsbery26-Jan-09 6:46
Mark Salsbery26-Jan-09 6:46 
GeneralRe: Unable to move slider position using mouse [modified] Pin
John50226-Jan-09 7:17
John50226-Jan-09 7:17 
GeneralRe: Unable to move slider position using mouse Pin
Mark Salsbery26-Jan-09 7:26
Mark Salsbery26-Jan-09 7:26 
GeneralRe: Unable to move slider position using mouse [modified] Pin
John50226-Jan-09 22:30
John50226-Jan-09 22:30 
Hi Mark,
I did the same thing what you have suggested in the previous post. I have included AfxMessageBox function in the constructor of CMySliderCtrl class.
but this is not executing.

then i came to know that the class constructor is not getting executing..

Below i am including the code snippet..

Here CMySliderCtrl is slider class, and CIncidentSample4Dlg class is my dialog box class. in my dilaog box class i have written create function for slider.

class CMySliderCtrl : public CSliderCtrl
{
DECLARE_DYNAMIC(CMySliderCtrl)

public:
CMySliderCtrl();
virtual ~CMySliderCtrl();

protected:
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
};


class CIncidentSample4Dlg : public CDialog
{
// Construction
public:
CIncidentSample4Dlg(CWnd* pParent = NULL); // standard constructor

CSliderCtrl *m_slider_bar1;

// Dialog Data
//{{AFX_DATA(CIncidentSample4Dlg)
enum { IDD = IDD_INCIDENTSAMPLE4_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA

// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CIncidentSample4Dlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL

// Implementation
protected:
HICON m_hIcon;

// Generated message map functions
//{{AFX_MSG(CIncidentSample4Dlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnCancelMode();
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_INCIDENTSAMPLE4DLG_H__1BDF3DFC_90DC_4DB5_89D3_910D63A593B4__INCLUDED_)

modified on Tuesday, February 17, 2009 10:16 AM

GeneralRe: Unable to move slider position using mouse Pin
Mark Salsbery27-Jan-09 5:58
Mark Salsbery27-Jan-09 5:58 
QuestionTooltip problem Pin
madmax000124-Jan-09 8:30
madmax000124-Jan-09 8:30 
AnswerRe: Tooltip problem Pin
Hans Dietrich25-Jan-09 6:53
mentorHans Dietrich25-Jan-09 6:53 
GeneralRe: Tooltip problem Pin
madmax000125-Jan-09 9:07
madmax000125-Jan-09 9:07 
AnswerRe: Tooltip problem Pin
KarstenK26-Jan-09 3:20
mveKarstenK26-Jan-09 3:20 
GeneralRe: Tooltip problem Pin
madmax000126-Jan-09 6:11
madmax000126-Jan-09 6:11 
QuestionNeed help regarding the slider Pin
John50224-Jan-09 8:22
John50224-Jan-09 8:22 
QuestionRe: Need help regarding the slider Pin
David Crow24-Jan-09 14:09
David Crow24-Jan-09 14:09 
AnswerRe: Need help regarding the slider Pin
John50225-Jan-09 0:39
John50225-Jan-09 0:39 
GeneralRe: Need help regarding the slider Pin
Mark Salsbery25-Jan-09 7:38
Mark Salsbery25-Jan-09 7:38 
QuestionNeed some help on how to create a Line and how to move that line using mouse options Pin
John50224-Jan-09 4:47
John50224-Jan-09 4:47 
AnswerRe: Need some help on how to create a Line and how to move that line using mouse options Pin
Hamid_RT24-Jan-09 5:15
Hamid_RT24-Jan-09 5:15 
GeneralRe: Need some help on how to create a Line and how to move that line using mouse options Pin
John50224-Jan-09 12:30
John50224-Jan-09 12:30 
AnswerRe: Need some help on how to create a Line and how to move that line using mouse options Pin
PJ Arends24-Jan-09 5:44
professionalPJ Arends24-Jan-09 5:44 
GeneralRe: Need some help on how to create a Line and how to move that line using mouse options Pin
John50224-Jan-09 12:31
John50224-Jan-09 12:31 
AnswerRe: Need some help on how to create a Line and how to move that line using mouse options Pin
bob1697224-Jan-09 7:36
bob1697224-Jan-09 7:36 
GeneralRe: Need some help on how to create a Line and how to move that line using mouse options Pin
John50224-Jan-09 12:33
John50224-Jan-09 12:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.