ReactOS 0.4.15-dev-8109-gd7be748
CBaseBar Class Reference
Inheritance diagram for CBaseBar:
Collaboration diagram for CBaseBar:

Public Member Functions

 CBaseBar ()
 
 ~CBaseBar ()
 
HRESULT Initialize (BOOL)
 
HRESULT ReserveBorderSpace ()
 
STDMETHOD() GetWindow (HWND *lphwnd) override
 
STDMETHOD() ContextSensitiveHelp (BOOL fEnterMode) override
 
STDMETHOD() OnFocusChangeIS (IUnknown *punkObj, BOOL fSetFocus) override
 
STDMETHOD() QueryStatus (const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) override
 
STDMETHOD() Exec (const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override
 
STDMETHOD() QueryService (REFGUID guidService, REFIID riid, void **ppvObject) override
 
STDMETHOD() UIActivateIO (BOOL fActivate, LPMSG lpMsg) override
 
STDMETHOD() HasFocusIO () override
 
STDMETHOD() TranslateAcceleratorIO (LPMSG lpMsg) override
 
STDMETHOD() SetClient (IUnknown *punkClient) override
 
STDMETHOD() GetClient (IUnknown **ppunkClient) override
 
STDMETHOD() OnPosRectChangeDB (LPRECT prc) override
 
STDMETHOD() ShowDW (BOOL fShow) override
 
STDMETHOD() CloseDW (DWORD dwReserved) override
 
STDMETHOD() ResizeBorderDW (LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override
 
STDMETHOD() SetSite (IUnknown *pUnkSite) override
 
STDMETHOD() GetSite (REFIID riid, void **ppvSite) override
 
STDMETHOD() GetClassID (CLSID *pClassID) override
 
STDMETHOD() IsDirty () override
 
STDMETHOD() Load (IStream *pStm) override
 
STDMETHOD() Save (IStream *pStm, BOOL fClearDirty) override
 
STDMETHOD() GetSizeMax (ULARGE_INTEGER *pcbSize) override
 
STDMETHOD() InitNew () override
 
STDMETHOD() Load (IPropertyBag *pPropBag, IErrorLog *pErrorLog) override
 
STDMETHOD() Save (IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties) override
 
LRESULT OnSize (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSetCursor (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNotify (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnLButtonDown (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnLButtonUp (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnMouseMove (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCancelMode (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCaptureChanged (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
HRESULT QueryStatus ([in, unique] const GUID *pguidCmdGroup, [in] ULONG cCmds, [in, out, size_is(cCmds)] OLECMD prgCmds[], [in, out, unique] OLECMDTEXT *pCmdText)
 
HRESULT Exec ([in, unique] const GUID *pguidCmdGroup, [in] DWORD nCmdID, [in] DWORD nCmdexecopt, [in, unique] VARIANT *pvaIn, [in, out, unique] VARIANT *pvaOut)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
- Public Member Functions inherited from IServiceProvider
HRESULT QueryService ([in] REFGUID guidService, [in] REFIID riid, [out] void **ppvObject)
 
HRESULT RemoteQueryService ([in] REFGUID guidService, [in] REFIID riid, [out, iid_is(riid)] IUnknown **ppvObject)
 
- Public Member Functions inherited from IDeskBar
HRESULT SetClient ([in] IUnknown *punkClient)
 
HRESULT GetClient ([out] IUnknown **ppunkClient)
 
HRESULT OnPosRectChangeDB ([in] RECT *prc)
 
HRESULT GetWindow ([out] HWND *phwnd)
 
HRESULT ContextSensitiveHelp ([in] BOOL fEnterMode)
 
HRESULT ShowDW ([in] BOOL fShow)
 
HRESULT CloseDW ([in] DWORD dwReserved)
 
HRESULT ResizeBorderDW ([in] LPCRECT prcBorder, [in] IUnknown *punkToolbarSite, [in] BOOL fReserved)
 
HRESULT IsDirty ()
 
HRESULT Load ([in, unique] IStream *pStm)
 
HRESULT Save ([in, unique] IStream *pStm, [in] BOOL fClearDirty)
 
HRESULT GetSizeMax ([out] ULARGE_INTEGER *pcbSize)
 
HRESULT GetClassID ([out] CLSID *pClassID)
 
- Public Member Functions inherited from IPersistStreamInit
HRESULT IsDirty ()
 
HRESULT Load ([in] LPSTREAM pStm)
 
HRESULT Save ([in] LPSTREAM pStm, [in] BOOL fClearDirty)
 
HRESULT GetSizeMax ([out] ULARGE_INTEGER *pcbSize)
 
HRESULT InitNew ()
 
HRESULT InitNew ()
 
HRESULT Load ([in] IPropertyBag *pPropBag, [in] IErrorLog *pErrorLog)
 
HRESULT Save ([in] IPropertyBag *pPropBag, [in] BOOL fClearDirty, [in] BOOL fSaveAllProperties)
 
- Public Member Functions inherited from IObjectWithSite
HRESULT SetSite ([in] IUnknown *pUnkSite)
 
HRESULT GetSite ([in] REFIID riid, [out, iid_is(riid)] PVOID *ppvSite)
 

Private Attributes

CComPtr< IUnknownfSite
 
CComPtr< IUnknownfClient
 
HWND fClientWindow
 
bool fVertical
 
bool fVisible
 
int fNeededSize
 
bool fTracking
 
POINT fLastLocation
 

Additional Inherited Members

- Public Types inherited from IOleCommandTarget
enum  OLECMDF {
  OLECMDF_SUPPORTED = 0x1 , OLECMDF_ENABLED = 0x2 , OLECMDF_LATCHED = 0x4 , OLECMDF_NINCHED = 0x8 ,
  OLECMDF_INVISIBLE = 0x10 , OLECMDF_DEFHIDEONCTXTMENU = 0x20
}
 
enum  OLECMDTEXTF { OLECMDTEXTF_NONE = 0 , OLECMDTEXTF_NAME = 1 , OLECMDTEXTF_STATUS = 2 }
 
enum  OLECMDEXECOPT { OLECMDEXECOPT_DODEFAULT = 0 , OLECMDEXECOPT_PROMPTUSER = 1 , OLECMDEXECOPT_DONTPROMPTUSER = 2 , OLECMDEXECOPT_SHOWHELP = 3 }
 
enum  OLECMDID {
  OLECMDID_OPEN = 1 , OLECMDID_NEW = 2 , OLECMDID_SAVE = 3 , OLECMDID_SAVEAS = 4 ,
  OLECMDID_SAVECOPYAS = 5 , OLECMDID_PRINT = 6 , OLECMDID_PRINTPREVIEW = 7 , OLECMDID_PAGESETUP = 8 ,
  OLECMDID_SPELL = 9 , OLECMDID_PROPERTIES = 10 , OLECMDID_CUT = 11 , OLECMDID_COPY = 12 ,
  OLECMDID_PASTE = 13 , OLECMDID_PASTESPECIAL = 14 , OLECMDID_UNDO = 15 , OLECMDID_REDO = 16 ,
  OLECMDID_SELECTALL = 17 , OLECMDID_CLEARSELECTION = 18 , OLECMDID_ZOOM = 19 , OLECMDID_GETZOOMRANGE = 20 ,
  OLECMDID_UPDATECOMMANDS = 21 , OLECMDID_REFRESH = 22 , OLECMDID_STOP = 23 , OLECMDID_HIDETOOLBARS = 24 ,
  OLECMDID_SETPROGRESSMAX = 25 , OLECMDID_SETPROGRESSPOS = 26 , OLECMDID_SETPROGRESSTEXT = 27 , OLECMDID_SETTITLE = 28 ,
  OLECMDID_SETDOWNLOADSTATE = 29 , OLECMDID_STOPDOWNLOAD = 30 , OLECMDID_ONTOOLBARACTIVATED = 31 , OLECMDID_FIND = 32 ,
  OLECMDID_DELETE = 33 , OLECMDID_HTTPEQUIV = 34 , OLECMDID_HTTPEQUIV_DONE = 35 , OLECMDID_ENABLE_INTERACTION = 36 ,
  OLECMDID_ONUNLOAD = 37 , OLECMDID_PROPERTYBAG2 = 38 , OLECMDID_PREREFRESH = 39 , OLECMDID_SHOWSCRIPTERROR = 40 ,
  OLECMDID_SHOWMESSAGE = 41 , OLECMDID_SHOWFIND = 42 , OLECMDID_SHOWPAGESETUP = 43 , OLECMDID_SHOWPRINT = 44 ,
  OLECMDID_CLOSE = 45 , OLECMDID_ALLOWUILESSSAVEAS = 46 , OLECMDID_DONTDOWNLOADCSS = 47 , OLECMDID_UPDATEPAGESTATUS = 48 ,
  OLECMDID_PRINT2 = 49 , OLECMDID_PRINTPREVIEW2 = 50 , OLECMDID_SETPRINTTEMPLATE = 51 , OLECMDID_GETPRINTTEMPLATE = 52 ,
  OLECMDID_PAGEACTIONBLOCKED = 55 , OLECMDID_PAGEACTIONUIQUERY = 56 , OLECMDID_FOCUSVIEWCONTROLS = 57 , OLECMDID_FOCUSVIEWCONTROLSQUERY = 58 ,
  OLECMDID_SHOWPAGEACTIONMENU = 59 , OLECMDID_ADDTRAVELENTRY = 60 , OLECMDID_UPDATETRAVELENTRY = 61 , OLECMDID_UPDATEBACKFORWARDSTATE = 62 ,
  OLECMDID_OPTICAL_ZOOM = 63 , OLECMDID_OPTICAL_GETZOOMRANGE = 64 , OLECMDID_WINDOWSTATECHANGED = 65 , OLECMDID_ACTIVEXINSTALLSCOPE = 66 ,
  OLECMDID_UPDATETRAVELENTRY_DATARECOVERY = 67 , OLECMDID_SHOWTASKDLG = 68 , OLECMDID_POPSTATEEVENT = 69 , OLECMDID_VIEWPORT_MODE = 70 ,
  OLECMDID_LAYOUT_VIEWPORT_WIDTH = 71 , OLECMDID_VISUAL_VIEWPORT_EXCLUDE_BOTTOM = 72 , OLECMDID_USER_OPTICAL_ZOOM = 73 , OLECMDID_PAGEAVAILABLE = 74 ,
  OLECMDID_GETUSERSCALABLE = 75 , OLECMDID_UPDATE_CARET = 76 , OLECMDID_ENABLE_VISIBILITY = 77 , OLECMDID_MEDIA_PLAYBACK = 78
}
 
typedef IOleCommandTargetLPOLECOMMANDTARGET
 
typedef enum IOleCommandTarget::OLECMDF OLECMDF
 
typedef struct IOleCommandTarget::_tagOLECMD OLECMD
 
typedef struct IOleCommandTarget::_tagOLECMDTEXT OLECMDTEXT
 
typedef enum IOleCommandTarget::OLECMDTEXTF OLECMDTEXTF
 
typedef enum IOleCommandTarget::OLECMDEXECOPT OLECMDEXECOPT
 
typedef enum IOleCommandTarget::OLECMDID OLECMDID
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IServiceProvider
typedef IServiceProviderLPSERVICEPROVIDER
 
- Public Types inherited from IOleWindow
typedef IOleWindowLPOLEWINDOW
 
- Public Types inherited from IPersistStream
typedef IPersistStreamLPPERSISTSTREAM
 
- Public Types inherited from IPersist
typedef IPersistLPPERSIST
 
- Public Types inherited from IPersistStreamInit
typedef IPersistStreamInitLPPERSISTSTREAMINIT
 
- Public Types inherited from IPersistPropertyBag
typedef IPersistPropertyBagLPPERSISTPROPERTYBAG
 
- Public Types inherited from IObjectWithSite
typedef IObjectWithSiteLPOBJECTWITHSITE
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Detailed Description

Definition at line 39 of file CBaseBar.cpp.

Constructor & Destructor Documentation

◆ CBaseBar()

CBaseBar::CBaseBar ( )

Definition at line 163 of file CBaseBar.cpp.

164{
166 fVertical = true;
167 fVisible = false;
168 fNeededSize = 200;
169 fTracking = false;
170}
bool fTracking
Definition: CBaseBar.cpp:62
bool fVertical
Definition: CBaseBar.cpp:57
int fNeededSize
Definition: CBaseBar.cpp:59
bool fVisible
Definition: CBaseBar.cpp:58
HWND fClientWindow
Definition: CBaseBar.cpp:56
#define NULL
Definition: types.h:112

◆ ~CBaseBar()

CBaseBar::~CBaseBar ( )

Definition at line 172 of file CBaseBar.cpp.

173{
174}

Member Function Documentation

◆ CloseDW()

HRESULT STDMETHODCALLTYPE CBaseBar::CloseDW ( DWORD  dwReserved)
override

Implements IDockingWindow.

Definition at line 377 of file CBaseBar.cpp.

378{
379 ShowDW(0);
380 // Detach from our client
382 // Destroy our site
383 SetSite(NULL);
384 return S_OK;
385}
STDMETHOD() SetSite(IUnknown *pUnkSite) override
Definition: CBaseBar.cpp:393
STDMETHOD() SetClient(IUnknown *punkClient) override
Definition: CBaseBar.cpp:316
STDMETHOD() ShowDW(BOOL fShow) override
Definition: CBaseBar.cpp:369
#define S_OK
Definition: intsafe.h:52

◆ ContextSensitiveHelp()

HRESULT STDMETHODCALLTYPE CBaseBar::ContextSensitiveHelp ( BOOL  fEnterMode)
override

Implements IOleWindow.

Definition at line 236 of file CBaseBar.cpp.

237{
238 return E_NOTIMPL;
239}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Exec()

HRESULT STDMETHODCALLTYPE CBaseBar::Exec ( const GUID pguidCmdGroup,
DWORD  nCmdID,
DWORD  nCmdexecopt,
VARIANT pvaIn,
VARIANT pvaOut 
)
override

Implements IOleCommandTarget.

Definition at line 252 of file CBaseBar.cpp.

254{
255 if (IsEqualIID(*pguidCmdGroup, CGID_Explorer))
256 {
257 // pass through to the explorer ?
258 }
259 else if (IsEqualIID(*pguidCmdGroup, IID_IDeskBarClient))
260 {
261 switch (nCmdID)
262 {
263 case 0:
264 {
265 // hide current band
266 ShowDW(0);
267
268 // Inform our site that we closed
269 VARIANT var;
270 V_VT(&var) = VT_UNKNOWN;
271 V_UNKNOWN(&var) = static_cast<IDeskBar *>(this);
272 IUnknown_Exec(fSite, CGID_Explorer, 0x22, 0, &var, NULL);
273 break;
274 }
275 case 2:
276 // switch bands
277 break;
278 case 3:
279 break;
280 }
281 }
282 return E_NOTIMPL;
283}
CComPtr< IUnknown > fSite
Definition: CBaseBar.cpp:54
@ VT_UNKNOWN
Definition: compat.h:2308
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1083
const char * var
Definition: shader.c:5666
#define V_UNKNOWN(A)
Definition: oleauto.h:281
#define V_VT(A)
Definition: oleauto.h:211
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CBaseBar::GetClassID ( CLSID pClassID)
override

Implements IPersist.

Definition at line 409 of file CBaseBar.cpp.

410{
411 if (pClassID == NULL)
412 return E_POINTER;
413 // TODO: what class to return here?
414 return E_NOTIMPL;
415}
#define E_POINTER
Definition: winerror.h:2365

◆ GetClient()

HRESULT STDMETHODCALLTYPE CBaseBar::GetClient ( IUnknown **  ppunkClient)
override

Implements IDeskBar.

Definition at line 347 of file CBaseBar.cpp.

348{
349 if (ppunkClient == NULL)
350 return E_POINTER;
351 *ppunkClient = fClient;
352 if (fClient.p != NULL)
353 fClient.p->AddRef();
354 return S_OK;
355}
CComPtr< IUnknown > fClient
Definition: CBaseBar.cpp:55
ULONG AddRef()

◆ GetSite()

HRESULT STDMETHODCALLTYPE CBaseBar::GetSite ( REFIID  riid,
void **  ppvSite 
)
override

Definition at line 399 of file CBaseBar.cpp.

400{
401 if (ppvSite == NULL)
402 return E_POINTER;
403 *ppvSite = fSite;
404 if (fSite.p != NULL)
405 fSite.p->AddRef();
406 return S_OK;
407}

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CBaseBar::GetSizeMax ( ULARGE_INTEGER pcbSize)
override

Implements IPersistStream.

Definition at line 432 of file CBaseBar.cpp.

433{
434 if (pcbSize == NULL)
435 return E_POINTER;
436 return E_NOTIMPL;
437}

◆ GetWindow()

HRESULT STDMETHODCALLTYPE CBaseBar::GetWindow ( HWND lphwnd)
override

Implements IOleWindow.

Definition at line 228 of file CBaseBar.cpp.

229{
230 if (lphwnd == NULL)
231 return E_POINTER;
232 *lphwnd = m_hWnd;
233 return S_OK;
234}

◆ HasFocusIO()

HRESULT STDMETHODCALLTYPE CBaseBar::HasFocusIO ( )
override

Definition at line 306 of file CBaseBar.cpp.

307{
309}
HRESULT WINAPI IUnknown_HasFocusIO(IUnknown *lpUnknown)
Definition: ordinal.c:4295

◆ Initialize()

HRESULT CBaseBar::Initialize ( BOOL  vert)

Definition at line 176 of file CBaseBar.cpp.

177{
178 fVertical = (vert == TRUE);
179 return S_OK;
180}
#define TRUE
Definition: types.h:120

◆ InitNew()

HRESULT STDMETHODCALLTYPE CBaseBar::InitNew ( void  )
override

Implements IPersistStreamInit.

Definition at line 439 of file CBaseBar.cpp.

440{
441 return E_NOTIMPL;
442}

◆ IsDirty()

HRESULT STDMETHODCALLTYPE CBaseBar::IsDirty ( void  )
override

Implements IPersistStream.

Definition at line 417 of file CBaseBar.cpp.

418{
419 return E_NOTIMPL;
420}

◆ Load() [1/2]

HRESULT STDMETHODCALLTYPE CBaseBar::Load ( IPropertyBag pPropBag,
IErrorLog pErrorLog 
)
override

Implements IPersistPropertyBag.

Definition at line 444 of file CBaseBar.cpp.

445{
446 return E_NOTIMPL;
447}

◆ Load() [2/2]

HRESULT STDMETHODCALLTYPE CBaseBar::Load ( IStream pStm)
override

Implements IPersistStream.

Definition at line 422 of file CBaseBar.cpp.

423{
424 return E_NOTIMPL;
425}

◆ OnCancelMode()

LRESULT CBaseBar::OnCancelMode ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 552 of file CBaseBar.cpp.

553{
554 fTracking = false;
555 return 0;
556}

◆ OnCaptureChanged()

LRESULT CBaseBar::OnCaptureChanged ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 558 of file CBaseBar.cpp.

559{
560 fTracking = false;
561 return 0;
562}

◆ OnFocusChangeIS()

HRESULT STDMETHODCALLTYPE CBaseBar::OnFocusChangeIS ( IUnknown punkObj,
BOOL  fSetFocus 
)
override

Definition at line 241 of file CBaseBar.cpp.

242{
243 return IUnknown_OnFocusChangeIS(fSite, punkObj, fSetFocus);
244}
HRESULT WINAPI IUnknown_OnFocusChangeIS(LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
Definition: ordinal.c:4767

◆ OnLButtonDown()

LRESULT CBaseBar::OnLButtonDown ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 514 of file CBaseBar.cpp.

515{
516 SetCapture();
517 fTracking = true;
520 return 0;
521}
POINT fLastLocation
Definition: CBaseBar.cpp:63
LPARAM lParam
Definition: combotst.c:139
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:94
#define LOWORD(l)
Definition: pedump.c:82
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define HIWORD(l)
Definition: typedefs.h:247
HWND WINAPI SetCapture(_In_ HWND hWnd)

◆ OnLButtonUp()

LRESULT CBaseBar::OnLButtonUp ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 523 of file CBaseBar.cpp.

524{
526 fTracking = false;
527 return 0;
528}
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890

◆ OnMouseMove()

LRESULT CBaseBar::OnMouseMove ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 530 of file CBaseBar.cpp.

531{
532 POINT newLocation;
533 int delta;
534
535 if (fTracking)
536 {
537 newLocation.x = (short)LOWORD(lParam);
538 newLocation.y = (short)HIWORD(lParam);
539 if (fVertical)
540 delta = newLocation.x - fLastLocation.x;
541 else
542 delta = fLastLocation.y - newLocation.y;
543 if (fNeededSize + delta < 0)
544 return 0;
545 fNeededSize += delta;
546 fLastLocation = newLocation;
548 }
549 return 0;
550}
HRESULT ReserveBorderSpace()
Definition: CBaseBar.cpp:182

◆ OnNotify()

LRESULT CBaseBar::OnNotify ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 498 of file CBaseBar.cpp.

499{
500 CComPtr<IWinEventHandler> winEventHandler;
502 HRESULT hResult;
503
504 result = 0;
505 if (fClient.p != NULL)
506 {
507 hResult = fClient->QueryInterface(IID_PPV_ARG(IWinEventHandler, &winEventHandler));
508 if (SUCCEEDED(hResult) && winEventHandler.p != NULL)
509 hResult = winEventHandler->OnWinEvent(NULL, uMsg, wParam, lParam, &result);
510 }
511 return result;
512}
WPARAM wParam
Definition: combotst.c:138
GLuint64EXT * result
Definition: glext.h:11304
#define SUCCEEDED(hr)
Definition: intsafe.h:50
LONG_PTR LRESULT
Definition: windef.h:209
#define IID_PPV_ARG(Itype, ppType)

◆ OnPosRectChangeDB()

HRESULT STDMETHODCALLTYPE CBaseBar::OnPosRectChangeDB ( LPRECT  prc)
override

Definition at line 357 of file CBaseBar.cpp.

358{
359 if (prc == NULL)
360 return E_POINTER;
361 if (fVertical)
363 else
366 return S_OK;
367}
_Out_ LPRECT prc
Definition: ntgdi.h:1658
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306

◆ OnSetCursor()

LRESULT CBaseBar::OnSetCursor ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 484 of file CBaseBar.cpp.

485{
486 if ((short)lParam != HTCLIENT || (HWND)wParam != m_hWnd)
487 {
488 bHandled = FALSE;
489 return 0;
490 }
491 if (fVertical)
493 else
495 return 1;
496}
#define FALSE
Definition: types.h:117
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define IDC_SIZENS
Definition: winuser.h:695
#define HTCLIENT
Definition: winuser.h:2475
#define LoadCursor
Definition: winuser.h:5812
#define IDC_SIZEWE
Definition: winuser.h:694

◆ OnSize()

LRESULT CBaseBar::OnSize ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 454 of file CBaseBar.cpp.

455{
458 CComPtr<IOleWindow> pClient;
459 HWND clientHwnd;
460 HRESULT hr;
461
462 if (fVisible)
463 {
466
467 // substract resizing grips to child's window size
468 if (fVertical)
470 else
472 hr = fClient->QueryInterface(IID_PPV_ARG(IOleWindow, &pClient));
474 return 0;
475 hr = pClient->GetWindow(&clientHwnd);
477 return 0;
479 bHandled = TRUE;
480 }
481 return 0;
482}
static const WCHAR dwWidth[]
Definition: provider.c:62
static const WCHAR dwHeight[]
Definition: provider.c:63
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT hr
Definition: shlfolder.c:183
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SM_CXFRAME
Definition: winuser.h:994
int WINAPI GetSystemMetrics(_In_ int)

◆ QueryService()

HRESULT STDMETHODCALLTYPE CBaseBar::QueryService ( REFGUID  guidService,
REFIID  riid,
void **  ppvObject 
)
override

Implements IServiceProvider.

Definition at line 285 of file CBaseBar.cpp.

286{
287 CComPtr<IServiceProvider> serviceProvider;
288 HRESULT hResult;
289
290 if (fSite == NULL)
291 return E_FAIL;
292 hResult = fSite->QueryInterface(IID_PPV_ARG(IServiceProvider, &serviceProvider));
293 if (FAILED_UNEXPECTEDLY(hResult))
294 return hResult;
295 // called for SID_STopLevelBrowser, IID_IBrowserService to find top level browser
296 // called for SID_IWebBrowserApp, IID_IConnectionPointContainer
297 // connection point called for DIID_DWebBrowserEvents2 to establish connection
298 return serviceProvider->QueryService(guidService, riid, ppvObject);
299}
#define E_FAIL
Definition: ddrawi.h:102
REFIID riid
Definition: atlbase.h:39
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082

◆ QueryStatus()

HRESULT STDMETHODCALLTYPE CBaseBar::QueryStatus ( const GUID pguidCmdGroup,
ULONG  cCmds,
OLECMD  prgCmds[],
OLECMDTEXT pCmdText 
)
override

Implements IOleCommandTarget.

Definition at line 246 of file CBaseBar.cpp.

248{
249 return E_NOTIMPL;
250}

◆ ReserveBorderSpace()

HRESULT CBaseBar::ReserveBorderSpace ( )

Definition at line 182 of file CBaseBar.cpp.

183{
184 CComPtr<IDockingWindowSite> dockingWindowSite;
185 RECT availableBorderSpace;
186 RECT neededBorderSpace;
187 HRESULT hResult;
188
189 hResult = fSite->QueryInterface(IID_PPV_ARG(IDockingWindowSite, &dockingWindowSite));
190 if (FAILED_UNEXPECTEDLY(hResult))
191 return hResult;
192 hResult = dockingWindowSite->GetBorderDW(static_cast<IDeskBar *>(this), &availableBorderSpace);
193 if (FAILED_UNEXPECTEDLY(hResult))
194 return hResult;
195 memset(&neededBorderSpace, 0, sizeof(neededBorderSpace));
196 if (fVisible)
197 {
198 if (fVertical)
199 neededBorderSpace.left = fNeededSize + GetSystemMetrics(SM_CXFRAME);
200 else
201 neededBorderSpace.bottom = fNeededSize + GetSystemMetrics(SM_CXFRAME);
202 }
203 hResult = dockingWindowSite->SetBorderSpaceDW(static_cast<IDeskBar *>(this), &neededBorderSpace);
204 if (FAILED_UNEXPECTEDLY(hResult))
205 return hResult;
206 return S_OK;
207}
#define memset(x, y, z)
Definition: compat.h:39

Referenced by OnMouseMove(), OnPosRectChangeDB(), ResizeBorderDW(), SetClient(), and ShowDW().

◆ ResizeBorderDW()

HRESULT STDMETHODCALLTYPE CBaseBar::ResizeBorderDW ( LPCRECT  prcBorder,
IUnknown punkToolbarSite,
BOOL  fReserved 
)
override

Implements IDockingWindow.

Definition at line 387 of file CBaseBar.cpp.

388{
390 return S_OK;
391}

◆ Save() [1/2]

HRESULT STDMETHODCALLTYPE CBaseBar::Save ( IPropertyBag pPropBag,
BOOL  fClearDirty,
BOOL  fSaveAllProperties 
)
override

Implements IPersistPropertyBag.

Definition at line 449 of file CBaseBar.cpp.

450{
451 return E_NOTIMPL;
452}

◆ Save() [2/2]

HRESULT STDMETHODCALLTYPE CBaseBar::Save ( IStream pStm,
BOOL  fClearDirty 
)
override

Implements IPersistStream.

Definition at line 427 of file CBaseBar.cpp.

428{
429 return E_NOTIMPL;
430}

◆ SetClient()

HRESULT STDMETHODCALLTYPE CBaseBar::SetClient ( IUnknown punkClient)
override

Implements IDeskBar.

Definition at line 316 of file CBaseBar.cpp.

317{
318 CComPtr<IOleWindow> oleWindow;
319 HWND ownerWindow;
320 HRESULT hResult;
321
322 /* Clean up old client */
323 fClient = NULL;
324
325 if (punkClient)
326 {
327 hResult = punkClient->QueryInterface(IID_PPV_ARG(IUnknown, &fClient));
328 if (FAILED_UNEXPECTEDLY(hResult))
329 return hResult;
330 hResult = fSite->QueryInterface(IID_PPV_ARG(IOleWindow, &oleWindow));
331 if (FAILED_UNEXPECTEDLY(hResult))
332 return hResult;
333 hResult = oleWindow->GetWindow(&ownerWindow);
334 if (FAILED_UNEXPECTEDLY(hResult))
335 return hResult;
336 Create(ownerWindow, 0, NULL,
339 }
340 else
341 {
343 }
344 return S_OK;
345}
@ Create
Definition: registry.c:563
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_CHILDWINDOW
Definition: pedump.c:639
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by CloseDW().

◆ SetSite()

HRESULT STDMETHODCALLTYPE CBaseBar::SetSite ( IUnknown pUnkSite)
override

Implements IObjectWithSite.

Definition at line 393 of file CBaseBar.cpp.

394{
395 fSite = pUnkSite;
396 return S_OK;
397}

Referenced by CloseDW().

◆ ShowDW()

HRESULT STDMETHODCALLTYPE CBaseBar::ShowDW ( BOOL  fShow)
override

Implements IDockingWindow.

Definition at line 369 of file CBaseBar.cpp.

370{
371 fVisible = fShow ? true : false;
372 ShowWindow(fShow);
374 return S_OK;
375}
#define true
Definition: stdbool.h:36
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)

Referenced by CloseDW(), and Exec().

◆ TranslateAcceleratorIO()

HRESULT STDMETHODCALLTYPE CBaseBar::TranslateAcceleratorIO ( LPMSG  lpMsg)
override

Definition at line 311 of file CBaseBar.cpp.

312{
314}
HRESULT WINAPI IUnknown_TranslateAcceleratorIO(IUnknown *lpUnknown, LPMSG lpMsg)
Definition: ordinal.c:4263

◆ UIActivateIO()

HRESULT STDMETHODCALLTYPE CBaseBar::UIActivateIO ( BOOL  fActivate,
LPMSG  lpMsg 
)
override

Definition at line 301 of file CBaseBar.cpp.

302{
303 return IUnknown_UIActivateIO(fClient, fActivate, lpMsg);
304}
HRESULT WINAPI IUnknown_UIActivateIO(IUnknown *unknown, BOOL activate, LPMSG msg)
Definition: ordinal.c:1629

Member Data Documentation

◆ fClient

CComPtr<IUnknown> CBaseBar::fClient
private

◆ fClientWindow

HWND CBaseBar::fClientWindow
private

Definition at line 56 of file CBaseBar.cpp.

Referenced by CBaseBar().

◆ fLastLocation

POINT CBaseBar::fLastLocation
private

Definition at line 63 of file CBaseBar.cpp.

Referenced by OnLButtonDown(), and OnMouseMove().

◆ fNeededSize

int CBaseBar::fNeededSize
private

Definition at line 59 of file CBaseBar.cpp.

Referenced by CBaseBar(), OnMouseMove(), OnPosRectChangeDB(), and ReserveBorderSpace().

◆ fSite

CComPtr<IUnknown> CBaseBar::fSite
private

◆ fTracking

bool CBaseBar::fTracking
private

◆ fVertical

bool CBaseBar::fVertical
private

◆ fVisible

bool CBaseBar::fVisible
private

Definition at line 58 of file CBaseBar.cpp.

Referenced by CBaseBar(), OnSize(), ReserveBorderSpace(), and ShowDW().


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