摘要:
/*----------------------------------------- DIGCLOCK.c -- Digital Clock (c) Charles Petzold, 1998 -----------------------------------------*/ #include <windows.h>#define ID_TIMER 1LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;int WINAPI WinMain (HINSTANCE hInstance, HI... 阅读全文
posted @ 2012-11-02 21:38
xingoo
阅读(759)
评论(0)
推荐(0)
摘要:
第一种方法 是把WM_TIMER消息发送给正常的窗口过程。第二种方法 是 自己让 windows把计时器消息发送给程序中的另一个窗口过程回调函数:VOID CALLBACK TimerProc(HWND hwnd,UINT message,UINT iTimerID,DWORD dwTimer){ ....} 第一种方式调用的SetTImer函数,第四个参数一般直接为NULLSetTimer(hwnd,iTimerID,iMsecInterval,NULL);第二种方式调用的SetTimer函数,第四个参数要设定为回调函数地址SetTimer(hwnd,iTimerID,iMsecIn... 阅读全文
posted @ 2012-11-02 20:27
xingoo
阅读(396)
评论(0)
推荐(0)
摘要:
Windows将WM_TIMER消息发送到应用程序的窗口过程。相应SetTimer的调用方法:SetTimer(hwnd,1,uiMsecInterval,NULL);在任何时刻停止WM_TIMER消息,方法如下:KillTimer(hwnd,1);当窗口收到WM_TIMER消息时,wParam等于计时器的ID,所以可以用如下方式:#define TIMER_SEC 1#define TIMER_MIN 2 SetTimer(hwnd,TIMER_SEC,1000,NULL);SetTimer(hwnd,TIMER_MIN,60000,NULL);case WM_TIMER: sw... 阅读全文
posted @ 2012-11-02 20:05
xingoo
阅读(377)
评论(0)
推荐(0)
摘要:
基础类1、 Dinkumware C++ Library参考站点:http://www.dinkumware.comP.J. Plauger编写的高品质的标准库。P.J. Plauger博士是Dr. Dobb's程序设计杰出奖的获得者。其编写的库长期被Microsoft采用,并且最近Borland也取得了其OEM的license,在其C/C+ +的产品中采用Dinkumware的库。2、 RogueWave Standard C++ Library参考站点:http://www.roguewave.com这个库在Borland C++ Builder的早期版本中曾经被采用,后来被其他的 阅读全文
posted @ 2012-11-02 15:31
xingoo
阅读(359)
评论(0)
推荐(0)
摘要:
下面是CStdioFile类的部分列表,其中使用了MFC在其类中按类成员的用法划分它们时所采用的大多数标准注释:class CStdioFile : public CFile{ DECLARE_DYNAMIC(CStdioFile)public:// Constructors CStdioFile();...// AttributesFILE* m_pStream; // stdio FILE...// Operationsvirtual void WriteString(LPCTSTR lpsz);... virtual LPTSTR ReadString(LPTSTR l... 阅读全文
posted @ 2012-11-02 10:11
xingoo
阅读(1431)
评论(0)
推荐(0)

浙公网安备 33010602011771号