메뉴 건너뛰기

OBG

Programming

API/MFC
2013.07.17 16:35

CDockablePane 버튼 비활성화 문제

MoA
조회 수 1220 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

CDockablePane 에서 버튼을 만들면 ON_BN_CLICKED 메세지 맵을 만들고 EnableWindow(TRUE) 함수를 이용해도 버튼이 활성화 되지 않는다.

버튼 활성화를 위해서는 ON_UPDATE_COMMAND_UI 메세지 맵을 만든 후 pCmdUI->Enable(TRUE)를 이용한다.

 

//Resource.h 

#define  IDC_BT_TEST  150 

//FileView.h  

CButton m_btnTest;

afx_msg void OnBtnTest(); 
afx_msg void OnUpdateButton(CCmdUI *pCmdUI); 

//FileView.cpp 
BEGIN_MESSAGE_MAP(CFileView, CDockablePane) 
ON_BN_CLICKED(IDC_BT_TEST, OnBtnTest) 

ON_UPDATE_COMMAND_UI(IDC_BT_TEST, OnUpdateButton)
END_MESSAGE_MAP() 

CFileView::OnCreate(LPCREATESTRUCT lpCreateStruct) 

    m_btnTest.Create(_T("OK"), WS_VISIBLE | WS_CHILD, rectDummy, this, IDC_BT_TEST) 
    m_btnTest.EnableWindow(TRUE); 


void CFileView::OnBtnTest() 

    TRACE0("OKn"); 


void CFileView::OnUpdateButton(CCmdUI *pCmdUI)
{
    pCmdUI->Enable(TRUE);
}

 

http://blog.naver.com/PostView.nhn?blogId=agebreak&logNo=60145877957&parentCategoryNo=26&viewDate=&currentPage=1&listtype=0

?

  1. Programming 게시판 관련

    Date2014.11.01 CategoryTool/etc ByMoA Views1748
    read more
  2. Buffer Overrun

    Date2013.07.28 CategoryC/C++ ByMoA Views402
    Read More
  3. Building Pitaya, Wildlife’s own scalable game server framework

    Date2022.06.07 Category서버 ByOBG Views145
    Read More
  4. C Runtime 환경의 메모리 릭 잡는 방법 (Memory leak)

    Date2012.08.02 CategoryC/C++ ByNaya Views417
    Read More
  5. C 언어의 문자형 변수 char - 8비트 정수형 변수

    Date2013.07.28 CategoryC/C++ ByMoA Views2253
    Read More
  6. C, C++ 에서의 불(bool, boolean) 타입의 동작

    Date2013.07.28 CategoryC/C++ ByMoA Views312
    Read More
  7. C++11 A cheat sheet

    Date2013.08.21 CategoryC/C++ ByMoA Views319
    Read More
  8. C++에서 base64로 인코딩

    Date2012.11.15 CategoryC/C++ ByNaya Views624
    Read More
  9. C++의 새로운 표준, C++0x에서 C++11으로

    Date2011.10.15 CategoryC/C++ By너울 Views320
    Read More
  10. Caching In Node.js Applications

    Date2023.03.03 Category서버 ByOBG Views100
    Read More
  11. Caching in Node.js to optimize app performance

    Date2023.01.16 Category서버 ByOBG Views87
    Read More
  12. CDockablePane 배경화면 회색으로 변경

    Date2013.07.11 CategoryAPI/MFC ByMoA Views753
    Read More
  13. CDockablePane 버튼 비활성화 문제

    Date2013.07.17 CategoryAPI/MFC ByMoA Views1220
    Read More
  14. CFile을 이용한 저장/불러오기

    Date2013.08.27 CategoryAPI/MFC ByMoA Views1260
    Read More
  15. CFormView

    Date2012.01.09 CategoryAPI/MFC By너울 Views419
    Read More
  16. char*, String, CString

    Date2013.07.28 CategoryAPI/MFC ByMoA Views371
    Read More
  17. ChartFX 7.0 MFC에서 사용하기

    Date2013.07.28 CategoryLibrary ByMoA Views597
    Read More
  18. ChatGPT의 강력한 경쟁 언어모델 등장!, Mixtral 8x7B

    Date2024.04.14 CategoryLLM ByOBG Views24
    Read More
  19. Coding conventions

    Date2013.07.28 CategoryTool/etc ByMoA Views676
    Read More
  20. CPaneDialog 초기화 (OnInitDialog)

    Date2013.07.18 CategoryAPI/MFC ByMoA Views1080
    Read More
  21. CPaneDialog의 context menu 안뜨게 하기

    Date2013.06.12 CategoryAPI/MFC ByMoA Views512
    Read More
Board Pagination Prev 1 ... 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15
위로