ReactOS 0.4.17-dev-444-g71ee754
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 132 of file SHAppBarMessage.cpp.

133 : m_hwnd(NULL)
134 , m_fAutoHide(fAutoHide)
135 , m_cxWidth(cx)
136 , m_cyHeight(cy)
137 {
138 }
#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 140 of file SHAppBarMessage.cpp.

140{ }

Member Function Documentation

◆ ActionThreadFunc()

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

Definition at line 1204 of file SHAppBarMessage.cpp.

1205 {
1206 Window *this_ = (Window *)args;
1207 this_->DoAction();
1208 return 0;
1209 }
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 371 of file SHAppBarMessage.cpp.

372 {
373 APPBARDATA abd = { sizeof(abd), hwnd };
374 abd.uEdge = m_uSide;
375
376 HWND hwndAutoHide = (HWND)SHAppBarMessage(ABM_GETAUTOHIDEBAR, &abd);
377 if (hwndAutoHide)
378 return FALSE;
379
380 abd.lParam = TRUE;
382 return FALSE;
383
387
388 RECT rc = m_rcAppBar;
389 switch (m_uSide)
390 {
391 case ABE_TOP:
392 rc.bottom = rc.top + 2;
393 break;
394 case ABE_BOTTOM:
395 rc.top = rc.bottom - 2;
396 break;
397 case ABE_LEFT:
398 rc.right = rc.left + 2;
399 break;
400 case ABE_RIGHT:
401 rc.left = rc.right - 2;
402 break;
403 }
404
405 AppBar_QueryPos(hwnd, &rc);
406 abd.rc = rc;
408 rc = abd.rc;
409
410 m_fHiding = TRUE;
411 SlideWindow(hwnd, &rc);
412
414 return TRUE;
415 }
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 355 of file SHAppBarMessage.cpp.

356 {
357 APPBARDATA abd = { sizeof(abd), hwnd };
358 abd.uEdge = uSide;
359
361 }

Referenced by TEST_AutoHide().

◆ AppBar_GetTaskBarPos()

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

Definition at line 345 of file SHAppBarMessage.cpp.

346 {
347 APPBARDATA abd = { sizeof(abd), hwnd };
348
350 return FALSE;
351 *prc = abd.rc;
352 return TRUE;
353 }
_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 491 of file SHAppBarMessage.cpp.

492 {
493 if (!m_fAutoHide)
494 return;
495
496 RECT rc = m_rcAppBar;
497 switch (m_uSide)
498 {
499 case ABE_TOP:
500 rc.bottom = rc.top + 2;
501 break;
502 case ABE_BOTTOM:
503 rc.top = rc.bottom - 2;
504 break;
505 case ABE_LEFT:
506 rc.right = rc.left + 2;
507 break;
508 case ABE_RIGHT:
509 rc.left = rc.right - 2;
510 break;
511 }
512
513 m_fHiding = TRUE;
514 SlideWindow(hwnd, &rc);
515 }

Referenced by OnActivate(), and OnTimer().

◆ AppBar_NoAutoHide()

BOOL Window::AppBar_NoAutoHide ( HWND  hwnd)
inlineprotected

Definition at line 417 of file SHAppBarMessage.cpp.

418 {
419 APPBARDATA abd = { sizeof(abd), hwnd };
420 abd.uEdge = m_uSide;
421 HWND hwndAutoHide = (HWND)SHAppBarMessage(ABM_GETAUTOHIDEBAR, &abd);
422 if (hwndAutoHide != hwnd)
423 return FALSE;
424
425 abd.lParam = FALSE;
427 return FALSE;
428
433 return TRUE;
434 }
BOOL AppBar_SetSide(HWND hwnd, UINT uSide)

Referenced by AppBar_SetAutoHide().

◆ AppBar_PosChanged()

void Window::AppBar_PosChanged ( PAPPBARDATA  pabd)
inlineprotected

Definition at line 617 of file SHAppBarMessage.cpp.

618 {
619 RECT rc;
621
622 if (m_fAutoHide)
623 {
624 m_rcAppBar = rc;
625 switch (m_uSide)
626 {
627 case ABE_TOP:
629 break;
630 case ABE_BOTTOM:
632 break;
633 case ABE_LEFT:
635 break;
636 case ABE_RIGHT:
638 break;
639 }
640 }
641
642 RECT rcWindow;
643 GetWindowRect(pabd->hWnd, &rcWindow);
644 INT cx = rcWindow.right - rcWindow.left;
645 INT cy = rcWindow.bottom - rcWindow.top;
646 switch (m_uSide)
647 {
648 case ABE_TOP:
649 rc.bottom = rc.top + cy;
650 break;
651 case ABE_BOTTOM:
652 rc.top = rc.bottom - cy;
653 break;
654 case ABE_LEFT:
655 rc.right = rc.left + cx;
656 break;
657 case ABE_RIGHT:
658 rc.left = rc.right - cx;
659 break;
660 }
661 AppBar_QuerySetPos(m_uSide, &rc, pabd, TRUE);
662 }
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 553 of file SHAppBarMessage.cpp.

554 {
555 APPBARDATA abd = { sizeof(abd), hwnd };
556 abd.rc = *lprc;
557 abd.uEdge = m_uSide;
558
559 INT cx = 0, cy = 0;
560 if (ABE_LEFT == abd.uEdge || ABE_RIGHT == abd.uEdge)
561 {
562 cx = abd.rc.right - abd.rc.left;
563 abd.rc.top = 0;
565 }
566 else
567 {
568 cy = abd.rc.bottom - abd.rc.top;
569 abd.rc.left = 0;
571 }
572
574
575 switch (abd.uEdge)
576 {
577 case ABE_LEFT:
578 abd.rc.right = abd.rc.left + cx;
579 break;
580 case ABE_RIGHT:
581 abd.rc.left = abd.rc.right - cx;
582 break;
583 case ABE_TOP:
584 abd.rc.bottom = abd.rc.top + cy;
585 break;
586 case ABE_BOTTOM:
587 abd.rc.top = abd.rc.bottom - cy;
588 break;
589 }
590
591 *lprc = abd.rc;
592 }
#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 594 of file SHAppBarMessage.cpp.

595 {
596 pabd->rc = *lprc;
597 pabd->uEdge = uEdge;
598 m_uSide = uEdge;
599
600 AppBar_QueryPos(pabd->hWnd, &pabd->rc);
601
603
604 if (fMove)
605 {
606 RECT rc = pabd->rc;
607 MoveWindow(pabd->hWnd, rc.left, rc.top,
608 rc.right - rc.left, rc.bottom - rc.top, TRUE);
609 }
610
611 if (!m_fAutoHide)
612 {
613 m_rcAppBar = pabd->rc;
614 }
615 }
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 331 of file SHAppBarMessage.cpp.

332 {
333 APPBARDATA abd = { sizeof(abd), hwnd, APPBAR_CALLBACK };
335 return m_fAppBarRegd;
336 }
#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 484 of file SHAppBarMessage.cpp.

485 {
487 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
488 m_fOnTop = fOnTop;
489 }
#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 363 of file SHAppBarMessage.cpp.

364 {
365 if (fHide)
366 return AppBar_AutoHide(hwnd);
367 else
368 return AppBar_NoAutoHide(hwnd);
369 }
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 525 of file SHAppBarMessage.cpp.

526 {
527 if (m_fAutoHide)
528 {
530 }
531 }
#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 533 of file SHAppBarMessage.cpp.

534 {
535 if (m_fAutoHide && m_fHiding)
536 {
538 }
539 }
#define IDT_AUTOUNHIDE

Referenced by OnNCHitTest().

◆ AppBar_SetSide()

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

Definition at line 436 of file SHAppBarMessage.cpp.

