button 의 caption text 가져와서
button 에 표시되는 text를 toggle 시키는데 유용하게 사용 할 수 있다.
CButton m_bt; //해당 버튼 컨트롤러에 대한 멤버변수
CString str="";
m_bt.GetWindowText(str);
str에 해당 버튼의 현재 caption 을 가져온다.
사용예--------
해당 버튼의 OnBnClick 이벤트 처리 함수에서
if(str=="Start") //thread 시작
{
m_bt.SetWindowTextA("Stop");
}
else //thread 종료
{
m_bt.SetWindowTextA("Start");
}
'[old 정리중] study > Visual studio' 카테고리의 다른 글
기존의 file을 사용하여 Class 추가하기 (0) | 2012.09.13 |
---|---|
thread 사용/시작/종료 (afxbeingthread 사용) (0) | 2012.09.13 |
PreTranslateMessage() 가상 함수를 사용하여 Dialog 의 Enter , ESC 키 버그 해결 (0) | 2012.09.12 |
새로운 Class 파일생성 및 추가하기 (0) | 2012.09.12 |
visual assist X 단축키 (0) | 2012.09.11 |