ReactOS 0.4.16-dev-2610-ge2c92c0
Window Class Reference
Collaboration diagram for Window:

Public Member Functions

 Window (INT cx, INT cy, BOOL fAutoHide=FALSE)
 
virtual ~Window ()
 
virtual LRESULT CALLBACK WindowProcDx (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void DoAction ()
 
void TEST_Main ()
 
void TEST_Dragging ()
 
void TEST_AutoHide ()
 
void TEST_FullScreen ()
 

Static Public Member Functions

static BOOL DoRegisterClass (HINSTANCE hInstance)
 
static HWND DoCreateMainWnd (HINSTANCE hInstance, LPCTSTR pszText, INT cx, INT cy, DWORD style=WS_POPUP|WS_THICKFRAME|WS_CLIPCHILDREN, DWORD exstyle=WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW|WS_EX_TOPMOST, BOOL fAutoHide=FALSE)
 
static WindowGetAppbarData (HWND hwnd)
 
static LRESULT CALLBACK WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static DWORD WINAPI ActionThreadFunc (LPVOID args)
 

Public Attributes

IAccessible IAccessible_iface
 
IOleWindow IOleWindow_iface
 
IEnumVARIANT IEnumVARIANT_iface
 
LONG ref
 

Protected Member Functions

void OnCommand (HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
 
void OnPaint (HWND hwnd)
 
void OnRButtonDown (HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
 
void OnKey (HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags)
 
void OnAppBarCallback (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
BOOL AppBar_Register (HWND hwnd)
 
BOOL AppBar_UnRegister (HWND hwnd)
 
BOOL AppBar_GetTaskBarPos (HWND hwnd, PRECT prc)
 
HWND AppBar_GetAutoHideBar (HWND hwnd, UINT uSide)
 
BOOL AppBar_SetAutoHide (HWND hwnd, BOOL fHide)
 
BOOL AppBar_AutoHide (HWND hwnd)
 
BOOL AppBar_NoAutoHide (HWND hwnd)
 
BOOL AppBar_SetSide (HWND hwnd, UINT uSide)
 
void AppBar_SetAlwaysOnTop (HWND hwnd, BOOL fOnTop)
 
void AppBar_Hide (HWND hwnd)
 
void AppBar_UnHide (HWND hwnd)
 
void AppBar_SetAutoHideTimer (HWND hwnd)
 
void AppBar_SetAutoUnhideTimer (HWND hwnd)
 
void AppBar_Size (HWND hwnd)
 
void AppBar_QueryPos (HWND hwnd, LPRECT lprc)
 
void AppBar_QuerySetPos (UINT uEdge, LPRECT lprc, PAPPBARDATA pabd, BOOL fMove)
 
void AppBar_PosChanged (PAPPBARDATA pabd)
 
BOOL OnCreate (HWND hwnd, LPCREATESTRUCT lpCreateStruct)
 
void OnActivate (HWND hwnd, UINT state, HWND hwndActDeact, BOOL fMinimized)
 
void OnWindowPosChanged (HWND hwnd, const LPWINDOWPOS lpwpos)
 
void OnSize (HWND hwnd, UINT state, int cx, int cy)
 
void OnMove (HWND hwnd, int x, int y)
 
void OnNCDestroy (HWND hwnd)
 
void OnTimer (HWND hwnd, UINT id)
 
UINT OnNCHitTest (HWND hwnd, int x, int y)
 
void OnLButtonDown (HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
 
void OnMouseMove (HWND hwnd, int x, int y, UINT keyFlags)
 
void OnLButtonUp (HWND hwnd, int x, int y, UINT keyFlags)
 
void GetWorkArea (LPRECT prc) const
 
void Quit ()
 

Protected Attributes

HWND m_hwnd
 
BOOL m_fAutoHide
 
BOOL m_fOnTop
 
BOOL m_fHiding
 
UINT m_uSide
 
LONG m_cxWidth
 
LONG m_cyHeight
 
LONG m_cxSave
 
LONG m_cySave
 
BOOL m_fAppBarRegd
 
BOOL m_fMoving
 
BOOL m_bDragged
 
POINT m_ptDragOn
 
RECT m_rcAppBar
 
RECT m_rcDrag
 
BOOL m_bGotFullScreen
 

Detailed Description

Definition at line 28 of file window.c.

Constructor & Destructor Documentation

◆ Window()

Window::Window ( INT  cx,
INT  cy,
BOOL  fAutoHide = FALSE 
)
inline

Definition at line 146 of file SHAppBarMessage.cpp.

147 : m_hwnd(NULL)
148 , m_fAutoHide(fAutoHide)
149 , m_cxWidth(cx)
150 , m_cyHeight(cy)
151 {
152 }
#define NULL
Definition: types.h:112
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
BOOL m_fAutoHide

◆ ~Window()

virtual Window::~Window ( )
inlinevirtual

Definition at line 154 of file SHAppBarMessage.cpp.

154{ }

Member Function Documentation

◆ ActionThreadFunc()

static DWORD WINAPI Window::ActionThreadFunc ( LPVOID  args)
inlinestatic

Definition at line 1218 of file SHAppBarMessage.cpp.

1219 {
1220 Window *this_ = (Window *)args;
1221 this_->DoAction();
1222 return 0;
1223 }
Definition: window.c:28
void DoAction()
Definition: match.c:390

Referenced by OnCommand().

◆ AppBar_AutoHide()

BOOL Window::AppBar_AutoHide ( HWND  hwnd)
inlineprotected

Definition at line 385 of file SHAppBarMessage.cpp.

386 {
387 APPBARDATA abd = { sizeof(abd), hwnd };
388 abd.uEdge = m_uSide;
389
390 HWND hwndAutoHide = (HWND)SHAppBarMessage(ABM_GETAUTOHIDEBAR, &abd);
391 if (hwndAutoHide)
392 return FALSE;
393
394 abd.lParam = TRUE;
396 return FALSE;
397
401
402 RECT rc = m_rcAppBar;
403 switch (m_uSide)
404 {
405 case ABE_TOP:
406 rc.bottom = rc.top + 2;
407 break;
408 case ABE_BOTTOM:
409 rc.top = rc.bottom - 2;
410 break;
411 case ABE_LEFT:
412 rc.right = rc.left + 2;
413 break;
414 case ABE_RIGHT:
415 rc.left = rc.right - 2;
416 break;
417 }
418
419 AppBar_QueryPos(hwnd, &rc);
420 abd.rc = rc;
422 rc = abd.rc;
423
424 m_fHiding = TRUE;
425 SlideWindow(hwnd, &rc);
426
428 return TRUE;
429 }
void SlideWindow(HWND hwnd, LPRECT prc)
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HANDLE HWND
Definition: compat.h:19
UINT_PTR WINAPI SHAppBarMessage(_In_ DWORD dwMessage, _Inout_ PAPPBARDATA pData)
Definition: appbar.c:67
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ABE_BOTTOM
Definition: shellapi.h:20
#define ABM_SETAUTOHIDEBAR
Definition: shellapi.h:69
#define ABE_RIGHT
Definition: shellapi.h:19
#define ABE_TOP
Definition: shellapi.h:18
#define ABM_SETPOS
Definition: shellapi.h:64
#define ABE_LEFT
Definition: shellapi.h:17
#define ABM_GETAUTOHIDEBAR
Definition: shellapi.h:68
void AppBar_SetAutoHideTimer(HWND hwnd)
void AppBar_QueryPos(HWND hwnd, LPRECT lprc)
LPARAM lParam
Definition: shellapi.h:222
UINT uEdge
Definition: shellapi.h:220
LONG right
Definition: windef.h:108
LONG bottom
Definition: windef.h:109
LONG top
Definition: windef.h:107
LONG left
Definition: windef.h:106
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Referenced by AppBar_SetAutoHide(), OnLButtonUp(), and TEST_AutoHide().

◆ AppBar_GetAutoHideBar()

HWND Window::AppBar_GetAutoHideBar ( HWND  hwnd,
UINT  uSide 
)
inlineprotected

Definition at line 369 of file SHAppBarMessage.cpp.

370 {
371 APPBARDATA abd = { sizeof(abd), hwnd };
372 abd.uEdge = uSide;
373
375 }

Referenced by TEST_AutoHide().

◆ AppBar_GetTaskBarPos()

BOOL Window::AppBar_GetTaskBarPos ( HWND  hwnd,
PRECT  prc 
)
inlineprotected

Definition at line 359 of file SHAppBarMessage.cpp.

360 {
361 APPBARDATA abd = { sizeof(abd), hwnd };
362
364 return FALSE;
365 *prc = abd.rc;
366 return TRUE;
367 }
_Out_ LPRECT prc
Definition: ntgdi.h:1658
#define ABM_GETTASKBARPOS
Definition: shellapi.h:66

Referenced by TEST_Main().

◆ AppBar_Hide()

void Window::AppBar_Hide ( HWND  hwnd)
inlineprotected

Definition at line 505 of file SHAppBarMessage.cpp.

506 {
507 if (!m_fAutoHide)
508 return;
509
510 RECT rc = m_rcAppBar;
511 switch (m_uSide)
512 {
513 case ABE_TOP:
514 rc.bottom = rc.top + 2;
515 break;
516 case ABE_BOTTOM:
517 rc.top = rc.bottom - 2;
518 break;
519 case ABE_LEFT:
520 rc.right = rc.left + 2;
521 break;
522 case ABE_RIGHT:
523 rc.left = rc.right - 2;
524 break;
525 }
526
527 m_fHiding = TRUE;
528 SlideWindow(hwnd, &rc);
529 }

Referenced by OnActivate(), and OnTimer().

◆ AppBar_NoAutoHide()

BOOL Window::AppBar_NoAutoHide ( HWND  hwnd)
inlineprotected

Definition at line 431 of file SHAppBarMessage.cpp.

432 {
433 APPBARDATA abd = { sizeof(abd), hwnd };
434 abd.uEdge = m_uSide;
435 HWND hwndAutoHide = (HWND)SHAppBarMessage(ABM_GETAUTOHIDEBAR, &abd);
436 if (hwndAutoHide != hwnd)
437 return FALSE;
438
439 abd.lParam = FALSE;
441 return FALSE;
442
447 return TRUE;
448 }
BOOL AppBar_SetSide(HWND hwnd, UINT uSide)

Referenced by AppBar_SetAutoHide().

◆ AppBar_PosChanged()

void Window::AppBar_PosChanged ( PAPPBARDATA  pabd)
inlineprotected

Definition at line 631 of file SHAppBarMessage.cpp.

632 {
633 RECT rc;
635
636 if (m_fAutoHide)
637 {
638 m_rcAppBar = rc;
639 switch (m_uSide)
640 {
641 case ABE_TOP:
643 break;
644 case ABE_BOTTOM:
646 break;
647 case ABE_LEFT:
649 break;
650 case ABE_RIGHT:
652 break;
653 }
654 }
655
656 RECT rcWindow;
657 GetWindowRect(pabd->hWnd, &rcWindow);
658 INT cx = rcWindow.right - rcWindow.left;
659 INT cy = rcWindow.bottom - rcWindow.top;
660 switch (m_uSide)
661 {
662 case ABE_TOP:
663 rc.bottom = rc.top + cy;
664 break;
665 case ABE_BOTTOM:
666 rc.top = rc.bottom - cy;
667 break;
668 case ABE_LEFT:
669 rc.right = rc.left + cx;
670 break;
671 case ABE_RIGHT:
672 rc.left = rc.right - cx;
673 break;
674 }
675 AppBar_QuerySetPos(m_uSide, &rc, pabd, TRUE);
676 }
void AppBar_QuerySetPos(UINT uEdge, LPRECT lprc, PAPPBARDATA pabd, BOOL fMove)
HWND hWnd
Definition: shellapi.h:218
int32_t INT
Definition: typedefs.h:58
#define SM_CYSCREEN
Definition: winuser.h:971
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define SM_CXSCREEN
Definition: winuser.h:970
int WINAPI GetSystemMetrics(_In_ int)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)

Referenced by OnAppBarCallback().

◆ AppBar_QueryPos()

void Window::AppBar_QueryPos ( HWND  hwnd,
LPRECT  lprc 
)
inlineprotected

Definition at line 567 of file SHAppBarMessage.cpp.

568 {
569 APPBARDATA abd = { sizeof(abd), hwnd };
570 abd.rc = *lprc;
571 abd.uEdge = m_uSide;
572
573 INT cx = 0, cy = 0;
574 if (ABE_LEFT == abd.uEdge || ABE_RIGHT == abd.uEdge)
575 {
576 cx = abd.rc.right - abd.rc.left;
577 abd.rc.top = 0;
579 }
580 else
581 {
582 cy = abd.rc.bottom - abd.rc.top;
583 abd.rc.left = 0;
585 }
586
588
589 switch (abd.uEdge)
590 {
591 case ABE_LEFT:
592 abd.rc.right = abd.rc.left + cx;
593 break;
594 case ABE_RIGHT:
595 abd.rc.left = abd.rc.right - cx;
596 break;
597 case ABE_TOP:
598 abd.rc.bottom = abd.rc.top + cy;
599 break;
600 case ABE_BOTTOM:
601 abd.rc.top = abd.rc.bottom - cy;
602 break;
603 }
604
605 *lprc = abd.rc;
606 }
#define ABM_QUERYPOS
Definition: shellapi.h:63
_In_ int _Inout_ LPRECT lprc
Definition: winuser.h:4620

Referenced by AppBar_AutoHide(), AppBar_QuerySetPos(), and OnMouseMove().

◆ AppBar_QuerySetPos()

void Window::AppBar_QuerySetPos ( UINT  uEdge,
LPRECT  lprc,
PAPPBARDATA  pabd,
BOOL  fMove 
)
inlineprotected

Definition at line 608 of file SHAppBarMessage.cpp.

609 {
610 pabd->rc = *lprc;
611 pabd->uEdge = uEdge;
612 m_uSide = uEdge;
613
614 AppBar_QueryPos(pabd->hWnd, &pabd->rc);
615
617
618 if (fMove)
619 {
620 RECT rc = pabd->rc;
621 MoveWindow(pabd->hWnd, rc.left, rc.top,
622 rc.right - rc.left, rc.bottom - rc.top, TRUE);
623 }
624
625 if (!m_fAutoHide)
626 {
627 m_rcAppBar = pabd->rc;
628 }
629 }
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)

Referenced by AppBar_PosChanged(), AppBar_SetSide(), AppBar_Size(), and OnLButtonUp().

◆ AppBar_Register()

BOOL Window::AppBar_Register ( HWND  hwnd)
inlineprotected

Definition at line 345 of file SHAppBarMessage.cpp.

346 {
347 APPBARDATA abd = { sizeof(abd), hwnd, APPBAR_CALLBACK };
349 return m_fAppBarRegd;
350 }
#define APPBAR_CALLBACK
#define BOOL
Definition: nt_native.h:43
#define ABM_NEW
Definition: shellapi.h:61
BOOL m_fAppBarRegd

Referenced by OnCreate().

◆ AppBar_SetAlwaysOnTop()

void Window::AppBar_SetAlwaysOnTop ( HWND  hwnd,
BOOL  fOnTop 
)
inlineprotected

Definition at line 498 of file SHAppBarMessage.cpp.

499 {
501 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
502 m_fOnTop = fOnTop;
503 }
#define SWP_NOACTIVATE
Definition: winuser.h:1253
#define HWND_TOPMOST
Definition: winuser.h:1219
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOMOVE
Definition: winuser.h:1255
#define SWP_NOSIZE
Definition: winuser.h:1256
#define HWND_NOTOPMOST
Definition: winuser.h:1217

◆ AppBar_SetAutoHide()

BOOL Window::AppBar_SetAutoHide ( HWND  hwnd,
BOOL  fHide 
)
inlineprotected

Definition at line 377 of file SHAppBarMessage.cpp.

378 {
379 if (fHide)
380 return AppBar_AutoHide(hwnd);
381 else
382 return AppBar_NoAutoHide(hwnd);
383 }
BOOL AppBar_NoAutoHide(HWND hwnd)
BOOL AppBar_AutoHide(HWND hwnd)

Referenced by AppBar_SetSide(), and OnRButtonDown().

◆ AppBar_SetAutoHideTimer()

void Window::AppBar_SetAutoHideTimer ( HWND  hwnd)
inlineprotected

Definition at line 539 of file SHAppBarMessage.cpp.

540 {
541 if (m_fAutoHide)
542 {
544 }
545 }
#define IDT_AUTOHIDE
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)

Referenced by AppBar_AutoHide(), and AppBar_UnHide().

◆ AppBar_SetAutoUnhideTimer()

void Window::AppBar_SetAutoUnhideTimer ( HWND  hwnd)
inlineprotected

Definition at line 547 of file SHAppBarMessage.cpp.

548 {
549 if (m_fAutoHide && m_fHiding)
550 {
552 }
553 }
#define IDT_AUTOUNHIDE

Referenced by OnNCHitTest().

◆ AppBar_SetSide()

BOOL Window::AppBar_SetSide ( HWND  hwnd,
UINT  uSide 
)
inlineprotected

Definition at line 450 of file SHAppBarMessage.cpp.

451 {
452 HMONITOR hMon = ::MonitorFromWindow(hwnd, MONITOR_DEFAULTTOPRIMARY);
453 MONITORINFO mi = { sizeof(mi) };
454 ::GetMonitorInfo(hMon, &mi);
455 RECT rc = mi.rcWork;
456
457 BOOL fAutoHide = FALSE;
458 if (m_fAutoHide)
459 {
460 fAutoHide = m_fAutoHide;
464 }
465
466 switch (uSide)
467 {
468 case ABE_TOP:
469 rc.bottom = rc.top + m_cyHeight;
470 break;
471 case ABE_BOTTOM:
472 rc.top = rc.bottom - m_cyHeight;
473 break;
474 case ABE_LEFT:
475 rc.right = rc.left + m_cxWidth;
476 break;
477 case ABE_RIGHT:
478 rc.left = rc.right - m_cxWidth;
479 break;
480 }
481
482 APPBARDATA abd = { sizeof(abd), hwnd };
483 AppBar_QuerySetPos(uSide, &rc, &abd, TRUE);
484
485 if (fAutoHide)
486 {
488 m_fHiding = TRUE;
489
493 }
494
495 return TRUE;
496 }
static MONITORINFO mi
Definition: win.c:9400
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
BOOL AppBar_SetAutoHide(HWND hwnd, BOOL fHide)
#define SetWindowRedraw(hwnd, fRedraw)
Definition: windowsx.h:534
#define GetMonitorInfo
Definition: winuser.h:5957
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
#define RDW_UPDATENOW
Definition: winuser.h:1231
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:628
#define RDW_ALLCHILDREN
Definition: winuser.h:1232
#define RDW_INVALIDATE
Definition: winuser.h:1225

Referenced by AppBar_NoAutoHide(), OnCreate(), TEST_AutoHide(), and TEST_Main().

◆ AppBar_Size()

void Window::AppBar_Size ( HWND  hwnd)
inlineprotected

Definition at line 555 of file SHAppBarMessage.cpp.

556 {
557 if (m_fAppBarRegd)
558 {
559 APPBARDATA abd = { sizeof(abd), hwnd };
560
561 RECT rc;
562 GetWindowRect(hwnd, &rc);
563 AppBar_QuerySetPos(m_uSide, &rc, &abd, TRUE);
564 }
565 }

Referenced by OnMove(), and OnSize().

◆ AppBar_UnHide()

void Window::AppBar_UnHide ( HWND  hwnd)
inlineprotected

Definition at line 531 of file SHAppBarMessage.cpp.

532 {
535
537 }

Referenced by OnActivate(), and OnTimer().

◆ AppBar_UnRegister()

BOOL Window::AppBar_UnRegister ( HWND  hwnd)
inlineprotected

Definition at line 352 of file SHAppBarMessage.cpp.

353 {
354 APPBARDATA abd = { sizeof(abd), hwnd };
356 return !m_fAppBarRegd;
357 }
#define ABM_REMOVE
Definition: shellapi.h:62

Referenced by OnNCDestroy().

◆ DoAction()

void Window::DoAction ( )
inline

Definition at line 981 of file SHAppBarMessage.cpp.

982 {
983 trace("DoAction\n");
984
985 TEST_Main();
989
990 Quit();
991 }
#define trace
Definition: atltest.h:70
void TEST_Main()
void TEST_AutoHide()
void TEST_FullScreen()
void TEST_Dragging()

Referenced by ActionThreadFunc().

◆ DoCreateMainWnd()

static HWND Window::DoCreateMainWnd ( HINSTANCE  hInstance,
LPCTSTR  pszText,
INT  cx,
INT  cy,
DWORD  style = WS_POPUP | WS_THICKFRAME | WS_CLIPCHILDREN,
DWORD  exstyle = WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST,
BOOL  fAutoHide = FALSE 
)
inlinestatic

Definition at line 169 of file SHAppBarMessage.cpp.

173 {
174 Window *this_ = new Window(cx, cy, fAutoHide);
175 HWND hwnd = CreateWindowEx(exstyle, s_szName, pszText, style,
177 NULL, NULL, hInstance, this_);
180 return hwnd;
181 }
static const TCHAR s_szName[]
Arabic default style
Definition: afstyles.h:94
HINSTANCE hInstance
Definition: charmap.c:19
#define SW_SHOWNORMAL
Definition: winuser.h:781
#define CreateWindowEx
Definition: winuser.h:5921
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI UpdateWindow(_In_ HWND)
#define CW_USEDEFAULT
Definition: winuser.h:225

◆ DoRegisterClass()

static BOOL Window::DoRegisterClass ( HINSTANCE  hInstance)
inlinestatic

Definition at line 156 of file SHAppBarMessage.cpp.

157 {
158 WNDCLASS wc;
159 ZeroMemory(&wc, sizeof(wc));
161 wc.hInstance = hInstance;
164 wc.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
166 return !!RegisterClass(&wc);
167 }
#define ZeroMemory
Definition: minwinbase.h:31
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
HBRUSH hbrBackground
Definition: winuser.h:3278
HICON hIcon
Definition: winuser.h:3276
HINSTANCE hInstance
Definition: winuser.h:3275
HCURSOR hCursor
Definition: winuser.h:3277
LPCSTR lpszClassName
Definition: winuser.h:3280
WNDPROC lpfnWndProc
Definition: winuser.h:3272
#define IDC_ARROW
Definition: winuser.h:695
#define IDI_APPLICATION
Definition: winuser.h:712
#define LoadIcon
Definition: winuser.h:5979
#define LoadCursor
Definition: winuser.h:5978
#define RegisterClass
Definition: winuser.h:6002
#define COLOR_3DFACE
Definition: winuser.h:940

◆ GetAppbarData()

static Window * Window::GetAppbarData ( HWND  hwnd)
inlinestatic

Definition at line 183 of file SHAppBarMessage.cpp.

184 {
186 }
#define GetWindowLongPtr
Definition: treelist.c:73
#define GWLP_USERDATA
Definition: treelist.c:63

Referenced by WindowProc().

◆ GetWorkArea()

void Window::GetWorkArea ( LPRECT  prc) const
inlineprotected

Definition at line 969 of file SHAppBarMessage.cpp.

970 {
971 SystemParametersInfoW(SPI_GETWORKAREA, 0, prc, 0);
972 }
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)

Referenced by TEST_Dragging(), and TEST_Main().

◆ OnActivate()

void Window::OnActivate ( HWND  hwnd,
UINT  state,
HWND  hwndActDeact,
BOOL  fMinimized 
)
inlineprotected

Definition at line 697 of file SHAppBarMessage.cpp.

698 {
699 APPBARDATA abd = { sizeof(abd), hwnd };
701
702 switch (state)
703 {
704 case WA_ACTIVE:
705 case WA_CLICKACTIVE:
708 break;
709
710 case WA_INACTIVE:
712 break;
713 }
714 }
static int state
Definition: maze.c:121
#define ABM_ACTIVATE
Definition: shellapi.h:67
void AppBar_UnHide(HWND hwnd)
void AppBar_Hide(HWND hwnd)
#define WA_INACTIVE
Definition: winuser.h:2664
#define WA_ACTIVE
Definition: winuser.h:2665
#define WA_CLICKACTIVE
Definition: winuser.h:2666
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)

Referenced by WindowProcDx().

◆ OnAppBarCallback()

void Window::OnAppBarCallback ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
inlineprotected

Definition at line 311 of file SHAppBarMessage.cpp.

312 {
313 static HWND s_hwndZOrder = NULL;
314
315 switch (wParam)
316 {
317 case ABN_STATECHANGE:
318 break;
319
322 if (lParam)
323 {
324 s_hwndZOrder = GetWindow(hwnd, GW_HWNDPREV);
325 SetWindowPos(hwnd, HWND_BOTTOM, 0, 0, 0, 0,
327 }
328 else
329 {
330 SetWindowPos(hwnd, m_fOnTop ? HWND_TOPMOST : s_hwndZOrder,
331 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
332 s_hwndZOrder = NULL;
333 }
334 break;
335
336 case ABN_POSCHANGED:
337 {
338 APPBARDATA abd = { sizeof(abd), hwnd };
339 AppBar_PosChanged(&abd);
340 }
341 break;
342 }
343 }
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define ABN_FULLSCREENAPP
Definition: shellapi.h:74
#define ABN_STATECHANGE
Definition: shellapi.h:72
#define ABN_POSCHANGED
Definition: shellapi.h:73
void AppBar_PosChanged(PAPPBARDATA pabd)
BOOL m_bGotFullScreen
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
#define GW_HWNDPREV
Definition: winuser.h:773
#define HWND_BOTTOM
Definition: winuser.h:1216

Referenced by WindowProcDx().

◆ OnCommand()

void Window::OnCommand ( HWND  hwnd,
int  id,
HWND  hwndCtl,
UINT  codeNotify 
)
inlineprotected

Definition at line 255 of file SHAppBarMessage.cpp.

256 {
258 switch (id)
259 {
260 case ID_ACTION:
262 break;
263 case ID_ACTION + 1:
265 if (!hThread)
266 {
267 skip("failed to create thread\n");
270 return;
271 }
273 break;
274 case ID_QUIT:
278 break;
279 }
280 }
#define ID_ACTION
#define ID_QUIT
static HWND s_hwnd2
static HWND s_hwnd1
#define skip(...)
Definition: atltest.h:64
#define CloseHandle
Definition: compat.h:739
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
HANDLE hThread
Definition: wizard.c:28
static DWORD WINAPI ActionThreadFunc(LPVOID args)
#define WM_CLOSE
Definition: winuser.h:1649
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_COMMAND
Definition: winuser.h:1768
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by WindowProcDx().

◆ OnCreate()

BOOL Window::OnCreate ( HWND  hwnd,
LPCREATESTRUCT  lpCreateStruct 
)
inlineprotected

Definition at line 678 of file SHAppBarMessage.cpp.

679 {
680 m_hwnd = hwnd;
681 m_fOnTop = TRUE;
683
689
692
693 trace("OnCreate(%p) done\n", hwnd);
694 return TRUE;
695 }
BOOL AppBar_Register(HWND hwnd)

Referenced by WindowProcDx().

◆ OnKey()

void Window::OnKey ( HWND  hwnd,
UINT  vk,
BOOL  fDown,
int  cRepeat,
UINT  flags 
)
inlineprotected

Definition at line 305 of file SHAppBarMessage.cpp.

306 {
307 if (vk == VK_ESCAPE)
309 }
unsigned short vk
Definition: console.c:118
#define VK_ESCAPE
Definition: winuser.h:2250

Referenced by WindowProcDx().

◆ OnLButtonDown()

void Window::OnLButtonDown ( HWND  hwnd,
BOOL  fDoubleClick,
int  x,
int  y,
UINT  keyFlags 
)
inlineprotected

Definition at line 829 of file SHAppBarMessage.cpp.

830 {
831 m_fMoving = TRUE;
835 }
POINT m_ptDragOn
HWND WINAPI SetCapture(_In_ HWND hWnd)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:3064

Referenced by WindowProcDx().

◆ OnLButtonUp()

void Window::OnLButtonUp ( HWND  hwnd,
int  x,
int  y,
UINT  keyFlags 
)
inlineprotected

Definition at line 923 of file SHAppBarMessage.cpp.

924 {
925 if (!m_fMoving)
926 return;
927
928 OnMouseMove(hwnd, x, y, keyFlags);
929
931
933
934 if (m_fAutoHide)
935 {
936 switch (m_uSide)
937 {
938 case ABE_TOP:
940 break;
941 case ABE_BOTTOM:
943 break;
944 case ABE_LEFT:
946 break;
947 case ABE_RIGHT:
949 break;
950 }
951 }
952
953 if (m_bDragged)
954 {
955 if (m_fAutoHide)
956 {
958 }
959 else
960 {
961 APPBARDATA abd = { sizeof(abd), hwnd };
963 }
964 }
965
967 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
void OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags)
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890

Referenced by WindowProcDx().

◆ OnMouseMove()

void Window::OnMouseMove ( HWND  hwnd,
int  x,
int  y,
UINT  keyFlags 
)
inlineprotected

Definition at line 837 of file SHAppBarMessage.cpp.

838 {
839 if (!m_fMoving)
840 return;
841
842 POINT pt;
846 {
848 }
849
850 INT cxScreen = GetSystemMetrics(SM_CXSCREEN);
851 INT cyScreen = GetSystemMetrics(SM_CYSCREEN);
852
853 DWORD dx, dy;
854 UINT ix, iy;
855 if (pt.x < cxScreen / 2)
856 {
857 dx = pt.x;
858 ix = ABE_LEFT;
859 }
860 else
861 {
862 dx = cxScreen - pt.x;
863 ix = ABE_RIGHT;
864 }
865
866 if (pt.y < cyScreen / 2)
867 {
868 dy = pt.y;
869 iy = ABE_TOP;
870 }
871 else
872 {
873 dy = cyScreen - pt.y;
874 iy = ABE_BOTTOM;
875 }
876
877 if (cxScreen * dy > cyScreen * dx)
878 {
879 m_rcDrag.top = 0;
880 m_rcDrag.bottom = cyScreen;
881 if (ix == ABE_LEFT)
882 {
884 m_rcDrag.left = 0;
886 }
887 else
888 {
890 m_rcDrag.right = cxScreen;
892 }
893 }
894 else
895 {
896 m_rcDrag.left = 0;
897 m_rcDrag.right = cxScreen;
898 if (iy == ABE_TOP)
899 {
901 m_rcDrag.top = 0;
903 }
904 else
905 {
907 m_rcDrag.bottom = cyScreen;
909 }
910 }
911
913
914 if (m_bDragged)
915 {
919 TRUE);
920 }
921 }
_ACRTIMP __msvcrt_long __cdecl labs(__msvcrt_long)
Definition: math.c:680
#define pt(x, y)
Definition: drawing.c:79
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97
unsigned int UINT
Definition: ndis.h:50
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
int iy
Definition: tritemp.h:491
#define SM_CXDRAG
Definition: winuser.h:1039
#define SM_CYDRAG
Definition: winuser.h:1040

Referenced by OnLButtonUp(), and WindowProcDx().

◆ OnMove()

void Window::OnMove ( HWND  hwnd,
int  x,
int  y 
)
inlineprotected

Definition at line 748 of file SHAppBarMessage.cpp.

749 {
750 if (m_fMoving || m_fAutoHide)
751 return;
752
753 if (!m_fHiding)
755 }
void AppBar_Size(HWND hwnd)

Referenced by WindowProcDx().

◆ OnNCDestroy()

void Window::OnNCDestroy ( HWND  hwnd)
inlineprotected

Definition at line 757 of file SHAppBarMessage.cpp.

758 {
760
761 m_hwnd = NULL;
763 delete this;
764 }
BOOL AppBar_UnRegister(HWND hwnd)
#define SetWindowLongPtr
Definition: treelist.c:70

Referenced by WindowProcDx().

◆ OnNCHitTest()

UINT Window::OnNCHitTest ( HWND  hwnd,
int  x,
int  y 
)
inlineprotected

Definition at line 808 of file SHAppBarMessage.cpp.

809 {
811
813
814 if (m_uSide == ABE_TOP && uHitTest == HTBOTTOM)
815 return HTBOTTOM;
816
817 if (m_uSide == ABE_BOTTOM && uHitTest == HTTOP)
818 return HTTOP;
819
820 if (m_uSide == ABE_LEFT && uHitTest == HTRIGHT)
821 return HTRIGHT;
822
823 if (m_uSide == ABE_RIGHT && uHitTest == HTLEFT)
824 return HTLEFT;
825
826 return HTCLIENT;
827 }
#define DefWindowProc
Definition: ros2win.h:31
void AppBar_SetAutoUnhideTimer(HWND hwnd)
#define FORWARD_WM_NCHITTEST(hwnd, x, y, fn)
Definition: windowsx.h:191
#define HTBOTTOM
Definition: winuser.h:2529
#define HTRIGHT
Definition: winuser.h:2525
#define HTCLIENT
Definition: winuser.h:2511
#define HTTOP
Definition: winuser.h:2526
#define HTLEFT
Definition: winuser.h:2523

Referenced by WindowProcDx().

◆ OnPaint()

void Window::OnPaint ( HWND  hwnd)
inlineprotected

Definition at line 282 of file SHAppBarMessage.cpp.

283 {
284 PAINTSTRUCT ps;
285
286 TCHAR szText[64];
287 GetWindowText(hwnd, szText, 64);
288
289 RECT rc;
290 GetClientRect(hwnd, &rc);
291
292 if (HDC hdc = BeginPaint(hwnd, &ps))
293 {
294 DrawText(hdc, szText, -1, &rc, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
295 EndPaint(hwnd, &ps);
296 }
297 }
char TCHAR
Definition: tchar.h:1402
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:88
#define DT_CENTER
Definition: winuser.h:527
#define DT_SINGLELINE
Definition: winuser.h:540
#define DrawText
Definition: winuser.h:5937
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define GetWindowText
Definition: winuser.h:5964
#define DT_VCENTER
Definition: winuser.h:543
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)

Referenced by WindowProcDx().

◆ OnRButtonDown()

void Window::OnRButtonDown ( HWND  hwnd,
BOOL  fDoubleClick,
int  x,
int  y,
UINT  keyFlags 
)
inlineprotected

Definition at line 299 of file SHAppBarMessage.cpp.

Referenced by WindowProcDx().

◆ OnSize()

void Window::OnSize ( HWND  hwnd,
UINT  state,
int  cx,
int  cy 
)
inlineprotected

Definition at line 724 of file SHAppBarMessage.cpp.

725 {
726 RECT rcWindow;
727
728 if (m_fMoving || (m_fAutoHide && m_fHiding))
729 return;
730
731 if (!m_fHiding)
732 {
733 if (!m_fAutoHide)
735
736 GetWindowRect(hwnd, &rcWindow);
737 m_rcAppBar = rcWindow;
738
739 if (m_uSide == ABE_TOP || m_uSide == ABE_BOTTOM)
740 m_cyHeight = m_cySave = rcWindow.bottom - rcWindow.top;
741 else
742 m_cxWidth = m_cxSave = rcWindow.right - rcWindow.left;
743 }
744
746 }
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)

