Click here to Skip to main content
15,886,362 members
Articles / Desktop Programming / WTL

Retrieving shell icons

Rate me:
Please Sign up or sign in to vote.
4.90/5 (13 votes)
19 Jun 2002CPOL3 min read 244.9K   5.9K   69  
Get shell icons, even if they're customized
// ShellIconDemoDlg.h : header file
//

#pragma once

#include "afxwin.h"
#include "afxcmn.h"

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

// Dialog Data
	enum { IDD = IDD_SHELLICONDEMO_DIALOG };

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

// Implementation
protected:
	HICON m_hIcon;
	CImageList	m_ImageListSmall;
	CImageList	m_ImageListLarge;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	CListCtrl m_ListCtrlSmall;
	CListCtrl m_ListCtrlLarge;
	afx_msg void OnLvnItemchangedListSmall(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnLvnItemchangedListLarge(NMHDR *pNMHDR, LRESULT *pResult);
};

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

Comments and Discussions