Languages

    int를 string으로 변환하기

    int nMinutes = 12; char strbuf[3]; itoa(nMinutes, strbuf, 10); itoa(변환할 숫자형 데이터, 변화되어 담겨질 char형 변수, 진수);

    CDialog창 드래그 가능하게 하기

    void CEndPopup::OnLButtonDown(UINT nFlags, CPoint point) { PostMessage( WM_NCLBUTTONDOWN, HTCAPTION, 0 ); //이 부분 CDialog::OnLButtonDown(nFlags, point); } HTCAPTION은 해당 컨트롤바의 타이틀 부분을 인식할 수 있게 해주는 define된 상수이다.

    [펌]afx_msg란?

    afx_msg 라는 것이 virtual 대신 붙여 놓았다는 말은 처음 들어보네요. 실제 동작 원리는 virtual 함수와 비슷하긴 하지만 virtual 대신에 afx_msg라는 것을 붙인다는 것은 첨 들어봤습니다. afx_msg라는 것은(a가 기억이 안나지만 아마 application 이겠지요) framework_msg 의 약자인데요 Window Message와 연결된 함수라는 겁니다. Window Message의 동작 원리는 선언 부분이 아닌(헤더) 정의 부분인(cpp)에 보시면 BEGIN_MESSAGE_MAP(현 클래스 , 부모 클래스) END_MESSAGE_MAP 와 같이 정의 되어 있는데 저 디파인 들어가보면 배열이라던가 포인터로 된 멤버들이 디파인 되어 있습니다. 저런식으로 쓰는 이유는 메세지를..

    [펌]#define과 typedef의 차이

    [펌]#define과 typedef의 차이

    http://msbang.co.kr/80163148187

    DC 개념이해 링크들

    잘 정리된 순서대로 링크 걸어둠. http://blog.naver.com/sealriel?Redirect=Log&logNo=10137610754 http://blog.naver.com/coocoozz?Redirect=Log&logNo=10068659930 http://rockdrumy.tistory.com/388

    MFC SDI(Single Document Interface) 실행순서

    CMainFrame.cpp와 CSdiSeqView.cpp의 AssertValide()함수와 Dump()함수를 제외한모든 함수에 추적점을 삽입한 결과. Function: CMainFrame::CMainFrame(void), Thread: 0x15F4 주 스레드 Function: CMainFrame::LoadFrame(unsigned int, unsigned long, CWnd *, CCreateContext *), Thread: 0x15F4 주 스레드 Function: CMainFrame::PreCreateWindow(tagCREATESTRUCTW &), Thread: 0x15F4 주 스레드 Function: CMainFrame::PreCreateWindow(tagCREATESTRUCTW &), Threa..

    unique 알고리즘 함수

    bool Pred(int left, int right){ cout

    [펌] erase 와 remove

    컨테이너에서 요소를 삭제할때 erase 멤버함수를 쓰곤 한다. 그런데 remove 라는 것도 있는데 이건뭔가? remove 는 알고리즘이다. (주)list 의 경우에는 멤버함수 remove 도 있다. erase 와 remove 의 차이는 뭘까? [remove 알고리즘은 일치하는 모든 요소를 삭제한다.] 소스를 보자. vector v; v.reserve(10); // 재할당을 피하기위해서 입니다. for( int i = 0; i