Referenced by WindowProcDx().

◆ OnTimer()

void Window::OnTimer ( HWND  hwnd,
UINT  id 
)
inlineprotected

Definition at line 766 of file SHAppBarMessage.cpp.

767 {
768 POINT pt;
769 RECT rc;
770 HWND hwndActive;
771
772 switch (id)
773 {
774 case IDT_AUTOHIDE:
775 if (m_fAutoHide && !m_fHiding && !m_fMoving)
776 {
778 GetWindowRect(hwnd, &rc);
779 hwndActive = GetForegroundWindow();
780
781 if (!PtInRect(&rc, pt) &&
782 hwndActive != hwnd &&
783 hwndActive != NULL &&
784 GetWindowOwner(hwndActive) != hwnd)
785 {
786 KillTimer(hwnd, id);
788 }
789 }
790 break;
791
792 case IDT_AUTOUNHIDE:
793 KillTimer(hwnd, id);
794
795 if (m_fAutoHide && m_fHiding)
796 {
798 GetWindowRect(hwnd, &rc);
799 if (PtInRect(&rc, pt))
800 {
802 }
803 }
804 break;
805 }
806 }
#define GetWindowOwner(hwnd)
Definition: windowsx.h:314
HWND WINAPI GetForegroundWindow(void)
Definition: ntwrapper.h:392
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)

