1 // $Id: switcherwindow.h,v 1.3 2003/08/03 16:56:29 nedko Exp $
4 // Copyright (C) 2000,2001,2002 Nedko Arnaudov <nedko@users.sourceforge.net>
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef _SWITCHER_WINDOW_H_f8ade2f7_4bdf_4b29_9e91_fd26a09ff35d__INCLUDED
21 #define _SWITCHER_WINDOW_H_f8ade2f7_4bdf_4b29_9e91_fd26a09ff35d__INCLUDED
24 #include "ShadowWindow.h"
25 class CDesktopSwitcher
;
28 // Preparation for the function we want to import from USER32.DLL
29 typedef BOOL (WINAPI
*lpfnUpdateLayeredWindow
)(HWND hwnd
, // handle to layered window
30 HDC hdcDst
, // handle to screen DC
31 POINT
*pptDst
, // new screen position
32 SIZE
*psize
, // new size of the layered window
33 HDC hdcSrc
, // handle to surface DC
34 POINT
*pptSrc
, // layer position
35 COLORREF crKey
, // color key
36 BLENDFUNCTION
*pblend
, // blend function
37 DWORD dwFlags
); // options
39 class CSwitcherWindow
: public CWindowImpl
<CSwitcherWindow
>
42 CSwitcherWindow(CDesktopSwitcher
*pDesktopSwitcher
, CDesktop
*pDesktop
);
50 BEGIN_MSG_MAP(CSwitcherWindow
)
51 MESSAGE_HANDLER(WM_CLOSE
,OnClose
)
52 MESSAGE_HANDLER(WM_HOTKEY
,OnHotKey
)
53 MESSAGE_HANDLER(WM_NCRBUTTONDOWN
,OnRButtonDown
)
54 MESSAGE_HANDLER(WM_EXITSIZEMOVE
,OnExitSizeMove
)
55 MESSAGE_HANDLER(WM_NCHITTEST
,OnNCHitText
)
56 COMMAND_ID_HANDLER(ID_RUN
,OnRun
)
57 COMMAND_ID_HANDLER(ID_EXIT
,OnExit
)
61 LRESULT
OnClose(UINT uMsg
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
62 LRESULT
OnHotKey(UINT uMsg
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
63 LRESULT
OnRButtonDown(UINT uMsg
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
64 LRESULT
OnExitSizeMove(UINT uMsg
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
65 LRESULT
OnNCHitText(UINT uMsg
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
67 LRESULT
OnRun(WORD wNotifyCode
, WORD wID
, HWND hWndCtl
, BOOL
& bHandled
);
68 LRESULT
OnExit(WORD wNotifyCode
, WORD wID
, HWND hWndCtl
, BOOL
& bHandled
);
71 CDesktopSwitcher
*m_pDesktopSwitcher
;
74 CShadowWindow
*m_pMoveWnd
;
78 #endif // #ifndef _SWITCHER_WINDOW_H_f8ade2f7_4bdf_4b29_9e91_fd26a09ff35d__INCLUDED