Click here to Skip to main content
15,886,518 members
Articles / Programming Languages / C++

Virtual Desktop: A Simple Desktop Management Tool

Rate me:
Please Sign up or sign in to vote.
4.83/5 (46 votes)
25 Jul 2008CPOL5 min read 230.3K   11.9K   143  
This article gives you an overview of Windows Station, Windows Desktop and how to work with them. It also has a sample application (Virtual Desktop) demonstrating multiple desktop management.
// Virtual DesktopDlg.h : header file
//

#pragma once
#include "afxwin.h"


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

// Dialog Data
	enum { IDD = IDD_VIRTUALDESKTOP_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:
	afx_msg void OnDestroy();
	LRESULT OnTrayMessage(WPARAM wParam, LPARAM lParam);
private:
	CListBox m_DesktopListControl;
	void ShowManageDesktopsDialog(void);
public:
	afx_msg void OnLbnSelchangeDesktopList();
private:
	CEdit m_DesktopNameControl;
	CButton m_AddNewDesktop;
public:
	afx_msg void OnBnClickedAddNewDesktop();
private:
	CButton m_SwitchToDesktop;
public:
	afx_msg void OnBnClickedDeleteDesktop();
	afx_msg void OnBnClickedSwitchToDesktop();
private:
	void SwitchDesktopTo(TCHAR * szDesktopName);
	CButton m_ChkVerifyDesktopSwitch;
	afx_msg void OnBnClickedLaunchApplication();
};

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
India India
Hello All !
This is Mallinath S. Karkanti, from India. I'm working as a Software Developer in one of the Middle Scale Company... !

Comments and Discussions