⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.wzd

📁 《vc++扩展编程实例》源码。运用Visual C++ 5.0或6.0的高级编程技巧
💻 WZD
字号:
/////////////////////////////////////////////////////////////////////
// Modify any class.
/////////////////////////////////////////////////////////////////////

// 1) to have timer call a time-out function when timed out
	SetTimer(
		1,				// event ID, passed to time out process
		1000,			// time out time in milliseconds
		CWzdView::TimerProc //timeout process called
		);


// 2) define the time-out function in the class's include file
	static void CALLBACK EXPORT TimerProc(HWND hWnd, UINT nMsg, UINT nIDEvent, DWORD dwTime);

// 3) implement the time-out function
void CALLBACK EXPORT CWzdView::TimerProc(HWND hWnd, UINT nMsg, UINT nIDEvent, DWORD dwTime)
{
	// hWnd will be this window
	// nMsg will be WM_TIMER
	// nIDEvent will be the event id specified in SetTimer
	// dwTime will be the current system time
}

// 4) to kill a timer
	UINT timerID=SetTimer(3,3000,NULL);
	KillTimer(
		timerID			// timer id returned from SetTimer()
		);

/////////////////////////////////////////////////////////////////////
// Modify any class that owns a window.
/////////////////////////////////////////////////////////////////////

// 1) to have timer send a WM_TIMER message to this window when done
	SetTimer(
		2,				// event ID
		2000,			// time in milliseconds
		NULL);			// causes a WM_TIMER message to be sent to this window


// 2) use the ClassWizard to add a WM_TIMER handler to this class.

// 3) implement the handler
void CWzdView::OnTimer(UINT nIDEvent) 
{
	// nIDEvent will be the event id specified in SetTimer
	
	CView::OnTimer(nIDEvent);
}

// 4) to kill a timer
	UINT timerID=SetTimer(3,3000,NULL);
	KillTimer(
		timerID			// timer id returned from SetTimer()
		);


/////////////////////////////////////////////////////////////////////
// From: Visual C++ MFC Programming by Example by John E. Swanke
// Copyright (C) 1999 jeswanke. All rights reserved.
/////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

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