Referenced by WindowProcDx().

◆ OnWindowPosChanged()

void Window::OnWindowPosChanged ( HWND  hwnd,
const LPWINDOWPOS  lpwpos 
)
inlineprotected

Definition at line 716 of file SHAppBarMessage.cpp.

717 {
718 APPBARDATA abd = { sizeof(abd), hwnd };
720
722 }
#define ABM_WINDOWPOSCHANGED
Definition: shellapi.h:70
#define FORWARD_WM_WINDOWPOSCHANGED(hwnd, lpwpos, fn)
Definition: windowsx.h:240

Referenced by WindowProcDx().

◆ Quit()

void Window::Quit ( )
inlineprotected

Definition at line 974 of file SHAppBarMessage.cpp.

975 {
978 }
#define PostMessage
Definition: winuser.h:5998

Referenced by DoAction().

◆ TEST_AutoHide()

void Window::TEST_AutoHide ( )
inline

Definition at line 1134 of file SHAppBarMessage.cpp.

1135 {
1136 trace("TEST_AutoHide\n");
1137
1138 RECT rc;
1139
1140 m_cxWidth = 80;
1141 m_cyHeight = 40;
1145 ok_ptr(hwndRet, s_hwnd2);
1147
1148 GetWindowRect(s_hwnd2, &rc);
1152 ok_long(rc.bottom, s_rcWorkArea.top + 2);
1153
1155 LEFT_DOWN();
1156 LEFT_UP();
1158
1159 GetWindowRect(s_hwnd2, &rc);
1163 ok_long(rc.bottom, s_rcWorkArea.top + 40);
1164
1166 LEFT_DOWN();
1167 LEFT_UP();
1169
1170 GetWindowRect(s_hwnd2, &rc);
1174 ok_long(rc.bottom, s_rcWorkArea.top + 2);
1175
1178
1179 GetWindowRect(s_hwnd2, &rc);
1183 ok_long(rc.bottom, s_rcWorkArea.top + 40);
1184
1189 ok_ptr(hwndRet, s_hwnd2);
1190
1191 GetWindowRect(s_hwnd2, &rc);
1192 ok_long(rc.left, s_rcWorkArea.right - 2);
1196
1199
1200 GetWindowRect(s_hwnd2, &rc);
1201 ok_long(rc.left, s_rcWorkArea.right - 2);
1205 }
#define MOVE(x, y)
#define LEFT_UP()
#define LEFT_DOWN()
static RECT s_rcWorkArea
#define LONG_INTERVAL
#define ok_long(expression, result)
Definition: atltest.h:133
#define ok_ptr(expression, result)
Definition: atltest.h:108
HWND AppBar_GetAutoHideBar(HWND hwnd, UINT uSide)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:726
BOOL WINAPI SetForegroundWindow(_In_ HWND)

