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

📄 todaywindow.h

📁 windows ce today plugin with options dialog
💻 H
字号:
// TodayWindow.h: interface for the CTodayWindow class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TODAYWINDOW_H__50D4F5EE_C442_4756_8D0B_7FFBACF0AC2C__INCLUDED_)
#define AFX_TODAYWINDOW_H__50D4F5EE_C442_4756_8D0B_7FFBACF0AC2C__INCLUDED_

#include <windows.h>
#include <todaycmn.h>

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CTodayWindow  
{
public:
	// Member Variables
	HWND m_hWnd;

	// Methods
	CTodayWindow();
	CTodayWindow(HINSTANCE hInstance, LPCTSTR lpszClassName, LPCTSTR lpszWindowName);
	virtual ~CTodayWindow();

	// Main Create method
	BOOL Create(HWND hWndParent, DWORD dwStyle = WS_VISIBLE | WS_CHILD);

	// Update Window
	void RefreshWindow(BOOL bShow = FALSE);

	// Set Methods
	BOOL SetIcon(UINT uID, int xDrawAt = 2, int yDrawAt = 0);
	void SetItemHeight(int nHeight);
	void SetClassInfo(LPCTSTR lpszClassName, LPCTSTR lpszWindowName);
	void SetInstance(HINSTANCE hInstance);

	// Get Methods
	HWND GetParent() {return m_hParentHwnd;};
	int GetItemHeight() {return m_nHeight;};
	HINSTANCE GetInstance() {return m_hInstance;};
	HICON GetIcon() {return m_hIcon;};
	LPCTSTR GetClassName() {return m_lpszClassName;};
	LPCTSTR GetWindowName() {return m_lpszWindowName;};

	// Register/Unregister TodayWindow
	void RegisterTodayClass(WNDPROC wndProc);
	void UnregisterTodayClass();

	// TodayWndProc - main message loop
	virtual LRESULT CALLBACK TodayWndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
protected:
	BOOL m_bInitialRefresh;

	int m_nHeight;
	POINT m_pointIconPos;

	HWND m_hParentHwnd;
	HICON m_hIcon;
	HINSTANCE m_hInstance;

	LPCTSTR m_lpszClassName;
	LPCTSTR m_lpszWindowName;

	COLORREF m_crTodayText;
	HFONT m_hNormalTodayFont;
	HFONT m_hBoldTodayFont;

	virtual void DrawTodayIcon(HDC hDC);
	virtual void GetTodayDefaults();

	// Message handlers
	virtual int OnCreate(LPCREATESTRUCT lpCreateStruct);
	virtual void OnDestroy();
	virtual void OnPaint(HDC hDC);
	virtual void OnEraseBkgnd(HDC hDC);
	virtual void OnTodayCustomQueryRefreshCache(TODAYLISTITEM *pTodayListItem, BOOL *pResult);
	virtual BOOL OnTodayCustomClearCache(TODAYLISTITEM *pTodayListItem);
	virtual void OnLButtonUp(UINT nFlags, POINT point);
	virtual void OnLButtonDown(UINT nFlags, POINT point);
	virtual void OnSettingChange(UINT nFlags, LPCTSTR lpszSection);
	virtual LRESULT OnNotify(UINT nID, NMHDR* pNMHDR);
	virtual LRESULT OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
};

#endif // !defined(AFX_TODAYWINDOW_H__50D4F5EE_C442_4756_8D0B_7FFBACF0AC2C__INCLUDED_)

⌨️ 快捷键说明

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