Dialog ??? ?? 1 - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Dialog ??? ?? 1

Description:

Dialog 1 Dialog Box resources Insert Dialog Dialog button click (Properties) – PowerPoint PPT presentation

Number of Views:130
Avg rating:3.0/5.0
Slides: 13
Provided by: yss9
Category:
Tags: dialog

less

Transcript and Presenter's Notes

Title: Dialog ??? ?? 1


1
Dialog ??? ?? 1
  • Dialog Box? ??? ??
  • resources? Insert Dialog? ? ? Dialog?? ???
    button click (Properties)
  • Dialog? ID ?? (IDD_??????) ?
    Insert New Class

2
Dialog ??? ?? 2
  • Dialog Box? ??? ??
  • Class ?? ?? ( C????Dlg ? ?? ??) ? Ctrl ?? ?
    double click? ??? ??
  • ????Dlg.h? include ?.

3
Sample 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)
4
Sample Program ??
  • ???View.cpp ??
  • ?? ???? ???, Dialog Box? Pop-up ?.
  • ?, ???? ??? ???, ??? Dialog Box Pop-up??? ? ???
    ???? ? ( View class? member ??? count? ??? ?)

include TestDlg.h void CBbbViewOnLButtonDown
(UINT nFlags, CPoint point)
5
Sample 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
7
Push Button? ??
  • Push Button? ??

??? click
double click ?
8
OnInc
  • 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)
11
UpdateData() ? ?? 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()
Write a Comment
User Comments (0)
About PowerShow.com