MFC 4

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 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); //처음 실행시 최소화된 상태로 실행하..

HelloSDK

/* 2009.09.08 WJY Window Programming Hello.cpp */ //모든 윈도우즈 프로그램은 windows.h를 include 해야함 #include //WinMain()함수에서 참조하므로 함수 원형(prototype)을 선언한다. //CALLBACK? LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); //HINSTANCE : 프로그램이 실행되려면 코드가 메모리에 상주해야함. 이때 코드가가 메모리의 어느 위치에 있는지 정보를 담고있음 int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { HWND hwnd; MS..