⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 currency_cedlg.cpp

📁 Windows CE的注册表编辑器和数据库操作源码
💻 CPP
字号:
// Currency_CEDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Currency_CE.h"
#include "Currency_CEDlg.h"
#include "PorpSheet.h"

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

/////////////////////////////////////////////////////////////////////////////
// CCurrency_CEDlg dialog

CCurrency_CEDlg::CCurrency_CEDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CCurrency_CEDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CCurrency_CEDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CCurrency_CEDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCurrency_CEDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CCurrency_CEDlg, CDialog)
	//{{AFX_MSG_MAP(CCurrency_CEDlg)
	ON_WM_DESTROY()
	ON_WM_CLOSE()
	ON_WM_CANCELMODE()
	ON_WM_CHAR()
	ON_WM_KEYDOWN()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCurrency_CEDlg message handlers

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

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	CenterWindow(GetDesktopWindow());	// center to the hpc screen

	// TODO: Add extra initialization here
	CPorpSheet propSheet(_T("货币换算器"),this,0);
	int result=propSheet.DoModal();
	 //propSheet.Create(this);
	return TRUE;  // return TRUE  unless you set the focus to a control
}


void CCurrency_CEDlg::OnDestroy() 
{
	CDialog::OnDestroy();
	
	// TODO: Add your message handler code here
	
}

void CCurrency_CEDlg::OnClose() 
{
	// TODO: Add your message handler code here and/or call default
	
	CDialog::OnClose();
}

void CCurrency_CEDlg::OnCancelMode() 
{
	CDialog::OnCancelMode();
	
	// TODO: Add your message handler code here
	
}

BOOL CCurrency_CEDlg::DestroyWindow() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CDialog::DestroyWindow();
}

LRESULT CCurrency_CEDlg::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
{
	// TODO: Add your specialized code here and/or call the base class
	int i=0;
	switch(message)
	{
	case WM_KEYDOWN:
		i=1;
	case WM_LBUTTONDOWN:
		i=2;
	default:
		i=3;
	}
	
	return CDialog::DefWindowProc(message, wParam, lParam);
}

BOOL CCurrency_CEDlg::OnCommand(WPARAM wParam, LPARAM lParam) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CDialog::OnCommand(wParam, lParam);
}

LRESULT CCurrency_CEDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
{
	// TODO: Add your specialized code here and/or call the base class
	//if(message==2&&wParam==0&&lParam==0)
	//	return 0L;
	//else
int i=0;
	switch(message)
	{
	case WM_KEYDOWN:
		i=1;
	case WM_LBUTTONDOWN:
		i=2;
	default:
		i=3;
	}
	
	return CDialog::WindowProc(message, wParam, lParam);
}

void CCurrency_CEDlg::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	// TODO: Add your message handler code here and/or call default
	
	CDialog::OnChar(nChar, nRepCnt, nFlags);
}

void CCurrency_CEDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	// TODO: Add your message handler code here and/or call default
	
	CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}

int CCurrency_CEDlg::DoModal() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CDialog::DoModal();
}

BOOL CCurrency_CEDlg::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo) 
{
if(nID!=1)
		return CDialog::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
	else
		return 1;	
//	return CDialog::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}

BOOL CCurrency_CEDlg::OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CDialog::OnChildNotify(message, wParam, lParam, pLResult);
}

void CCurrency_CEDlg::OnFinalRelease() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	CDialog::OnFinalRelease();
}

BOOL CCurrency_CEDlg::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CDialog::OnNotify(wParam, lParam, pResult);
}

void CCurrency_CEDlg::PostNcDestroy() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	CDialog::PostNcDestroy();
}

void CCurrency_CEDlg::OnOK( )
{
int i=0;

}

void CCurrency_CEDlg::OnCancel( )
{
int i=0;

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -