readme.wzd
来自「MFC扩展编程实例」· WZD 代码 · 共 51 行
WZD
51 行
/////////////////////////////////////////////////////////////////////
// To add flashing text...
/////////////////////////////////////////////////////////////////////
// 1) Start a timer. If in a dialog class, start the timer in the
// OnInitDialog message handler:
SetTimer(
1, // event ID
250, // time in milliseconds
NULL); // causes a WM_TIMER message to be sent to this window
// 2) Add a WM_TIMER message handler to hide and show the text in question:
void CWzdDialog::OnTimer(UINT nIDEvent)
{
if (nIDEvent==1)
{
static BOOL t=TRUE;
m_ctrlStatic.ShowWindow((t=!t)?SW_SHOW:SW_HIDE);
}
CDialog::OnTimer(nIDEvent);
}
/////////////////////////////////////////////////////////////////////
// To add flashing dialog or other window...
/////////////////////////////////////////////////////////////////////
// 1) Start a timer as seen above.
// 2) Add a WM_TIMER message handler that uses FlashWindow() to toggle the
// caption bar of that window from active to inactive:
void CWzdDialog::OnTimer(UINT nIDEvent)
{
FlashWindow(
TRUE // if FALSE, forces caption bar to be active--useful
// when flashing stops and you want bar to be active
);
CDialog::OnTimer(nIDEvent);
}
/////////////////////////////////////////////////////////////////////
// From: Visual C++ MFC Programming by Example by John E. Swanke
// Copyright (C) 1999 jeswanke. All rights reserved.
/////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?