반응형
mfc AfxMessageBox 응답 받기, vs2010
1. 그냥 아래처럼 쓰면 됩니다.
if( IDYES == AfxMessageBox(_T("Are you OK ?"), MB_YESNO) ) {
AfxMessageBox(_T("Good ?")
} else {
AfxMessageBox(_T("Why ?")
}
2. MB_YESNO 대신 들어 갈거 뭐 디파인 찾어 보시면 됩니다.
/*
* MessageBox() Flags
*/
#define MB_OK 0x00000000L
#define MB_OKCANCEL 0x00000001L
#define MB_ABORTRETRYIGNORE 0x00000002L
#define MB_YESNOCANCEL 0x00000003L
#define MB_YESNO 0x00000004L
#define MB_RETRYCANCEL 0x00000005L
#if(WINVER >= 0x0500)
#define MB_CANCELTRYCONTINUE 0x00000006L
#endif /* WINVER >= 0x0500 */
3. IDYES 대신 들어 갈거..
/*
* Dialog Box Command IDs
*/
#define IDOK 1
#define IDCANCEL 2
#define IDABORT 3
#define IDRETRY 4
#define IDIGNORE 5
#define IDYES 6
#define IDNO 7
#if(WINVER >= 0x0400)
#define IDCLOSE 8
#define IDHELP 9
#endif /* WINVER >= 0x0400 */
이상 입니다.
반응형
'개발 > mfc' 카테고리의 다른 글
mfc, combobox 만들기, 고치기 (0) | 2024.10.29 |
---|---|
mfc. diaog 위치 가져오기, 부모 옆에 설정하기 source example (0) | 2024.09.19 |
mfc button 에 image 올리기, sample source (0) | 2024.05.21 |
mfc, image 보이기, sample source (0) | 2024.05.21 |
mfc, OnInitDialog 함수 추가 (0) | 2024.05.09 |