Click here to Skip to main content
15,898,134 members
Articles / Desktop Programming / MFC

A set of classes to create the IE-style GUI

Rate me:
Please Sign up or sign in to vote.
4.85/5 (52 votes)
19 Jul 2003CPOL6 min read 574.1K   6.4K   168  
The article gives a sample of how to implement Internet Explorer-style sizable re-bar and menu bar controls.
/////////////////////////////////////////////////////////////////////////////
// WindowListDialog.h: interface for the CWindowListDialog class.
//
/////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2001-2002 by Nikolay Denisov. All rights reserved.
//
// This code is free for personal and commercial use, providing this 
// notice remains intact in the source files and all eventual changes are
// clearly marked with comments.
//
// You must obtain the author's consent before you can include this code
// in a software library.
//
// No warrantee of any kind, express or implied, is included with this
// software; use at your own risk, responsibility for damages (if any) to
// anyone resulting from the use of this software rests entirely with the
// user.
//
// Please email bug reports, bug fixes, enhancements, requests and
// comments to: acnick@mail.lanck.net
/////////////////////////////////////////////////////////////////////////////

#ifndef __WINDOWLISTDIALOG_H__
#define __WINDOWLISTDIALOG_H__

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Resource.h"

/////////////////////////////////////////////////////////////////////////////
// CWindowListDialog dialog

class CWindowListDialog : public CDialog
{
// Construction
public:
    CWindowListDialog( CWnd* pMDIClientWnd, CWnd* pParent = 0 );

// Dialog Data
    //{{AFX_DATA(CWindowListDialog)
    enum { IDD = IDD_WINDOW_LIST };
    CButton m_bnMinimize;
    CButton m_bnTileVert;
    CButton m_bnTileHorz;
    CButton m_bnCascade;
    CButton m_bnCloseWin;
    CButton m_bnActivate;
    CListCtrl   m_lstWindows;
    //}}AFX_DATA

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

// Implementation
protected:
    void ReloadWindowList();
    void Activate( int nItem );
    void ArrangeWindows( UINT nMsg, WPARAM wParam = 0, LPARAM lParam = 0 );

// Implementation data
protected:
    CWnd*       m_pMDIClientWnd;
    CImageList  m_imageList;

// Generated message map functions
protected:
    //{{AFX_MSG(CWindowListDialog)
    virtual BOOL OnInitDialog();
    afx_msg void OnActivate();
    afx_msg void OnCloseWin();
    afx_msg void OnCascade();
    afx_msg void OnTileHorz();
    afx_msg void OnTileVert();
    afx_msg void OnMinimize();
    afx_msg void OnDblClkWindows(NMHDR* pNMHDR, LRESULT* pResult);
    //}}AFX_MSG
    afx_msg void OnKickIdle();
    DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////
#endif // !__WINDOWLISTDIALOG_H__

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)
Russian Federation Russian Federation
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions