Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

MFC Snapping Windows

, 27 May 2014 GPL3
Easily create windows that snap to each other.
samplesnapper_demo-noexe.zip
SampleSnapper.suo
samplesnapper_demo.zip
SampleSnapper.suo
SampleSnapper
SampleSnapper.vcxproj.filters
SampleSnapper.vcxproj.user
Release
SampleSnapper.Build.CppClean.log
SampleSnapper.log
res
SampleSnapper.ico
SampleSnapper_src.zip
SampleSnapper_demo
SampleSnapper.suo
SampleSnapper
Release
SampleSnapper.Build.CppClean.log
SampleSnapper.log
res
SampleSnapper.ico
SampleSnapper.vcxproj.filters
SampleSnapper.vcxproj.user
// SampleSnapperDlg.h : header file
//

#pragma once

#include "CExtWS.h"
#include "ChildSnapper.h" 

typedef CList <CChildSnapper *, CChildSnapper *> SnapList;

// CSampleSnapperDlg dialog
class CSampleSnapperDlg : public CExtPS < CDialogEx >
{
// Construction
public:
	CSampleSnapperDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_SAMPLESNAPPER_DIALOG };

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


// Implementation
protected:
	HICON m_hIcon;
	CChildSnapper * m_Snapper;
	/*CList <CChildSnapper *, CChildSnapper *>*/SnapList m_Snappers;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedButton1();
	afx_msg LRESULT OnDestroyChild(WPARAM wParam, LPARAM lParam);
	virtual BOOL DestroyWindow();
};

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 GNU General Public License (GPLv3)

Share

About the Author

Vachaun22
Systems / Hardware Administrator
United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.1411022.1 | Last Updated 27 May 2014
Article Copyright 2012 by Vachaun22
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid