Click here to Skip to main content
15,881,413 members
Articles / Desktop Programming / WPF

Improve Zooming with Enhanced Mouse Wheels

Rate me:
Please Sign up or sign in to vote.
4.65/5 (7 votes)
19 Oct 2011CPOL6 min read 43.7K   4K   33  
How to give your users a better zooming experience with High Resolution Mouse Wheels.
// HiResScrollWheelDlg.h : header file
//

#pragma once

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

// Dialog Data
	enum { IDD = IDD_HIRESSCROLLWHEEL_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	UINT m_nWheelDelta;
	UINT m_nTimeDelta;
	UINT m_nEventsPerClick;
	afx_msg void OnEnChangeEdit1();
	afx_msg void OnEnChangeEdit2();
	afx_msg void OnEnChangeEdit3();
	afx_msg void OnBnClickedApply();
	CButton m_btnApply;
	afx_msg void OnBnClickedExit();
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Logitech Corporation
United States United States
Stephen lives in Fremont, CA with his wife and daughter and has programmed in C and C++ for a very long time.

Comments and Discussions