Description: • application logic design
1. Light class
A. the main attributes and behaviors: bright quenching condition, associated resource object images, accept the bright quenching requirements of our clients
B. class CLight
Member variables: m_state
A member function: init, getState, setState
2. Switch class
A. the main attributes and behaviors: correlation of the lights CLight, accept customer press operation
B. class CSwitch
Member variables: m_pLight
A member function: init, push
3. The instance objects: two switch, a lamp
Operation: click on the button, click event response, invoke the member function push switch, to light up or put out the light
. Note: the above logic code written in a header file, use inline type to achieve its member functions, and submit.
To Search:
File list (Check if you may need any files):
light\light.aps
.....\light.clw
.....\light.cpp
.....\light.dsp
.....\light.dsw
.....\light.h
.....\light.ncb
.....\light.opt
.....\light.plg
.....\light.rc
.....\Light1.cpp
.....\Light1.h
.....\lightDlg.cpp
.....\lightDlg.h
.....\ReadMe.txt
.....\resource.h
.....\StdAfx.cpp
.....\StdAfx.h
.....\Switch.cpp
.....\Switch.h
.....\~VC323.tmp
.....\res\icon1.ico
.....\...\icon2.ico
.....\...\light.ico
.....\...\light.rc2
.....\Debug\light.exe
.....\.....\light.ilk
.....\.....\light.obj
.....\.....\light.pch
.....\.....\light.pdb
.....\.....\light.res
.....\.....\Light1.obj
.....\.....\lightDlg.obj
.....\.....\StdAfx.obj
.....\.....\Switch.obj
.....\.....\vc60.idb
.....\.....\vc60.pdb
.....\res
.....\Debug
light