?? dlgenhcolor.cpp
字號(hào):
// DlgEnhColor.cpp : implementation file
//
#include "stdafx.h"
#include "ImageProcessing.h"
#include "DlgEnhColor.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgEnhColor dialog
CDlgEnhColor::CDlgEnhColor(CWnd* pParent /*=NULL*/)
: CDialog(CDlgEnhColor::IDD, pParent)
{
//{{AFX_DATA_INIT(CDlgEnhColor)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CDlgEnhColor::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgEnhColor)
DDX_Control(pDX, IDC_LIST_ENH_COLOR, m_lstColor);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDlgEnhColor, CDialog)
//{{AFX_MSG_MAP(CDlgEnhColor)
ON_LBN_DBLCLK(IDC_LIST_ENH_COLOR, OnDblclkListEnhColor)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgEnhColor message handlers
BOOL CDlgEnhColor::OnInitDialog()
{
// 循環(huán)變量
int i;
// 調(diào)用默認(rèn)OnInitDialog函數(shù)
CDialog::OnInitDialog();
// 添加偽彩色編碼
for (i = 0; i < m_nColorCount; i++)
{
m_lstColor.AddString(m_lpColorName + i * m_nNameLen);
}
// 選中初始編碼表
m_lstColor.SetCurSel(m_nColor);
// 返回TRUE
return TRUE;
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDlgEnhColor::OnDblclkListEnhColor()
{
// 雙擊事件,直接調(diào)用OnOK()成員函數(shù)
OnOK();
}
void CDlgEnhColor::OnOK()
{
// 用戶單擊確定按鈕
m_nColor = m_lstColor.GetCurSel();
// 調(diào)用默認(rèn)的OnOK()函數(shù)
CDialog::OnOK();
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -