목차
1. 다이얼로그 박스의 구현
2. 다이얼로그를 갖는 문자열 출력 프로그램
2. 다이얼로그를 갖는 문자열 출력 프로그램
본문내용
ntInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CContView diagnostics
#ifdef _DEBUG
void CContView::AssertValid() const
{
CView::AssertValid();
}
void CContView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CContDoc* CContView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CContDoc)));
return (CContDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CContView message handlers
void CContView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
GetDocument()->SetLocation(point);
CView::OnLButtonDown(nFlags, point);
}
void CContView::OnControl()
{
CContDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: Add your command handler code here
CClientDC dc(this);
CPoint pt = pDoc->GetLocation();
dc.TextOut(pt.x, pt.y, pDoc->GetString() );
}
CContDlg.h
f !defined(AFX_CONTDLG_H__3D49ADE4_57E9_4555_90B4_76E7E5BB2885__INCLUdfine AFX_CONTDLG_H__3D49ADE4_57E9_4555_90B4_76E7E5BB2885__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ContDlg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CContDlg dialog
class CContDlg : public CDialog
{
// Construction
public:
CContDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CContDlg)
enum { IDD = IDD_CONTDLG };
CString m_nText;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CContDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); //DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CContDlg)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif //
!defined(AFX_CONTDLG_H__3D49ADE4_57E9_4555_90B4_76E7E5BB2885__INCLUDED_)
CContDlg.cpp
// ContDlg.cpp : implementation file
#include "stdafx.h"
#include "Cont.h"
#include "ContDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CContDlg dialog
CContDlg::CContDlg(CWnd* pParent /*=NULL*/)
: CDialog(CContDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CContDlg)
m_nText = _T("");
//}}AFX_DATA_INIT
}
void CContDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CContDlg)
DDX_Text(pDX, IDC_EDIT, m_nText);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CContDlg, CDialog)
//{{AFX_MSG_MAP(CContDlg)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CContDlg message handlers
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CContView diagnostics
#ifdef _DEBUG
void CContView::AssertValid() const
{
CView::AssertValid();
}
void CContView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CContDoc* CContView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CContDoc)));
return (CContDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CContView message handlers
void CContView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
GetDocument()->SetLocation(point);
CView::OnLButtonDown(nFlags, point);
}
void CContView::OnControl()
{
CContDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: Add your command handler code here
CClientDC dc(this);
CPoint pt = pDoc->GetLocation();
dc.TextOut(pt.x, pt.y, pDoc->GetString() );
}
CContDlg.h
f !defined(AFX_CONTDLG_H__3D49ADE4_57E9_4555_90B4_76E7E5BB2885__INCLUdfine AFX_CONTDLG_H__3D49ADE4_57E9_4555_90B4_76E7E5BB2885__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ContDlg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CContDlg dialog
class CContDlg : public CDialog
{
// Construction
public:
CContDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CContDlg)
enum { IDD = IDD_CONTDLG };
CString m_nText;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CContDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); //DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CContDlg)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif //
!defined(AFX_CONTDLG_H__3D49ADE4_57E9_4555_90B4_76E7E5BB2885__INCLUDED_)
CContDlg.cpp
// ContDlg.cpp : implementation file
#include "stdafx.h"
#include "Cont.h"
#include "ContDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CContDlg dialog
CContDlg::CContDlg(CWnd* pParent /*=NULL*/)
: CDialog(CContDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CContDlg)
m_nText = _T("");
//}}AFX_DATA_INIT
}
void CContDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CContDlg)
DDX_Text(pDX, IDC_EDIT, m_nText);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CContDlg, CDialog)
//{{AFX_MSG_MAP(CContDlg)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CContDlg message handlers
추천자료
- [전자공학] 위성통신을 이용한 PCS (정보통신 이동통신
- [전자공학실험] 비동기식카운터-결과레포트
- [전자공학실험] 동기식 카운터 결과레포트
- [전자공학실험] 8051실험 - 타이머인터럽트를 사용한 7-SEG 제어
- [전자공학실험] 8051실험-타이머&외부 인터럽트를 이용한 시계설계
- [전자공학실험] 8051 LED 제어 실험 결과레포트
- [전자공학실험] 8051 LCD 제어-LCD로 시계구현
- [전자공학실험] 부귀환과 연산증폭기(OPAMP)
- [전자공학실험] 부울대수의 공리및 정리 결과레포트
- [전자공학실험] 회로의간소화및 EX-OR회로
- [전자공학과] 마이크로컨트롤 실습결과 보고서 - led 를 순차적으로 on/off 시키는 프로그램...
- [전자공학] 3D에 대해서
- [전기전자공학] 직렬과 병렬의 관계
- [전자공학실험1] (결과) OP 앰프 기본원리