Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

48 lines
914 B

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef IDLE_DIALOG_H
#define IDLE_DIALOG_H
#ifdef _WIN32
#pragma once
#endif
#include "win_idle.h"
//
// This is a base class that provides in-thread idle processing.
//
// To use it:
// 1. derive from it
// 2. Change your message map to point at this class instead of CDialog
// 3. Call StartIdleProcessing to begin receiving idle calls.
// 4. Override OnIdle().
//
class CIdleDialog : public CDialog
{
public:
CIdleDialog( int id, CWnd *pParent );
// Call this to start the idle processing.
void StartIdleProcessing( DWORD msInterval );
virtual void OnIdle() = 0;
private:
DECLARE_MESSAGE_MAP()
afx_msg LONG OnStartIdle(UINT, LONG);
CWinIdle m_cWinIdle;
};
#endif // IDLE_DIALOG_H