컨트롤윈도우(1)
(제공받은 코드)
----view.cpp
void CStaticDemoView::OnLButtonDown(UINT nFlags, CPoint point)
{
	// TODO: 여기에 메시지 처리기 코드를 추가 및/또는 기본값을 호출합니다.
	//ID를 이용하여 윈도우 객체 포인터 얻는 방법
	//CWnd* pWnd = GetDlgItem(1235); // ID 전달
	//pWnd->SetWindowText(_T("왼쪽 마우스버튼 클릭"));
	// ID를 이용하여 윈도우 객체 메세지 바꾸는 방법
	SetDlgItemText(1235, _T("왼쪽 마우스버튼 클릭"));
	CView::OnLButtonDown(nFlags, point);
}

Edit Demo로 바꿔서 다시 작성하기!!!!
// 특성입니다.
public:
	CStaticDemoDoc* GetDocument() const;
	CWnd m_wndEdit1; //Cwnd : 모든 클래스의 부모 클래스
	//CStatic m_wndStatic2; // CWnd의 자식클래스
	CEdit m_wndEdit2; // CWnd의 자식클래스int CStaticDemoView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CView::OnCreate(lpCreateStruct) == -1)
		return -1;
	// TODO:  여기에 특수화된 작성 코드를 추가합니다.
	m_wndEdit1.Create(_T("Edit"), _T("안녕~~~~"), 
		WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER | ES_AUTOHSCROLL, 
		CRect(20, 20, 220, 36), this, 1234);
	m_wndEdit2.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER | ES_AUTOHSCROLL,
		CRect(20, 50, 220, 76), this, 1236);
	m_wndEdit2.SetWindowText(_T("메롱~~~~"));
	CString strText;
	m_wndEdit2.GetWindowText(strText); // '메롱~~~~'문자 가져오기
	return 0;
}메세지 박스 띄우기
void CStaticDemoView::OnLButtonDown(UINT nFlags, CPoint point)
{
	CString strText;
	m_wndEdit2.GetWindowText(strText);
	AfxMessageBox(strText);
	MessageBox(strText, _T("123564")); // 타이틀 바꿀수 있음
	CView::OnLButtonDown(nFlags, point);
	MessageBox(strText, NULL, MB_ICONERROR|MB_YESNO); // 특성 바꾸기
	MessageBox(strText, NULL, MB_ICONERROR | MB_YESNOCANCEL); // 특성 바꾸기
}



Author And Source
이 문제에 관하여(컨트롤윈도우(1)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@hj-yu-code/컨트롤윈도우1저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)