public class TestWndProc : Form
{
private const int WM_ACTIVATEAPP = 0x001C;
bool appActive;
protected override void WndProc(ref Message m)
{
// Listen for operating system messages.
switch (m.Msg) {
// The WM_ACTIVATEAPP message occurs when the application
// becomes the active application or becomes inactive.
case WM_ACTIVATEAPP:
// The WParam value identifies what is occurring.
appActive = (int)m.WParam != 0;
// Invalidate to get new text painted.
Invalidate();
break;
}
base.WndProc(ref m);
}
}
반응형
'Programming > C/C++/C#' 카테고리의 다른 글
C# 호출된 위치 로그 남기기(CallStackLog) (0) | 2018.02.02 |
---|---|
C# 경로 가져오는 방법 (0) | 2018.01.29 |
C# 키워드 정리 (0) | 2018.01.15 |
C# Thread.Sleep vs Task.Delay 차이 (0) | 2017.12.21 |
C# 동기화 처리 (0) | 2017.09.23 |
C# 성능 측정 (0) | 2017.09.05 |
C++ 에서 동적 메모리의 할당(malloc, new)과 해제(free,delete) 원리 (0) | 2017.08.30 |
C++ WIndow Styles (0) | 2017.08.12 |