437 {
438 HMONITOR hMon = ::MonitorFromWindow(hwnd, MONITOR_DEFAULTTOPRIMARY);
439 MONITORINFO mi = { sizeof(mi) };
440 ::GetMonitorInfo(hMon, &mi);
441 RECT rc = mi.rcWork;
442
443 BOOL fAutoHide = FALSE;
444 if (m_fAutoHide)
445 {
446 fAutoHide = m_fAutoHide;
450 }
451
452 switch (uSide)
453 {
454 case ABE_TOP:
455 rc.bottom = rc.top + m_cyHeight;
456 break;
457 case ABE_BOTTOM:
458 rc.top = rc.bottom - m_cyHeight;
459 break;
460 case ABE_LEFT:
461 rc.right = rc.left + m_cxWidth;
462 break;
463 case ABE_RIGHT:
464 rc.left = rc.right - m_cxWidth;
465 break;
466 }
467
468 APPBARDATA abd = { sizeof(abd), hwnd };
469 AppBar_QuerySetPos(uSide, &rc, &abd, TRUE);
470
471 if (fAutoHide)
472 {
474 m_fHiding = TRUE;
475
479 }
480
481 return TRUE;
482 }
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 541 of file SHAppBarMessage.cpp.

542 {
543 if (m_fAppBarRegd)
544 {
545 APPBARDATA abd = { sizeof(abd), hwnd };
546
547 RECT rc;
548 GetWindowRect(hwnd, &rc);
549 AppBar_QuerySetPos(m_uSide, &rc, &abd, TRUE);
550 }
551 }

Referenced by OnMove(), and OnSize().

◆ AppBar_UnHide()

void Window::AppBar_UnHide ( HWND  hwnd)
inlineprotected

Definition at line 517 of file SHAppBarMessage.cpp.

518 {
521
523 }

Referenced by OnActivate(), and OnTimer().

◆ AppBar_UnRegister()

BOOL Window::AppBar_UnRegister ( HWND  hwnd)
inlineprotected

Definition at line 338 of file SHAppBarMessage.cpp.

339 {
340 APPBARDATA abd = { sizeof(abd), hwnd };
342 return !m_fAppBarRegd;
343 }
#define ABM_REMOVE
Definition: shellapi.h:62

Referenced by OnNCDestroy().

◆ DoAction()

void Window::DoAction ( )
inline

Definition at line 967 of file SHAppBarMessage.cpp.

968 {
969 trace("DoAction\n");
970
971 TEST_Main();
975
976 Quit();
977 }
#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 155 of file SHAppBarMessage.cpp.

159 {
160 Window *this_ = new Window(cx, cy, fAutoHide);
161 HWND hwnd = CreateWindowEx(exstyle, s_szName, pszText, style,
163 NULL, NULL, hInstance, this_);
166 return hwnd;
167 }
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 142 of file SHAppBarMessage.cpp.

143 {
144 WNDCLASS wc;
145 ZeroMemory(&wc, sizeof(wc));
147 wc.hInstance = hInstance;
150 wc.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
152 return !!RegisterClass(&wc);
153 }
#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 169 of file SHAppBarMessage.cpp.

170 {
172 }
#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 955 of file SHAppBarMessage.cpp.

956 {
957 SystemParametersInfoW(SPI_GETWORKAREA, 0, prc, 0);
958 }
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 683 of file SHAppBarMessage.cpp.

684 {
685 APPBARDATA abd = { sizeof(abd), hwnd };
687
688 switch (state)
689 {
690 case WA_ACTIVE:
691 case WA_CLICKACTIVE:
694 break;
695
696 case WA_INACTIVE:
698 break;
699 }
700 }
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 297 of file SHAppBarMessage.cpp.