Referenced by DoAction().

◆ TEST_Dragging()

void Window::TEST_Dragging ( )
inline

Definition at line 1098 of file SHAppBarMessage.cpp.

1099 {
1100 trace("TEST_Dragging\n");
1101
1102 RECT rc, rcWork;
1103 POINT pt;
1104
1105 GetWindowRect(s_hwnd2, &rc);
1106 pt.x = (rc.left + rc.right) / 2;
1107 pt.y = (rc.top + rc.bottom) / 2;
1108 MOVE(pt.x, pt.y);
1109 LEFT_DOWN();
1110 Sleep(INTERVAL);
1111
1113 pt.y = s_rcWorkArea.top;
1114 MOVE(pt.x, pt.y);
1115 Sleep(INTERVAL);
1116
1117 pt.x = s_rcWorkArea.right - 1;
1119 MOVE(pt.x, pt.y);
1120 LEFT_UP();
1122
1123 GetWindowRect(s_hwnd2, &rc);
1124 GetWorkArea(&rcWork);
1125 ok_long(rc.left, s_rcWorkArea.right - 30);
1128 ok_long(rcWork.left, s_rcWorkArea.left);
1129 ok_long(rcWork.top, s_rcWorkArea.top);
1130 ok_long(rcWork.right, s_rcWorkArea.right - 30);
1132 }
#define INTERVAL
void GetWorkArea(LPRECT prc) const

