14#include <control/SDropDown.h>
15#include <core/SMsgLoop.h>
53 HWND hParent =
m_pOwner->GetDropDownOwner()->GetContainer()->GetHostHwnd();
54 HWND hWnd =
SNativeWnd::CreateNative(NULL, dwStyle, dwExStyle, lpRect->left, lpRect->top, lpRect->right - lpRect->left, lpRect->bottom - lpRect->top, hParent, 0, NULL);
66 if (!rcWnd.PtInRect(point))
86 if (::IsWindow(hWnd) && !rcWnd.PtInRect(point))
93 if (nChar == VK_RETURN)
95 else if (nChar == VK_ESCAPE)
113 SetMsgHandled(FALSE);
118 if (pMsg->message == WM_ACTIVATEAPP)
122 else if (pMsg->message == WM_MOUSEMOVE)
139 return MA_NOACTIVATEANDEAT;
151 return m_pOwner->GetDropDownOwner()->GetContainer()->GetMsgLoop();
void OnDestroy()
Handle destroy event.
void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
Handle key down event.
void OnActivateApp(BOOL bActive, DWORD dwThreadID)
Handle activate application event.
IMessageLoop * GetMsgLoop()
Get the message loop.
int OnMouseActivate(HWND wndTopLevel, UINT nHitTest, UINT message)
Handle mouse activate event.
SWindow * GetDropDownOwner()
Get the dropdown owner window.
void OnKillFocus(HWND wndFocus)
Handle kill focus event.
void OnLButtonDown(UINT nFlags, CPoint point)
Handle left mouse button down event.
virtual ~SDropDownWnd()
Destructor.
ISDropDownOwner * m_pOwner
virtual BOOL Create(LPCRECT lpRect, LPVOID lParam, DWORD dwStyle=WS_POPUP, DWORD dwExStyle=WS_EX_TOOLWINDOW|WS_EX_TOPMOST)
Create the dropdown window.
void EndDropDown(UINT uCode=IDCANCEL)
End the dropdown window.
BOOL OnReleaseSwndCapture()
Prevent the window from releasing capture.
void OnLButtonUp(UINT nFlags, CPoint point)
Handle left mouse button up event.
virtual BOOL WINAPI PreTranslateMessage(MSG *pMsg)
Pre-translate messages.
virtual void OnFinalMessage(HWND hwnd)
Handle final message.
SDropDownWnd(ISDropDownOwner *pOwner)
Constructor.
BOOL OnReleaseSwndCapture() OVERRIDE
Releases the capture from the container.
HWND SetCapture() OVERRIDE
Sets the window to capture the mouse.
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0) OVERRIDE
Sends a message to the window.
virtual BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID=0)
Processes a window message.
HWND m_hWnd
Handle to the window.
BOOL GetClientRect(LPRECT lpRect) SCONST OVERRIDE
Retrieves the client rectangle.
HWND CreateNative(LPCTSTR lpWindowName, DWORD dwStyle, DWORD dwExStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, int nID=0, LPVOID lpParam=0) OVERRIDE
Creates a native window.
virtual void OnFinalMessage(HWND hWnd)
Handles the final message for the window.
BOOL DestroyWindow() OVERRIDE
Destroys the window.
Base class for SOUI DUI windows.
Interface for message loops.
BOOL RemoveMessageFilter(IMsgFilter *pMessageFilter) PURE
Removes a message filter.
BOOL AddMessageFilter(IMsgFilter *pMessageFilter) PURE
Adds a message filter.
Interface for Dropdown Owner.