FormView에 Dialog를 붙이는 코드

(사실은 CDialogBar)

이 코드는 데브피아에 올라온 양찬경 님의 코드이다.
관련링크 : 보러가기


Dialog 의 속성을 아래와 같이 설정한다.
Border : None
Style : Chiled


아래의 코드를 추가한다.



//CMainFrame.h
#pragma once
class CMainFrame : public CFrameWnd
{
    public:
        CDialogBar m_wndDialogBar; // 추가할 부분
}
//CMainFrame.cpp
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    // 중략
    // Quest List bar ------------------------------------------------------
    if(!m_wndQuestListBar.Create(this, IDD_DIALOG1, // DIALOG에 설정된 ID
    CBRS_LEFT | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_HIDE_INPLACE,
    IDS_STRING_TEST)) //스트링 테이블에서 작성하세요
    {
        TRACE0("Failed to create dialog bar m_wndDialogBar\n");
        return -1;        // fail to create
    }

    m_wndQuestListBar.EnableDocking(CBRS_ALIGN_LEFT | CBRS_ALIGN_RIGHT);
    EnableDocking(CBRS_ALIGN_ANY);
    DockControlBar(&m_wndQuestListBar);
    //-----------------------------------------------------------------------
    return 0;
}
반응형

'저장고 > C++' 카테고리의 다른 글

ifstream memory leak...  (2) 2007.12.08
MD5 Hash 생성 소스  (0) 2007.08.23
원격 디버깅  (7) 2006.08.07

+ Recent posts