Referenced by DoAction().

◆ TEST_FullScreen()

void Window::TEST_FullScreen ( )
inline

Definition at line 1207 of file SHAppBarMessage.cpp.

1208 {
1209 trace("TEST_FullScreen\n");
1212 MoveWindow(s_hwnd2, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);
1215 MoveWindow(s_hwnd2, rc.left, rc.top, 100, 100, TRUE);
1216 }
static RECT s_rcPrimaryMonitor
#define ok_int(expression, result)
Definition: atltest.h:134

Referenced by DoAction().

◆ TEST_Main()

void Window::TEST_Main ( )
inline

Definition at line 993 of file SHAppBarMessage.cpp.

994 {
995 trace("TEST_Main\n");
997
998 POINT pt;
999 RECT rc1, rc2, rcWork;
1000
1002 ok_int(ret, TRUE);
1003 ok_int(EqualRect(&rc1, &s_rcTaskBar), TRUE);
1004
1005 GetWindowRect(s_hwnd1, &rc1);
1007 GetWorkArea(&rcWork);
1011 ok_long(rc1.bottom, s_rcWorkArea.top + 80);
1013 ok_long(rc2.top, s_rcWorkArea.top + 80);
1014 ok_long(rc2.right, s_rcWorkArea.right);
1015 ok_long(rc2.bottom, s_rcWorkArea.top + 110);
1016 ok_long(rcWork.left, s_rcWorkArea.left);
1017 ok_long(rcWork.top, s_rcWorkArea.top + 110);
1022
1024 GetWorkArea(&rcWork);
1027 ok_long(rc2.right, s_rcWorkArea.right);
1028 ok_long(rc2.bottom, s_rcWorkArea.top + 30);
1029 ok_long(rcWork.left, s_rcWorkArea.left);
1030 ok_long(rcWork.top, s_rcWorkArea.top + 30);
1034 Sleep(INTERVAL);
1035
1037 GetWorkArea(&rcWork);
1040 ok_long(rc2.right, s_rcWorkArea.left + 30);
1041 ok_long(rcWork.left, s_rcWorkArea.left + 30);
1042 ok_long(rcWork.top, s_rcWorkArea.top);
1046 Sleep(INTERVAL);
1047
1049 GetWorkArea(&rcWork);
1052 ok_long(rc2.right, s_rcWorkArea.right);
1053 ok_long(rc2.bottom, s_rcWorkArea.top + 30);
1054 ok_long(rcWork.left, s_rcWorkArea.left);
1055 ok_long(rcWork.top, s_rcWorkArea.top + 30);
1059 Sleep(INTERVAL);
1060
1062 GetWorkArea(&rcWork);
1063 ok_long(rc2.left, s_rcWorkArea.right - 30);
1065 ok_long(rc2.right, s_rcWorkArea.right);
1066 ok_long(rcWork.left, s_rcWorkArea.left);
1067 ok_long(rcWork.top, s_rcWorkArea.top);
1068 ok_long(rcWork.right, s_rcWorkArea.right - 30);
1070 Sleep(INTERVAL);
1071
1073 pt.x = (rc2.left + rc2.right) / 2;
1074 pt.y = (rc2.top + rc2.bottom) / 2;
1075 MOVE(pt.x, pt.y);
1076 LEFT_DOWN();
1077 MOVE(pt.x + 64, pt.y + 64);
1078 Sleep(INTERVAL);
1079
1080 pt.x = s_rcWorkArea.left + 80;
1082 MOVE(pt.x, pt.y);
1083 LEFT_UP();
1084 Sleep(INTERVAL);
1085
1087 GetWorkArea(&rcWork);
1090 ok_long(rc2.right, s_rcWorkArea.left + 30);
1091 ok_long(rcWork.left, s_rcWorkArea.left + 30);
1092 ok_long(rcWork.top, s_rcWorkArea.top);
1095 Sleep(INTERVAL);
1096 }
static RECT s_rcTaskBar
static const WCHAR rc2[]
Definition: oid.c:1216
return ret
Definition: mutex.c:146
BOOL AppBar_GetTaskBarPos(HWND hwnd, PRECT prc)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)

Referenced by DoAction().

◆ WindowProc()

static LRESULT CALLBACK Window::WindowProc ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
inlinestatic

Definition at line 223 of file SHAppBarMessage.cpp.

224 {
225 Window *this_ = GetAppbarData(hwnd);
226 if (uMsg == WM_CREATE)
227 {
229 this_ = (Window *)pCS->lpCreateParams;
231 }
232 if (this_)
233 return this_->WindowProcDx(hwnd, uMsg, wParam, lParam);
234 return DefWindowProc(hwnd, uMsg, wParam, lParam);
235 }
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
static Window * GetAppbarData(HWND hwnd)
virtual LRESULT CALLBACK WindowProcDx(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
LPVOID lpCreateParams
Definition: winuser.h:3048
CREATESTRUCTA * LPCREATESTRUCT
Definition: winuser.h:5892
#define WM_CREATE
Definition: winuser.h:1636

Referenced by DoRegisterClass().

◆ WindowProcDx()

virtual LRESULT CALLBACK Window::WindowProcDx ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
inlinevirtual

Definition at line 189 of file SHAppBarMessage.cpp.

190 {
191#ifdef VERBOSE
192 MD_msgdump(hwnd, uMsg, wParam, lParam);
193#endif
194 switch (uMsg)
195 {
211
212 case APPBAR_CALLBACK:
214 break;
215
216 default:
217 return DefWindowProc(hwnd, uMsg, wParam, lParam);
218 }
219 return 0;
220 }
static __inline LRESULT MSGDUMP_API MD_msgdump(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: msgdump.h:4655
void OnSize(HWND hwnd, UINT state, int cx, int cy)
void OnTimer(HWND hwnd, UINT id)
UINT OnNCHitTest(HWND hwnd, int x, int y)
void OnMove(HWND hwnd, int x, int y)
BOOL OnCreate(HWND hwnd, LPCREATESTRUCT lpCreateStruct)
void OnLButtonUp(HWND hwnd, int x, int y, UINT keyFlags)
void OnAppBarCallback(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
void OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
void OnNCDestroy(HWND hwnd)
void OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
void OnWindowPosChanged(HWND hwnd, const LPWINDOWPOS lpwpos)
void OnPaint(HWND hwnd)
void OnActivate(HWND hwnd, UINT state, HWND hwndActDeact, BOOL fMinimized)
void OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags)
void OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
#define HANDLE_MSG(hwnd, message, fn)
Definition: windowsx.h:322
#define WM_PAINT
Definition: winuser.h:1648
#define WM_SIZE
Definition: winuser.h:1639
#define WM_NCHITTEST
Definition: winuser.h:1714
#define WM_MOUSEMOVE
Definition: winuser.h:1803
#define WM_LBUTTONDOWN
Definition: winuser.h:1804
#define WM_ACTIVATE
Definition: winuser.h:1640
#define WM_RBUTTONDOWN
Definition: winuser.h:1807
#define WM_TIMER
Definition: winuser.h:1770
#define WM_LBUTTONUP
Definition: winuser.h:1805
#define WM_MOVE
Definition: winuser.h:1638
#define WM_NCDESTROY
Definition: winuser.h:1712
#define WM_KEYDOWN
Definition: winuser.h:1743
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1690

Referenced by WindowProc().

Member Data Documentation

◆ IAccessible_iface

IAccessible Window::IAccessible_iface

Definition at line 29 of file window.c.

◆ IEnumVARIANT_iface

IEnumVARIANT Window::IEnumVARIANT_iface

Definition at line 31 of file window.c.

◆ IOleWindow_iface

IOleWindow Window::IOleWindow_iface

Definition at line 30 of file window.c.

◆ m_bDragged

BOOL Window::m_bDragged
protected

Definition at line 249 of file SHAppBarMessage.cpp.

Referenced by OnCreate(), OnLButtonDown(), OnLButtonUp(), and OnMouseMove().

◆ m_bGotFullScreen

BOOL Window::m_bGotFullScreen
protected

Definition at line 253 of file SHAppBarMessage.cpp.

Referenced by OnAppBarCallback(), and TEST_FullScreen().

◆ m_cxSave

LONG Window::m_cxSave
protected

◆ m_cxWidth

LONG Window::m_cxWidth
protected

◆ m_cyHeight

LONG Window::m_cyHeight
protected

◆ m_cySave

LONG Window::m_cySave
protected

◆ m_fAppBarRegd

BOOL Window::m_fAppBarRegd
protected

Definition at line 247 of file SHAppBarMessage.cpp.

Referenced by AppBar_Register(), AppBar_Size(), AppBar_UnRegister(), and OnCreate().

◆ m_fAutoHide

◆ m_fHiding

BOOL Window::m_fHiding
protected

◆ m_fMoving

BOOL Window::m_fMoving
protected

◆ m_fOnTop

BOOL Window::m_fOnTop
protected

Definition at line 240 of file SHAppBarMessage.cpp.

Referenced by AppBar_SetAlwaysOnTop(), OnAppBarCallback(), and OnCreate().

◆ m_hwnd

HWND Window::m_hwnd
protected

Definition at line 238 of file SHAppBarMessage.cpp.

Referenced by OnCreate(), and OnNCDestroy().

◆ m_ptDragOn

POINT Window::m_ptDragOn
protected

Definition at line 250 of file SHAppBarMessage.cpp.

Referenced by OnLButtonDown(), and OnMouseMove().

◆ m_rcAppBar

RECT Window::m_rcAppBar
protected

◆ m_rcDrag

RECT Window::m_rcDrag
protected

Definition at line 252 of file SHAppBarMessage.cpp.

Referenced by OnLButtonUp(), and OnMouseMove().

◆ m_uSide

◆ ref

LONG Window::ref

Definition at line 33 of file window.c.


The documentation for this class was generated from the following files: