multtimer.h

来自「window下的多线程编程参考书。值得一读」· C头文件 代码 · 共 57 行

H
57
字号
//
// FILE: MultTimer.h
//
// Copyright (c) 1997 by Aaron Michael Cohen and Mike Woodring
//
/////////////////////////////////////////////////////////////////////////

#include <afxwin.h>
#include <afxext.h>
#include <time.h>
#include "resource.h"

#include "Mcl4Mfc.h"

class CMultTimerApp : public CWinApp {
public:
    virtual BOOL InitInstance(void);
    BOOL CanExitNow(void);
    void IncrementChildThreadCount(void);
    void DecrementChildThreadCount(void);

private:
    LONG m_lChildThreadCount;
};

class CMultTimerThread : public CMcl4MfcGUIThread {
public:
    virtual BOOL InitInstance(void);    
    int ExitInstance(void);
};

class CMultTimerDlg : public CDialog {
public:
    CMultTimerDlg();
    virtual BOOL OnInitDialog();

protected:
    virtual void OnCancel();
    virtual void OnOK();
    virtual void PostNcDestroy();

    afx_msg void OnPaint();
    afx_msg void OnSysCommand( UINT nID, LPARAM lParam);

    DECLARE_MESSAGE_MAP()

private:
    clock_t m_ctStartTime;
    CRect m_crLastPaint;
    CEdit m_ceSeconds;
    BOOL m_bTimerRunning;
    int m_nTicks;
    static int s_LastDialogX;
    static int s_LastDialogY;
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?