Windows Message를 수신하기 위한 WndProc의 이용
Programming/C# / 2010. 6. 3. 16:45
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.
this.Invalidate();
break;
}
base.WndProc(ref m);
}
참고한 주소: Control.WndProc Method (System.Windows.Forms)
출처 : http://wslee13.blogspot.com/2008/12/c-windows-message-wndproc.html
{
// 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.
this.Invalidate();
break;
}
base.WndProc(ref m);
}
참고한 주소: Control.WndProc Method (System.Windows.Forms)
출처 : http://wslee13.blogspot.com/2008/12/c-windows-message-wndproc.html
반응형
'Programming > C#' 카테고리의 다른 글
.NET Control: WndProc, WmCreate (C#) (2) | 2010.06.03 |
---|---|
Mutex를 이용한 Application 중복실행 방지 (0) | 2010.06.03 |
codeproject의 C++을 알고있는 사람들을 위한 C# 퀵강좌 (0) | 2010.06.03 |
C#에서 Win32 API 사용하기 (0) | 2010.05.28 |
창 핸들값 구하는 API 함수 (0) | 2010.05.28 |