|
/*
DESCRIPTION:
CIconDialog - Icon Selection Dialog Class
NOTES:
Copyright(C) Armen Hakobyan, 2002
mailto:armenh@cit.am
Undocumented SelectIcon APIs by Henk Devos
Article _T("How to display the Pick Icon Dialog") :)
http://www.codeproject.com/shell/selecticon.asp
VERSION HISTORY:
09 Mar 2002 - First release
*/
#pragma once
BOOL
SelectIconW (
HWND hWndParent,
LPWSTR lpszFilename,
DWORD dwBufferSize,
DWORD* pdwIndex
);
BOOL
SelectIconA (
HWND hWndParent,
LPSTR lpszFilename,
DWORD dwBufferSize,
DWORD* pdwIndex
);
#ifdef UNICODE
#define SelectIcon SelectIconW
#else
#define SelectIcon SelectIconA
#endif
// CIconDialog
#include "afxdlgs.h"
class CIconDialog : public CCommonDialog
{
DECLARE_DYNAMIC(CIconDialog)
public:
CIconDialog(LPCTSTR lpszIconFile = NULL,
DWORD dwIconIndex = NULL,
CWnd* pParentWnd = NULL);
virtual ~CIconDialog();
public:
virtual int DoModal(void);
AFX_INLINE HICON GetIconHandle(void) const;
AFX_INLINE UINT_PTR GetIconCount(void) const;
AFX_INLINE DWORD GetIconIndex(void) const;
AFX_INLINE LPCTSTR GetIconFile(void) const;
protected:
TCHAR m_szIconFile[_MAX_FNAME];
DWORD m_dwIconIndex;
HICON m_hIconHandle;
UINT_PTR m_uIconCount;
protected:
DECLARE_MESSAGE_MAP()
};
AFX_INLINE LPCTSTR CIconDialog::GetIconFile(void) const
{ return m_szIconFile; }
AFX_INLINE DWORD CIconDialog::GetIconIndex(void) const
{ return m_dwIconIndex; }
AFX_INLINE UINT_PTR CIconDialog::GetIconCount(void) const
{ return m_uIconCount; }
AFX_INLINE HICON CIconDialog::GetIconHandle(void) const
{ return ::DuplicateIcon(AfxGetInstanceHandle(), m_hIconHandle); }
|
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.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.