Fundamental Notes/MFC 21

MFC : CString 객체 생성과 초기화

CString 객체 생성과 초기화 // 2009. 9. 15 WJY //MFC : MakeLower() + MakeReverse() + CStringa // Console.cpp : Defines the entry point for the console application. //콘솔이기때문에 메시지 구동구조가 없다. #include "stdafx.h" #include "Console.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // T..

MFC : MFC Console Resource 관리 + MakeLower() + MakeReverse()

MFC Resource 관리 // 2009. 9. 15 WJY //MFC : MakeLower() + MakeReverse() // Console.cpp : Defines the entry point for the console application. //콘솔이기때문에 메시지 구동구조가 없다. #include "stdafx.h" #include "Console.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // The one and onl..

MFC : MFC Console Programming

MFC Console Programming을 할 때에는 win32console application으로 해야 하며 an application that supports mfc를 선택해야함 // 2009. 9. 15 WJY // Console.cpp : Defines the entry point for the console application. //콘솔이기때문에 메시지 구동구조가 없다. #include "stdafx.h" #include "Console.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ////////////////////////////////////////////..

MFC : HelloSDK 변형 : "?" + "YESNOCANCEL" + "MINIMIZE"

#include class CHelloApp : public CWinApp { public: virtual BOOL InitInstance(); }; class CMainFrame : public CFrameWnd { public: CMainFrame(); protected: afx_msg void OnPaint(); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); DECLARE_MESSAGE_MAP() }; CHelloApp theApp; BOOL CHelloApp::InitInstance() { m_pMainWnd = new CMainFrame; //m_pMainWnd->ShowWindow(m_nCmdShow); //처음 실행시 최소화된 상태로 실행하..

MFC : MFC programming 의 함수 호출 순서

WindMain() //MFC의 내부에 숨겨진 프로그램 실행의 시작점 { //ptr은 포인터로서 응용 프로그램 객체의 주소값을 갖고 있다. ptr->InitInstance(); //초기화 : 프레임 윈도우 객체를 생성한다. //->프레임 윈도우 객체의 생성자에서 실제 윈도우가 만들어진다. ptr->Run(); //메시지 루프 : 프레임 윈도우에게 메시지를 보낸다. //->프레임 윈도우가 받은 메시지의 종류에 따라 해당 메시지 핸들러가 적절히 호출된다. ptr->ExitInstance(); //종료:각종청소 작업을 수행한다. }

MFC : HelloMFC

/* 2009.09.08 WJY Window Programming HelloMFC.cpp MFC는 main 함수가 없음 */ #include //클래스 선언부 class CHelloApp : public CWinApp { public : virtual BOOL InitInstance(); }; class CMainFrame : public CFrameWnd { public: CMainFrame(); protected: afx_msg void OnPaint(); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); DECLARE_MESSAGE_MAP() }; //응용 프로그램 객체 CHelloApp theApp; //클래스 정의부 BOOL CHelloApp::I..