winclock.h

来自「定时锁住鼠标键盘」· C头文件 代码 · 共 48 行

H
48
字号

//
// WinClock.h - Definition of CWinClock class
// Ryan Lederman, ryan@winprog.org
// January 21, 2002
//

#include "stdafx.h"

#ifndef _WINCLOCK_H
#define _WINCLOCK_H

typedef struct {
	HWND hWndParent;
	int  x;
	int  y;
	int  width;
	int  height;
	COLORREF clrBk;
	COLORREF clrFore;
	char *szFontName;
	int  iFontHeight;
}
CLOCKSTRUCT, *PCLOCKSTRUCT;

class CWinClock
{
public:
	CWinClock();
	~CWinClock();
	BOOL Create( PCLOCKSTRUCT cs );
	BOOL Destroy( void );
private:
	BOOL OnPaint( HWND hWnd );
	static LRESULT CALLBACK ClockProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam );
	static VOID CALLBACK TimerProc( HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime );

private:
	LONG m_lOldWndProc;
	COLORREF m_clrBack;
	COLORREF m_clrFore;
	HFONT m_hFont;
	int m_iTimerID;
public:
	HWND m_hWnd;
};

#endif /* _WINCLOCK_H */

⌨️ 快捷键说明

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