298 {
299 static HWND s_hwndZOrder = NULL;
300
301 switch (wParam)
302 {
303 case ABN_STATECHANGE:
304 break;
305
308 if (lParam)
309 {
310 s_hwndZOrder = GetWindow(hwnd, GW_HWNDPREV);
311 SetWindowPos(hwnd, HWND_BOTTOM, 0, 0, 0, 0,
313 }
314 else
315 {
316 SetWindowPos(hwnd, m_fOnTop ? HWND_TOPMOST : s_hwndZOrder,
317 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
318 s_hwndZOrder = NULL;
319 }
320 break;
321
322 case ABN_POSCHANGED:
323 {
324 APPBARDATA abd = { sizeof(abd), hwnd };
325 AppBar_PosChanged(&abd);
326 }
327 break;
328 }
329 }
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 241 of file SHAppBarMessage.cpp.

242 {
244 switch (id)
245 {
246 case ID_ACTION:
248 break;
249 case ID_ACTION + 1:
251 if (!hThread)
252 {
253 skip("failed to create thread\n");
256 return;
257 }
259 break;
260 case ID_QUIT:
264 break;
265 }
266 }
#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 664 of file SHAppBarMessage.cpp.

665 {
666 m_hwnd = hwnd;
667 m_fOnTop = TRUE;
669
675
678
679 trace("OnCreate(%p) done\n", hwnd);
680 return TRUE;
681 }
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 291 of file SHAppBarMessage.cpp.

292 {
293 if (vk == VK_ESCAPE)
295 }
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 815 of file SHAppBarMessage.cpp.

816 {
817 m_fMoving = TRUE;
821 }
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 909 of file SHAppBarMessage.cpp.

910 {
911 if (!m_fMoving)
912 return;
913
914 OnMouseMove(hwnd, x, y, keyFlags);
915
917
919
920 if (m_fAutoHide)
921 {
922 switch (m_uSide)
923 {
924 case ABE_TOP:
926 break;
927 case ABE_BOTTOM:
929 break;
930 case ABE_LEFT:
932 break;
933 case ABE_RIGHT:
935 break;
936 }
937 }
938
939 if (m_bDragged)
940 {
941 if (m_fAutoHide)
942 {
944 }
945 else
946 {
947 APPBARDATA abd = { sizeof(abd), hwnd };
949 }
950 }
951
953 }
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 823 of file SHAppBarMessage.cpp.

824 {
825 if (!m_fMoving)
826 return;
827
828 POINT pt;
832 {
834 }
835
836 INT cxScreen = GetSystemMetrics(SM_CXSCREEN);
837 INT cyScreen = GetSystemMetrics(SM_CYSCREEN);
838
839 DWORD dx, dy;
840 UINT ix, iy;
841 if (pt.x < cxScreen / 2)
842 {
843 dx = pt.x;
844 ix = ABE_LEFT;
845 }
846 else
847 {
848 dx = cxScreen - pt.x;
849 ix = ABE_RIGHT;
850 }
851
852 if (pt.y < cyScreen / 2)
853 {
854 dy = pt.y;
855 iy = ABE_TOP;
856 }
857 else
858 {
859 dy = cyScreen - pt.y;
860 iy = ABE_BOTTOM;
861 }
862
863 if (cxScreen * dy > cyScreen * dx)
864 {
865 m_rcDrag.top = 0;
866 m_rcDrag.bottom = cyScreen;
867 if (ix == ABE_LEFT)
868 {
870 m_rcDrag.left = 0;
872 }
873 else
874 {
876 m_rcDrag.right = cxScreen;
878 }
879 }
880 else
881 {
882 m_rcDrag.left = 0;
883 m_rcDrag.right = cxScreen;
884 if (iy == ABE_TOP)
885 {
887 m_rcDrag.top = 0;
889 }
890 else
891 {
893 m_rcDrag.bottom = cyScreen;
895 }
896 }
897
899
900 if (m_bDragged)
901 {
905 TRUE);
906 }
907 }
_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
unsigned int UINT
Definition: sysinfo.c:13
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97
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 734 of file SHAppBarMessage.cpp.

735 {
736 if (m_fMoving || m_fAutoHide)
737 return;
738
739 if (!m_fHiding)
741 }
void AppBar_Size(HWND hwnd)

Referenced by WindowProcDx().

◆ OnNCDestroy()

void Window::OnNCDestroy ( HWND  hwnd)
inlineprotected

Definition at line 743 of file SHAppBarMessage.cpp.

744 {
746
747 m_hwnd = NULL;
749 delete this;
750 }
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 794 of file SHAppBarMessage.cpp.

795 {
797
799
800 if (m_uSide == ABE_TOP && uHitTest == HTBOTTOM)
801 return HTBOTTOM;
802
803 if (m_uSide == ABE_BOTTOM && uHitTest == HTTOP)
804 return HTTOP;
805
806 if (m_uSide == ABE_LEFT && uHitTest == HTRIGHT)
807 return HTRIGHT;
808
809 if (m_uSide == ABE_RIGHT && uHitTest == HTLEFT)
810 return HTLEFT;
811
812 return HTCLIENT;
813 }
#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 268 of file SHAppBarMessage.cpp.

269 {
270 PAINTSTRUCT ps;
271
272 TCHAR szText[64];
273 GetWindowText(hwnd, szText, 64);
274
275 RECT rc;
276 GetClientRect(hwnd, &rc);
277
278 if (HDC hdc = BeginPaint(hwnd, &ps))
279 {
280 DrawText(hdc, szText, -1, &rc, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
281 EndPaint(hwnd, &ps);
282 }
283 }
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 285 of file SHAppBarMessage.cpp.

Referenced by WindowProcDx().

◆ OnSize()

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

Definition at line 710 of file SHAppBarMessage.cpp.

711 {
712 RECT rcWindow;
713
714 if (m_fMoving || (m_fAutoHide && m_fHiding))
715 return;
716
717 if (!m_fHiding)
718 {
719 if (!m_fAutoHide)
721
722 GetWindowRect(hwnd, &rcWindow);
723 m_rcAppBar = rcWindow;
724
725 if (m_uSide == ABE_TOP || m_uSide == ABE_BOTTOM)
726 m_cyHeight = m_cySave = rcWindow.bottom - rcWindow.top;
727 else
728 m_cxWidth = m_cxSave = rcWindow.right - rcWindow.left;
729 }
730
732 }
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 752 of file SHAppBarMessage.cpp.

753 {
754 POINT pt;
755 RECT rc;
756 HWND hwndActive;
757
758 switch (id)
759 {
760 case IDT_AUTOHIDE:
761 if (m_fAutoHide && !m_fHiding && !m_fMoving)
762 {
764 GetWindowRect(hwnd, &rc);
765 hwndActive = GetForegroundWindow();
766
767 if (!PtInRect(&rc, pt) &&
768 hwndActive != hwnd &&
769 hwndActive != NULL &&
770 GetWindowOwner(hwndActive) != hwnd)
771 {
772 KillTimer(hwnd, id);
774 }
775 }
776 break;
777
778 case IDT_AUTOUNHIDE:
779 KillTimer(hwnd, id);
780
781 if (m_fAutoHide && m_fHiding)
782 {
784 GetWindowRect(hwnd, &rc);
785 if (PtInRect(&rc, pt))
786 {
788 }
789 }
790 break;
791 }
792 }
#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 702 of file SHAppBarMessage.cpp.

703 {
704 APPBARDATA abd = { sizeof(abd), hwnd };
706
708 }
#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 960 of file SHAppBarMessage.cpp.

961 {
964 }
#define PostMessage
Definition: winuser.h:5998

Referenced by DoAction().

◆ TEST_AutoHide()

void Window::TEST_AutoHide ( )
inline

Definition at line 1120 of file SHAppBarMessage.cpp.

1121 {
1122 trace("TEST_AutoHide\n");
1123
1124 RECT rc;
1125
1126 m_cxWidth = 80;
1127 m_cyHeight = 40;
1131 ok_ptr(hwndRet, s_hwnd2);
1133
1134 GetWindowRect(s_hwnd2, &rc);
1138 ok_long(rc.bottom, s_rcWorkArea.top + 2);
1139
1141 LEFT_DOWN();
1142 LEFT_UP();
1144
1145 GetWindowRect(s_hwnd2, &rc);
1149 ok_long(rc.bottom, s_rcWorkArea.top + 40);
1150
1152 LEFT_DOWN();
1153 LEFT_UP();
1155
1156 GetWindowRect(s_hwnd2, &rc);
1160 ok_long(rc.bottom, s_rcWorkArea.top + 2);
1161
1164
1165 GetWindowRect(s_hwnd2, &rc);
1169 ok_long(rc.bottom, s_rcWorkArea.top + 40);
1170
1175 ok_ptr(hwndRet, s_hwnd2);
1176
1177 GetWindowRect(s_hwnd2, &rc);
1178 ok_long(rc.left, s_rcWorkArea.right - 2);
1182
1185
1186 GetWindowRect(s_hwnd2, &rc);
1187 ok_long(rc.left, s_rcWorkArea.right - 2);
1191 }
#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 1084 of file SHAppBarMessage.cpp.

1085 {
1086 trace("TEST_Dragging\n");
1087
1088 RECT rc, rcWork;
1089 POINT pt;
1090
1091 GetWindowRect(s_hwnd2, &rc);
1092 pt.x = (rc.left + rc.right) / 2;
1093 pt.y = (rc.top + rc.bottom) / 2;
1094 MOVE(pt.x, pt.y);
1095 LEFT_DOWN();
1096 Sleep(INTERVAL);
1097
1099 pt.y = s_rcWorkArea.top;
1100 MOVE(pt.x, pt.y);
1101 Sleep(INTERVAL);
1102
1103 pt.x = s_rcWorkArea.right - 1;
1105 MOVE(pt.x, pt.y);
1106 LEFT_UP();
1108
1109 GetWindowRect(s_hwnd2, &rc);
1110 GetWorkArea(&rcWork);
1111 ok_long(rc.left, s_rcWorkArea.right - 30);
1114 ok_long(rcWork.left, s_rcWorkArea.left);
1115 ok_long(rcWork.top, s_rcWorkArea.top);
1116 ok_long(rcWork.right, s_rcWorkArea.right - 30);
1118 }
#define INTERVAL
void GetWorkArea(LPRECT prc) const

Referenced by DoAction().

◆ TEST_FullScreen()

void Window::TEST_FullScreen ( )
inline

Definition at line 1193 of file SHAppBarMessage.cpp.

1194 {
1195 trace("TEST_FullScreen\n");
1198 MoveWindow(s_hwnd2, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);
1201 MoveWindow(s_hwnd2, rc.left, rc.top, 100, 100, TRUE);
1202 }
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 979 of file SHAppBarMessage.cpp.

980 {
981 trace("TEST_Main\n");
983
984 POINT pt;
985 RECT rc1, rc2, rcWork;
986
988 ok_int(ret, TRUE);
990
991 GetWindowRect(s_hwnd1, &rc1);
992 GetWindowRect(s_hwnd2, &rc2);
993 GetWorkArea(&rcWork);
997 ok_long(rc1.bottom, s_rcWorkArea.top + 80);
999 ok_long(rc2.top, s_rcWorkArea.top + 80);
1001 ok_long(rc2.bottom, s_rcWorkArea.top + 110);
1002 ok_long(rcWork.left, s_rcWorkArea.left);
1003 ok_long(rcWork.top, s_rcWorkArea.top + 110);
1008
1009 GetWindowRect(s_hwnd2, &rc2);
1010 GetWorkArea(&rcWork);
1014 ok_long(rc2.bottom, s_rcWorkArea.top + 30);
1015 ok_long(rcWork.left, s_rcWorkArea.left);
1016 ok_long(rcWork.top, s_rcWorkArea.top + 30);
1020 Sleep(INTERVAL);
1021
1022 GetWindowRect(s_hwnd2, &rc2);
1023 GetWorkArea(&rcWork);
1026 ok_long(rc2.right, s_rcWorkArea.left + 30);
1027 ok_long(rcWork.left, s_rcWorkArea.left + 30);
1028 ok_long(rcWork.top, s_rcWorkArea.top);
1032 Sleep(INTERVAL);
1033
1034 GetWindowRect(s_hwnd2, &rc2);
1035 GetWorkArea(&rcWork);
1039 ok_long(rc2.bottom, s_rcWorkArea.top + 30);
1040 ok_long(rcWork.left, s_rcWorkArea.left);
1041 ok_long(rcWork.top, s_rcWorkArea.top + 30);
1045 Sleep(INTERVAL);
1046
1047 GetWindowRect(s_hwnd2, &rc2);
1048 GetWorkArea(&rcWork);
1049 ok_long(rc2.left, s_rcWorkArea.right - 30);
1052 ok_long(rcWork.left, s_rcWorkArea.left);
1053 ok_long(rcWork.top, s_rcWorkArea.top);
1054 ok_long(rcWork.right, s_rcWorkArea.right - 30);
1056 Sleep(INTERVAL);
1057
1058 GetWindowRect(s_hwnd2, &rc2);
1059 pt.x = (rc2.left + rc2.right) / 2;
1060 pt.y = (rc2.top + rc2.bottom) / 2;
1061 MOVE(pt.x, pt.y);
1062 LEFT_DOWN();
1063 MOVE(pt.x + 64, pt.y + 64);
1064 Sleep(INTERVAL);
1065
1066 pt.x = s_rcWorkArea.left + 80;
1068 MOVE(pt.x, pt.y);
1069 LEFT_UP();
1070 Sleep(INTERVAL);
1071
1072 GetWindowRect(s_hwnd2, &rc2);
1073 GetWorkArea(&rcWork);
1076 ok_long(rc2.right, s_rcWorkArea.left + 30);
1077 ok_long(rcWork.left, s_rcWorkArea.left + 30);
1078 ok_long(rcWork.top, s_rcWorkArea.top);
1081 Sleep(INTERVAL);
1082 }
static RECT s_rcTaskBar
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 209 of file SHAppBarMessage.cpp.

210 {
211 Window *this_ = GetAppbarData(hwnd);
212 if (uMsg == WM_CREATE)
213 {
215 this_ = (Window *)pCS->lpCreateParams;
217 }
218 if (this_)
219 return this_->WindowProcDx(hwnd, uMsg, wParam, lParam);
220 return DefWindowProc(hwnd, uMsg, wParam, lParam);
221 }
__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 175 of file SHAppBarMessage.cpp.

176 {
177#ifdef VERBOSE
178 MD_msgdump(hwnd, uMsg, wParam, lParam);
179#endif
180 switch (uMsg)
181 {
197
198 case APPBAR_CALLBACK:
200 break;
201
202 default:
203 return DefWindowProc(hwnd, uMsg, wParam, lParam);
204 }
205 return 0;
206 }
#define MD_msgdump(hwnd, uMsg, wParam, lParam)
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 235 of file SHAppBarMessage.cpp.

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

◆ m_bGotFullScreen

BOOL Window::m_bGotFullScreen
protected

Definition at line 239 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 233 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 226 of file SHAppBarMessage.cpp.

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

◆ m_hwnd

HWND Window::m_hwnd
protected

Definition at line 224 of file SHAppBarMessage.cpp.

Referenced by OnCreate(), and OnNCDestroy().

◆ m_ptDragOn

POINT Window::m_ptDragOn
protected

Definition at line 236 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 238 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: