创建属于自己的CComboBox

     由于项目需要,想创建带图标,且支持水平和垂直滚动条的ComboBox。

     首先想到的是使用Extent ComboBox,但令人失望的是,Extent ComboBox不支持水平滚动条,只支持几种styles,见MSDN说明:

1、styles

CComboBoxEx supports the styles CBS_SIMPLE, CBS_DROPDOWN, CBS_DROPDOWNLIST, and WS_CHILD. All other styles passed when you create the window are ignored by the control. After the window is created, you can provide other combo box styles by calling the CComboBoxEx member function SetExtendedStyle . With these styles, you can:

  • Set string searches in the list to be case-sensitive.

  • Create a combo box control that uses the slash ('/'), backslash ('\'), and period ('.') characters as word delimiters. This allow users to jump from word to word, using the keyboard shortcut CTRL+ ARROW.

  • Set the combo box control to either display or not display an image. If no image is displayed, the combo box can remove the text indent that accommodates an image.

  • Create a narrow combo box control, including sizing it so it clips the wider combo box it contains.

These style flags are described further in Using CComboBoxEx .

2、ComboBoxEx Control Extened Styles

CBES_EX_CASESENSITIVE 
BSTR searches in the list will be case sensitive. This includes searches as a result of text being typed in the edit box and the CB_FINDSTRINGEXACT message.

 

CBES_EX_NOEDITIMAGE 
The edit box and the dropdown list will not display item images.

CBES_EX_NOEDITIMAGEINDENT 
The edit box and the dropdown list will not display item images.

CBES_EX_NOSIZELIMIT 
Allows the ComboBoxEx control to be vertically sized smaller than its contained combo box control. If the ComboBoxEx is sized smaller than the combo box, the combo box will be clipped.

CBES_EX_PATHWORDBREAKPROC 
Microsoft Windows NT only. The edit box will use the slash (/), backslash (\), and period (.) characters as word delimiters. This makes keyboard shortcuts for word-by-word cursor movement () effective in path names and URLs.

CBES_EX_TEXTENDELLIPSIS 
Windows Vista and later. Causes items in the drop-down list and the edit box (when the edit box is read only) to be truncated with an ellipsis ("...") rather than just clipped by the edge of the control. This is useful when the control needs to be set to a fixed width, yet the entries in the list may be long.

 

     折腾了很久,那个郁闷啊!还不如自己重新写个ComboBox快捷。

    

// IconComboBox.h

#ifndef __ICONCOMBOBOX_H__
#define __ICONCOMBOBOX_H__

typedef struct _IconComboItemData
{
	int   m_nIndex;  // zero base
	HICON m_hIcon;   // icon handler
	UINT  m_nIconID; // icon identify
	LPCTSTR m_pText; // text of combobox
}IconComboItemData;

class CIconComboBox : public CComboBox
{
public:
	CIconComboBox();

public:
	int  AddItem( IconComboItemData* pItem );
	IconComboItemData* GetCurSelItem() const;
	int  SetCurSelItem( int nIndex );
	int DeleteItem(int nIndex);

	int  AddString(LPCTSTR lpszString);
	int  InsertString(int nIndex, LPCTSTR lpszString);
	int  DeleteString(int nIndex);


protected:
	//{{AFX_VIRTUAL(CIconComboBox)
	virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	virtual void PreSubclassWindow();
	virtual void DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct);
	//}}AFX_VIRTUAL

	//{{AFX_MSG(CIconComboBox)
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
	DECLARE_DYNAMIC(CIconComboBox)

private:
	// calculate horizontal size of icon combobox
	int CalcHorizontalSize( LPCTSTR text );

private:
	UINT m_nHorizontalExtent;
};

//DDX Support


#endif //__ICONCOMBOBOX_H__
 
// IconComboBox.cpp

#include "stdafx.h"
#include "IconComboBox.h"
#include "Resource.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

#define COMBOBOX_ICON_WIDTH    16   // icon width of combobox
#define COMBOBOX_ICON_HEIGHT   16   // icon height of combobox
#define COMBOBOX_ITEM_GAP      2    // gap between icon and text at combobox


IMPLEMENT_DYNAMIC(CIconComboBox, CComboBox)

BEGIN_MESSAGE_MAP(CIconComboBox, CComboBox)
	//{{AFX_MSG_MAP(CIconComboBox)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()



CIconComboBox::CIconComboBox()
	:	m_nHorizontalExtent(0)
{
}

void CIconComboBox::PreSubclassWindow() 
{
	//Let the parent do its thing
	CComboBox::PreSubclassWindow();

	//combo box must manage the strings
	ASSERT(GetWindowLong(m_hWnd, GWL_STYLE) & CBS_HASSTRINGS);

	//combo box must be owner draw variable
	ASSERT(GetWindowLong(m_hWnd, GWL_STYLE) & CBS_OWNERDRAWVARIABLE);

	//Set the Height of the combo box to just contain one small icon
	::SendMessage(m_hWnd, CB_SETITEMHEIGHT, (WPARAM)-1, 18L);
}

int CIconComboBox::AddItem( IconComboItemData* pItem )
{
	ASSERT( pItem != NULL );

	//Load up the icon
	if( pItem->m_hIcon == NULL )
	{
		HICON hIcon = (HICON) LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(pItem->m_nIconID), IMAGE_ICON, COMBOBOX_ICON_WIDTH, COMBOBOX_ICON_HEIGHT, 0);
		if (hIcon == NULL) return CB_ERR;
		pItem->m_hIcon = hIcon;
	}

	//Add a string item 
	pItem->m_nIndex = CComboBox::AddString( pItem->m_pText );

	//Set data for combobox item just added
	SetItemData( pItem->m_nIndex, (DWORD) pItem );

	//Get horizontal extent size
	CalcHorizontalSize( pItem->m_pText );

	//Return the index at which it was added
	return pItem->m_nIndex;
}

int CIconComboBox::DeleteItem(int nIndex)
{
	//just let the parent do its thing
	return CComboBox::DeleteString(nIndex);
}

IconComboItemData* CIconComboBox::GetCurSelItem() const
{
	int nSel = GetCurSel();

	if( nSel == CB_ERR ) return 0;

	IconComboItemData* pData = (IconComboItemData*) GetItemData(nSel);

	return pData;
}

int CIconComboBox::SetCurSelItem( int nIndex )
{
	//iterate through all the CB items and set the one which 
	//has the corresponding item data
	return CComboBox::SetCurSel( nIndex );
}

void CIconComboBox::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct) 
{
	lpMeasureItemStruct->itemHeight = 18;
}

void CIconComboBox::DrawItem(LPDRAWITEMSTRUCT lpDIS) 
{
	ASSERT(lpDIS->CtlType == ODT_COMBOBOX);	

	//Create A CDC from the SDK struct passed in
	CDC* pDC = CDC::FromHandle(lpDIS->hDC);

	//If the item is selected, draw the selection background
	if ((lpDIS->itemState & ODS_SELECTED) &&                         
		(lpDIS->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)))
	{
		// item has been selected - draw selection rectangle
		COLORREF crHilite = GetSysColor(COLOR_HIGHLIGHT);
		CBrush br(crHilite);
		pDC->FillRect(&lpDIS->rcItem, &br);
	}

	//If the item is not selected, draw a white background
	if (!(lpDIS->itemState & ODS_SELECTED) &&
		(lpDIS->itemAction & ODA_SELECT))
	{
		// Item has been de-selected -- remove selection rectangle
		CBrush br(RGB(255, 255, 255));
		pDC->FillRect(&lpDIS->rcItem, &br);
	}

	//Draw the icon and text
	IconComboItemData* pData = (IconComboItemData*) lpDIS->itemData;
	ASSERT(pData != NULL);
	if ( pData && lpDIS->itemData != 0xFFFFFFFF )
	{
		LPCTSTR text = pData->m_pText;

		// Draw icon
		DrawIconEx(pDC->GetSafeHdc(), lpDIS->rcItem.left+1, lpDIS->rcItem.top+1, pData->m_hIcon, COMBOBOX_ICON_WIDTH, COMBOBOX_ICON_HEIGHT, 0, NULL, DI_NORMAL);

		// Draw text
		if( text )
		{
			CRect rcText( lpDIS->rcItem );
			rcText.DeflateRect( COMBOBOX_ICON_WIDTH + COMBOBOX_ITEM_GAP, 0, 0, 0 );
			pDC->DrawText( text, rcText, DT_SINGLELINE |DT_VCENTER );
		}

		// Draw horizontal extent
		this->SetHorizontalExtent( m_nHorizontalExtent );
	}
}

void CIconComboBox::DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct) 
{
	//Free up any existing HICON's used for drawing
	IconComboItemData* pData = (IconComboItemData*) GetItemData(lpDeleteItemStruct->itemID);
	ASSERT(pData);
	DestroyIcon(pData->m_hIcon);

	//Free up our internal structure which is stored in the item data
	delete pData;

	//Let the parent do its thing
	CComboBox::DeleteItem(lpDeleteItemStruct);
}

int CIconComboBox::AddString(LPCTSTR lpszString)
{
	ASSERT(FALSE); //Use AddIcon not AddString
	return CB_ERR;
}

int CIconComboBox::InsertString(int nIndex, LPCTSTR lpszString)
{
	ASSERT(FALSE); //Use InsertIcon not InsertString
	return CB_ERR;
}

int CIconComboBox::DeleteString(int nIndex)
{
	ASSERT(FALSE); //Use DeleteIcon not DeleteString
	return CB_ERR;
}

int CIconComboBox::CalcHorizontalSize( LPCTSTR text )
{
	CDC* pDC = this->GetDC();

	TEXTMETRIC textMetric;
	pDC->GetTextMetrics(&textMetric);

	CSize textSize = pDC->GetTextExtent( text );

	UINT horizontalSize = textSize.cx + textMetric.tmAveCharWidth;

	if( horizontalSize > m_nHorizontalExtent )
	{
		m_nHorizontalExtent = horizontalSize;
	}

	return m_nHorizontalExtent;
}
// MySimpleMfcAppDlg.h : 头文件
//

#pragma once
#include "afxwin.h"
#include "afxcmn.h"
#include "IconComboBox.h"


// CMySimpleMfcAppDlg 对话框
class CMySimpleMfcAppDlg : public CDialog
{
// 构造
public:
	CMySimpleMfcAppDlg(CWnd* pParent = NULL);	// 标准构造函数

// 对话框数据
	enum { IDD = IDD_MYSIMPLEMFCAPP_DIALOG };

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


// 实现
protected:
	HICON m_hIcon;

	// 生成的消息映射函数
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedOk();
	CIconComboBox m_cIconComboBox;
};
// MySimpleMfcAppDlg.cpp : 实现文件
//

#include "stdafx.h"
#include "MySimpleMfcApp.h"
#include "MySimpleMfcAppDlg.h"
#include "Resource.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CMySimpleMfcAppDlg 对话框




CMySimpleMfcAppDlg::CMySimpleMfcAppDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CMySimpleMfcAppDlg::IDD, pParent)
{
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CMySimpleMfcAppDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_COMBO1, m_cIconComboBox);
}

BEGIN_MESSAGE_MAP(CMySimpleMfcAppDlg, CDialog)
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	//}}AFX_MSG_MAP
	ON_BN_CLICKED(IDOK, &CMySimpleMfcAppDlg::OnBnClickedOk)
END_MESSAGE_MAP()


// CMySimpleMfcAppDlg 消息处理程序

BOOL CMySimpleMfcAppDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// 设置此对话框的图标。当应用程序主窗口不是对话框时,框架将自动
	//  执行此操作
	SetIcon(m_hIcon, TRUE);			// 设置大图标
	SetIcon(m_hIcon, FALSE);		// 设置小图标

	ShowWindow(SW_MAXIMIZE);

	// TODO: 在此添加额外的初始化代码
	IconComboItemData* pData = new IconComboItemData;
	pData->m_hIcon = NULL;
	pData->m_nIconID = IDI_ICON1;
	pData->m_nIndex = 0;
	pData->m_pText = _T("11111111111111111111111111111111111111111111111111111111111111");
	m_cIconComboBox.AddItem( pData );

	pData = new IconComboItemData;
	pData->m_hIcon = NULL;
	pData->m_nIconID = IDI_ICON2;
	pData->m_nIndex = 1;
	pData->m_pText = _T("22222222222222222222222222222222222222222222222222222222222222");
	m_cIconComboBox.AddItem( pData );

	pData = new IconComboItemData;
	pData->m_hIcon = NULL;
	pData->m_nIconID = IDI_ICON3;
	pData->m_nIndex = 2;
	pData->m_pText = _T("33333333333333333333333333333333333333333333333333333333333333");
	m_cIconComboBox.AddItem( pData );

	pData = new IconComboItemData;
	pData->m_hIcon = NULL;
	pData->m_nIconID = IDI_ICON4;
	pData->m_nIndex = 3;
	pData->m_pText = _T("444444444444444444444444444444444444444444444444444444444444444");
	m_cIconComboBox.AddItem( pData );

	pData = new IconComboItemData;
	pData->m_hIcon = NULL;
	pData->m_nIconID = IDI_ICON5;
	pData->m_nIndex = 4;
	pData->m_pText = _T("555555555555555555555555555555555555555555555555555555555555555");
	m_cIconComboBox.AddItem( pData );

	pData = new IconComboItemData;
	pData->m_hIcon = NULL;
	pData->m_nIconID = IDI_ICON6;
	pData->m_nIndex = 5;
	pData->m_pText = _T("666666666666666666666666666666666666666666666666666666666666666");
	m_cIconComboBox.AddItem( pData );

	pData = new IconComboItemData;
	pData->m_hIcon = NULL;
	pData->m_nIconID = IDI_ICON7;
	pData->m_nIndex = 6;
	pData->m_pText = _T("777777777777777777777777777777777777777777777777777777777777777");
	m_cIconComboBox.AddItem( pData );

	pData = new IconComboItemData;
	pData->m_hIcon = NULL;
	pData->m_nIconID = IDI_ICON8;
	pData->m_nIndex = 7;
	pData->m_pText = _T("8888888888888888888888888888888888888888888888888888888888888888");
	m_cIconComboBox.AddItem( pData );

	UpdateData(FALSE);

	return TRUE;  // 除非将焦点设置到控件,否则返回 TRUE
}

// 如果向对话框添加最小化按钮,则需要下面的代码
//  来绘制该图标。对于使用文档/视图模型的 MFC 应用程序,
//  这将由框架自动完成。

void CMySimpleMfcAppDlg::OnPaint()
{
	if (IsIconic())
	{
		CPaintDC dc(this); // 用于绘制的设备上下文

		SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);

		// 使图标在工作区矩形中居中
		int cxIcon = GetSystemMetrics(SM_CXICON);
		int cyIcon = GetSystemMetrics(SM_CYICON);
		CRect rect;
		GetClientRect(&rect);
		int x = (rect.Width() - cxIcon + 1) / 2;
		int y = (rect.Height() - cyIcon + 1) / 2;

		// 绘制图标
		dc.DrawIcon(x, y, m_hIcon);
	}
	else
	{
		CDialog::OnPaint();
	}
}

//当用户拖动最小化窗口时系统调用此函数取得光标
//显示。
HCURSOR CMySimpleMfcAppDlg::OnQueryDragIcon()
{
	return static_cast<HCURSOR>(m_hIcon);
}


void CMySimpleMfcAppDlg::OnBnClickedOk()
{

}

 
// MySimpleMfcApp.h : PROJECT_NAME 应用程序的主头文件
//

#pragma once

#ifndef __AFXWIN_H__
	#error "在包含此文件之前包含“stdafx.h”以生成 PCH 文件"
#endif

#include "resource.h"		// 主符号


// CMySimpleMfcAppApp:
// 有关此类的实现,请参阅 MySimpleMfcApp.cpp
//

class CMySimpleMfcAppApp : public CWinApp
{
public:
	CMySimpleMfcAppApp();

// 重写
	public:
	virtual BOOL InitInstance();

// 实现

	DECLARE_MESSAGE_MAP()
};

extern CMySimpleMfcAppApp theApp;

 
 
// MySimpleMfcApp.cpp : 定义应用程序的类行为。
//

#include "stdafx.h"
#include "MySimpleMfcApp.h"
#include "MySimpleMfcAppDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

// CMySimpleMfcAppApp

BEGIN_MESSAGE_MAP(CMySimpleMfcAppApp, CWinApp)
	ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()


// CMySimpleMfcAppApp 构造

CMySimpleMfcAppApp::CMySimpleMfcAppApp()
{
	// TODO: 在此处添加构造代码,
	// 将所有重要的初始化放置在 InitInstance 中
}


// 唯一的一个 CMySimpleMfcAppApp 对象

CMySimpleMfcAppApp theApp;


// CMySimpleMfcAppApp 初始化

BOOL CMySimpleMfcAppApp::InitInstance()
{
	// 如果一个运行在 Windows XP 上的应用程序清单指定要
	// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
	//则需要 InitCommonControlsEx()。否则,将无法创建窗口。
	INITCOMMONCONTROLSEX InitCtrls;
	InitCtrls.dwSize = sizeof(InitCtrls);
	// 将它设置为包括所有要在应用程序中使用的
	// 公共控件类。
	InitCtrls.dwICC = ICC_WIN95_CLASSES;
	InitCommonControlsEx(&InitCtrls);

	CWinApp::InitInstance();

	AfxEnableControlContainer();

	// 标准初始化
	// 如果未使用这些功能并希望减小
	// 最终可执行文件的大小,则应移除下列
	// 不需要的特定初始化例程
	// 更改用于存储设置的注册表项
	// TODO: 应适当修改该字符串,
	// 例如修改为公司或组织名
	SetRegistryKey(_T("应用程序向导生成的本地应用程序"));

	CMySimpleMfcAppDlg dlg;
	m_pMainWnd = &dlg;
	INT_PTR nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
		// TODO: 在此放置处理何时用
		//  “确定”来关闭对话框的代码
	}
	else if (nResponse == IDCANCEL)
	{
		// TODO: 在此放置处理何时用
		//  “取消”来关闭对话框的代码
	}

	// 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序,
	//  而不是启动应用程序的消息泵。
	return FALSE;
}
// Resource.h

//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by MySimpleMfcApp.rc
//
#define IDD_MYSIMPLEMFCAPP_DIALOG       102
#define IDR_MAINFRAME                   128
#define IDI_ICON1                       130
#define IDI_ICON2                       131
#define IDI_ICON3                       132
#define IDI_ICON4                       133
#define IDI_ICON5                       134
#define IDI_ICON6                       135
#define IDI_ICON7                       136
#define IDI_ICON8                       137
#define IDC_COMBO1                      1003

// Next default values for new objects
// 
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE        129
#define _APS_NEXT_COMMAND_VALUE         32771
#define _APS_NEXT_CONTROL_VALUE         1004
#define _APS_NEXT_SYMED_VALUE           101
#endif
#endif
// MySimpleMfcApp.rc
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/
//
// Generated from the TEXTINCLUDE 2 resource.
//
#ifndef APSTUDIO_INVOKED
#include "targetver.h"
#endif
#include "afxres.h"

/
#undef APSTUDIO_READONLY_SYMBOLS

/
// Chinese (P.R.C.) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
#ifdef _WIN32
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
#pragma code_page(936)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/
//
// TEXTINCLUDE
//

1 TEXTINCLUDE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE 
BEGIN
    "#ifndef APSTUDIO_INVOKED\r\n"
    "#include ""targetver.h""\r\n"
    "#endif\r\n"
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE 
BEGIN
    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
    "#define _AFX_NO_OLE_RESOURCES\r\n"
    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
    "\r\n"
    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)\r\n"
    "LANGUAGE 4, 2\r\n"
    "#pragma code_page(936)\r\n"
    "#include ""res\\MySimpleMfcApp.rc2""  // 非 Microsoft Visual C++ 编辑的资源\r\n"
    "#include ""l.CHS\\afxres.rc""      // 标准组件\r\n"
    "#endif\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


/
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME           ICON                    "res\\MySimpleMfcApp.ico"
IDI_ICON1               ICON                    "RES\\small1.ico"
IDI_ICON2               ICON                    "RES\\small2.ico"
IDI_ICON3               ICON                    "RES\\small3.ico"
IDI_ICON4               ICON                    "RES\\small4.ico"
IDI_ICON5               ICON                    "RES\\small5.ico"
IDI_ICON6               ICON                    "RES\\small6.ico"
IDI_ICON7               ICON                    "RES\\small7.ico"
IDI_ICON8               ICON                    "RES\\small8.ico"
/
//
// Dialog
//

IDD_MYSIMPLEMFCAPP_DIALOG DIALOGEX 0, 0, 320, 200
STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_HSCROLL | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "MySimpleMfcApp"
FONT 9, "MS Shell Dlg", 0, 0, 0x1
BEGIN
    DEFPUSHBUTTON   "确定",IDOK,209,170,50,14
    PUSHBUTTON      "取消",IDCANCEL,263,170,50,14
    COMBOBOX        IDC_COMBO1,65,46,140,62,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_HSCROLL | CBS_OWNERDRAWVARIABLE | CBS_HASSTRINGS
END


/
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "080403a8"
        BEGIN
            VALUE "CompanyName", "TODO: <公司名>"
            VALUE "FileDescription", "TODO: <文件说明>"
            VALUE "FileVersion", "1.0.0.1"
            VALUE "InternalName", "MySimpleMfcApp.exe"
            VALUE "LegalCopyright", "TODO: (C) <公司名>。保留所有权利。"
            VALUE "OriginalFilename", "MySimpleMfcApp.exe"
            VALUE "ProductName", "TODO: <产品名>"
            VALUE "ProductVersion", "1.0.0.1"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x804, 936
    END
END


/
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO 
BEGIN
    IDD_MYSIMPLEMFCAPP_DIALOG, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 313
        TOPMARGIN, 7
        BOTTOMMARGIN, 184
    END
END
#endif    // APSTUDIO_INVOKED

#endif    // Chinese (P.R.C.) resources
/



#ifndef APSTUDIO_INVOKED
/
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
LANGUAGE 4, 2
#pragma code_page(936)
#include "res\MySimpleMfcApp.rc2"  // 非 Microsoft Visual C++ 编辑的资源
#include "l.CHS\afxres.rc"      // 标准组件
#endif

/
#endif    // not APSTUDIO_INVOKED






  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值