Title: Dialog ??? ?? 1
1Dialog ??? ?? 1
- Dialog Box? ??? ??
- resources? Insert Dialog? ? ? Dialog?? ???
button click (Properties) - Dialog? ID ?? (IDD_??????) ?
Insert New Class
2Dialog ??? ?? 2
- Dialog Box? ??? ??
- Class ?? ?? ( C????Dlg ? ?? ??) ? Ctrl ?? ?
double click? ??? ?? - ????Dlg.h? include ?.
3Sample Program
- ???View.cpp ??
- ?? ???? ???, Dialog Box? Pop-up ?.
include TestDlg.h void CBbbViewOnLButtonDown
(UINT nFlags, CPoint point) CTestDlg
dlg dlg.m_a 0 dlg.DoModal() CViewOnLBu
ttonDown(nFlags, point)
4Sample Program ??
- ???View.cpp ??
- ?? ???? ???, Dialog Box? Pop-up ?.
- ?, ???? ??? ???, ??? Dialog Box Pop-up??? ? ???
???? ? ( View class? member ??? count? ??? ?)
include TestDlg.h void CBbbViewOnLButtonDown
(UINT nFlags, CPoint point)
5Sample Program ?? 2
- ???View.cpp ??
- ?? ???? ???, Dialog Box? Pop-up ?.
- Dialog Popup ? ??? ??? ??? ???.
include TestDlg.h void CBbbViewOnLButtonDown
(UINT nFlags, CPoint point)
6????
- ?? ??? button? ???, Dialog Box? pop-up ?
- ??? Cancel button? click??, Dialog Box? ?? pop-up
??
include TestDlg.h void CBbbViewOnLButtonDown
(UINT nFlags, CPoint point) CTestDlg
dlg
7Push Button? ??
??? click
double click ?
8OnInc
- On??? ??
- BN_CLICKED Button? ??? ? ???? ???
- BN_DOUBLECLICKED Button? double click ??? ?
???? ??? - ? ???? control? ???? ?? Dialog Box class (?,
CTestDlg)?? ??? - BN_CLICKED ? OnInc()
void CTestDlgOnInc() // TODO Add your
control notification handler code here void
CTestDlgOnDec() // TODO Add your control
notification handler code here
9????
- Increase ??? ??? ??? ?? ??, Decrease ??? ??? ???
?? ?? - ? ????? ??? ???? ?? ? CTestDlg class? ????? ??
???? Dialog? control ?? ???? ??? ??
void CTestDlgOnInc() m_a void
CTestDlgOnDec() --m_a
10???? (???)
- Increase ??? ??? ??? ?? ??, Decrease ??? ??? ???
?? ??
void CTestDlgOnInc() m_a
UpdateData(FALSE) void CTestDlgOnDec()
--m_a UpdateData(FALSE)
11UpdateData() ? ?? class? ?? ??
- UpdateData()
- UpdateData(TRUE) control? ? ? ???
- UpdateData(FALSE) ??? ? control? ?
- UpdateData()? ?? ??
- ???? ??? UpdateData(FALSE)? ???
- ???? ??? UpdateData(TRUE)? ???
?? Dialog Box? control? ?? ??? ??
m_a 33 UpdateData(FALSE)
?? Dialog Box? control ?? ??
12?? ????
- Copy button? ??? ??? ??? ?? ??? copy ?
m_a
m_b
void CSampleDlgOnCopy()