LRESULT CALLBACK WndProc(HWND hWnd,UINT iMessage,WPARAM wParam,LPARAM lParam)
{
switch(iMessage) {
case WM_LBUTTONDOWN:
SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
return 0;
case WM_RBUTTONDOWN:
SetWindowPos(hWnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return(DefWindowProc(hWnd,iMessage,wParam,lParam));
}
{
switch(iMessage) {
case WM_LBUTTONDOWN:
SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
return 0;
case WM_RBUTTONDOWN:
SetWindowPos(hWnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return(DefWindowProc(hWnd,iMessage,wParam,lParam));
}
'Windows > Windows API' 카테고리의 다른 글
crc check source | 펌 개발자료 2004/12/08 11:54 (0) | 2013.10.01 |
---|---|
API 프로그래밍에 대한 Q&A입니다. | 펌 개발자료 2004/07/28 22:42 (0) | 2013.10.01 |
팝업 윈도우 (0) | 2013.10.01 |
16 픽셀 단위로 이동 (0) | 2013.10.01 |
화면 가장자리에 밀착 (0) | 2013.10.01 |