VC project development: logs produced by Tetris [below]

Source: Internet
Author: User

// The comments are detailed enough, so I will not write any additional analysis.

// July, 2010/10 months.

DLG. h file.

# If! Defined (afx_optiondlg_h1_570435a5_9237_4de0_8215_48d075e1_ad1_included _) <br/> # define tuning _ </P> <p> # If _ msc_ver> 1000 <br/> # pragma once <br/> # endif/_ msc_ver> 1000 <br/> // optiondlg. h: header file <br/> // </P> <p> ///////////////////////// //////////////////////////////////////// //// // <br/> // coptiondlg dialog </P> <p> class coptiondlg: Public cdialog <br/>{< br/> // construction <br/> Public: <br/> int m_iblockstyle; <br/> int m_ilevel; <br/> int m_iarea; <br/> coptiondlg (INT m_iarea, int m_ilevel, int m_iblockstyle, bool m_bmusic, bool m_bdrawgrid, cwnd * pparent = NULL ); </P> <p> // dialog data <br/> // {afx_data (coptiondlg) <br/> Enum {IDD = idd_dlg_option}; <br/> boolm_bdrawgrid; <br/> boolm_bmusic; <br/> //} afx_data </P> <p> // overrides <Br/> // classwizard generated virtual function overrides <br/> // {afx_virtual (coptiondlg) <br/> protected: <br/> virtual void dodataexchange (cdataexchange * PDX ); // DDX/DDV support <br/> //} afx_virtual </P> <p> // implementation <br/> protected: <br/> int m_oldarea; <br/> int m_oldlevel; <br/> int m_oldblocksytle; </P> <p> bool m_oldmusic; <br/> bool m_olddrawgrid; </P> <p> // generated message map functions <br />// {Afx_msg (coptiondlg) <br/> afx_msg void oncheckgrid (); <br/> virtual void onok (); <br/> virtual bool oninitdialog (); <br/> afx_msg int oncreate (maid); <br/> afx_msg void ongameoption (); <br/>/}} afx_msg <br/> declare_message_map () <br/> }; </P> <p> // {afx_insert_location }}< br/> // Microsoft Visual C ++ will insert additional declarations immediately before the previous line. </P> <P> # endif //! Defined (afx_optiondlg_h1_570435a5_9237_4de0_8215_48d075e1_ad1_included _)

DLG. cpp file.

// Optiondlg. CPP: implementation file <br/> // </P> <p> # include "stdafx. H "<br/> # include" skyjuly_rectt.h "<br/> # include" optiondlg. H "</P> <p> # ifdef _ debug <br/> # define new debug_new <br/> # UNDEF this_file <br/> static char this_file [] = __ file __; <br/> # endif </P> <p> /////////////////////////// //////////////////////////////////////// ///////// <br/> // coptiondlg dialog </P> <p> coptiondlg:: coptiondlg (INT m_iarea, int m_ilevel, int m_iblockstyle, bool m_bmusic, bool m_bdrawgrid, cwnd * pparent/* = NULL */) <br/>: cdialog (coptiondlg: IDD, pparent) <br/>{< br/> // {afx_data_init (coptiondlg) <br/> m_bdrawgrid = false; <br/> m_bmusic = false; <br/> //} afx_data_init <br/>}</P> <p> void coptiondlg: dodataexchange (cdataexchange * PDX) <br/>{< br/> cdialog: dodataexchange (PDX); <br/> // {afx_data_map (coptiondlg) <br/> ddx_check (PDX, idc_check_grid, m_bdrawgrid); <br/> ddx_check (PDX, idc_check_music, m_bmusic ); <br/>//}} afx_data_map <br/>}</P> <p> begin_message_map (coptiondlg, cdialog) <br/> // {afx_msg_map (coptiondlg) <br/> on_bn_clicked (idc_check_grid, oncheckgrid) <br/> on_wm_create () <br/> on_command (id_game_option, ongameoption) <br/> //} afx_msg_map <br/> end_message_map () </P> <p> ///////////////////////////////// //////////////////////////////////////// //// <br/> // coptiondlg message handlers </P> <p> void coptiondlg:: oncheckgrid () <br/>{< br/> // todo: add your control notification handler code here </P> <p >}</P> <p> void coptiondlg: onok () <br/>{< br/> // todo: add extra validation here </P> <p> cdialog: onok (); <br/>}</P> <p> bool coptiondlg: oninitdialog () <br/>{< br/> cdialog: oninitdialog (); </P> <p> // todo: add extra initialization here </P> <p> return true; // return true unless you set the focus to a control <br/> // exception: OCX property pages shocould return false <br/>}</P> <p> int coptiondlg: oncreate (maid) <br/>{< br/> If (cdialog:: oncreate (lpcreatestruct) =-1) <br/> return-1; </P> <p> // todo: add your specialized creation code here </P> <p> return 0; <br/>}</P> <p> void coptiondlg: ongameoption () <br/>{< br/> // todo: add your command handler code here </P> <p>}

// At this point, most of the source code has been posted. Welcome to the Russian box.AlgorithmCorrect the communication.

// I used to play this game for several months .; -).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.