51 m_hookid = SetWindowsHookEx(WH_CALLWNDPROCRET,
ResizeHook, GetModuleHandle(NULL), GetCurrentThreadId());
59 UnhookWindowsHookEx(m_hookid);
68 if (wnd == NULL)
return NS_ERROR_FAILURE;
82 if (!wrhi)
return NS_ERROR_FAILURE;
92 std::list<CWindowResizeHookItem*>::iterator iter;
104 std::list<CWindowResizeHookItem*>::iterator iter;
108 if (wrhi->
m_window == wnd)
return wrhi;
117 HHOOK CWindowResizeHook::m_hookid = 0;
122 LRESULT CALLBACK
ResizeHook(
int code, WPARAM wParam, LPARAM lParam)
124 static int inhere = 0;
125 if (code >= 0 && inhere == 0)
128 CWPRETSTRUCT *rs = (CWPRETSTRUCT *)lParam;
129 if (rs->message == WM_WINDOWPOSCHANGED)
135 GetWindowRect(rs->hwnd, &r);
141 return ::CallNextHookEx(CWindowResizeHook::m_hookid, code, wParam, lParam);
static CWindowResizeHookItem * findItemByWindow(void *wnd)
NS_IMPL_ISUPPORTS1(sbDeviceCapabilitiesUtils, sbIDeviceCapabilitiesUtils) sbDeviceCapabilitiesUtils
LRESULT CALLBACK ResizeHook(int code, WPARAM wParam, LPARAM lParam)
static CWindowResizeHookItem * findItemByCallback(sbIWindowResizeHookCallback *cb)
virtual ~CWindowResizeHook()
sbIWindowResizeHookCallback * m_callback
static std::list< CWindowResizeHookItem * > m_items
static void * get(nsISupports *window)
Service for setting min/max limit callbacks to a window position and size - Prototypes.
WindowResizeHook callback interface This interface describes a callback for the WindowResizeHook serv...
WindowResizeHook service interface This is an interface to the WindowResizeHook service, used to used to register callback notifications of window resizing events.