Windowのフォアグラウンド化 †
void SetForegroundWindow(CWnd *cwn)
{
int fid,tid;
DWORD flt;
fid = GetWindowThreadProcessId(GetForegroundWindow(), NULL);
tid = GetWindowThreadProcessId(cwn->m_hWnd, NULL);
AttachThreadInput(tid, fid, TRUE);
SystemParametersInfo(SPI_GETFOREGROUNDLOCKTIMEOUT, 0, &flt, 0);
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, (PVOID)0, 0);
cwn->ShowWindow(SW_RESTORE);
cwn->SetForegroundWindow();
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, (PVOID)flt, 0);
AttachThreadInput(tid, fid, FALSE);
}
最新の20件
2008-12-07
2007-10-07
2007-09-12
2007-09-11
2007-09-09
2007-09-08
今日の20件
- counter: 146
- today: 1
- yesterday: 0
- online: 1