2008년 12월 19일 금요일

[C#] Windows Message를 수신하기 위한 WndProc의 이용

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)


//------------------------------------------------------------------------
야휴 블로그에서 옮겨온 data입니다.

0 개의 댓글:

댓글 쓰기