[RSHELL]
[reactos.git] / base / shell / rshell / logging / CMenuDeskBarWrap.cpp
1 /*
2 * Shell Menu Desk Bar
3 *
4 * Copyright 2014 David Quintana
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20 #include "precomp.h"
21 #include "wraplog.h"
22
23 class CMenuDeskBarWrap :
24 public CComCoClass<CMenuDeskBarWrap>,
25 public CComObjectRootEx<CComMultiThreadModelNoCS>,
26 public IOleCommandTarget,
27 public IServiceProvider,
28 public IInputObjectSite,
29 public IInputObject,
30 public IMenuPopup,
31 public IObjectWithSite,
32 public IBanneredBar,
33 public IInitializeObject
34 {
35 public:
36 CMenuDeskBarWrap() {}
37 ~CMenuDeskBarWrap();
38
39 HRESULT InitWrap(IDeskBar * shellMenu);
40
41 private:
42 CComPtr<IMenuPopup > m_IMenuPopup;
43 CComPtr<IOleCommandTarget > m_IOleCommandTarget;
44 CComPtr<IServiceProvider > m_IServiceProvider;
45 CComPtr<IDeskBar > m_IDeskBar;
46 CComPtr<IOleWindow > m_IOleWindow;
47 CComPtr<IInputObjectSite > m_IInputObjectSite;
48 CComPtr<IInputObject > m_IInputObject;
49 CComPtr<IObjectWithSite > m_IObjectWithSite;
50 CComPtr<IBanneredBar > m_IBanneredBar;
51 CComPtr<IInitializeObject > m_IInitializeObject;
52
53 public:
54 // *** IMenuPopup methods ***
55 virtual HRESULT STDMETHODCALLTYPE Popup(POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags);
56 virtual HRESULT STDMETHODCALLTYPE OnSelect(DWORD dwSelectType);
57 virtual HRESULT STDMETHODCALLTYPE SetSubMenu(IMenuPopup *pmp, BOOL fSet);
58
59 // *** IOleWindow methods ***
60 virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd);
61 virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
62
63 // *** IObjectWithSite methods ***
64 virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite);
65 virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, PVOID *ppvSite);
66
67 // *** IBanneredBar methods ***
68 virtual HRESULT STDMETHODCALLTYPE SetIconSize(DWORD iIcon);
69 virtual HRESULT STDMETHODCALLTYPE GetIconSize(DWORD* piIcon);
70 virtual HRESULT STDMETHODCALLTYPE SetBitmap(HBITMAP hBitmap);
71 virtual HRESULT STDMETHODCALLTYPE GetBitmap(HBITMAP* phBitmap);
72
73 // *** IInitializeObject methods ***
74 virtual HRESULT STDMETHODCALLTYPE Initialize(THIS);
75
76 // *** IOleCommandTarget methods ***
77 virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText);
78 virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
79
80 // *** IServiceProvider methods ***
81 virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject);
82
83 // *** IInputObjectSite methods ***
84 virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(LPUNKNOWN lpUnknown, BOOL bFocus);
85
86 // *** IInputObject methods ***
87 virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL bActivating, LPMSG lpMsg);
88 virtual HRESULT STDMETHODCALLTYPE HasFocusIO(THIS);
89 virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg);
90
91 // *** IDeskBar methods ***
92 virtual HRESULT STDMETHODCALLTYPE SetClient(IUnknown *punkClient);
93 virtual HRESULT STDMETHODCALLTYPE GetClient(IUnknown **ppunkClient);
94 virtual HRESULT STDMETHODCALLTYPE OnPosRectChangeDB(LPRECT prc);
95
96 DECLARE_NOT_AGGREGATABLE(CMenuDeskBarWrap)
97 DECLARE_PROTECT_FINAL_CONSTRUCT()
98
99 BEGIN_COM_MAP(CMenuDeskBarWrap)
100 COM_INTERFACE_ENTRY_IID(IID_IMenuPopup, IMenuPopup)
101 COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
102 COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
103 COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite)
104 COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject)
105 COM_INTERFACE_ENTRY_IID(IID_IDeskBar, IMenuPopup)
106 COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IMenuPopup)
107 COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
108 COM_INTERFACE_ENTRY_IID(IID_IBanneredBar, IBanneredBar)
109 COM_INTERFACE_ENTRY_IID(IID_IInitializeObject, IInitializeObject)
110 END_COM_MAP()
111 };
112
113 extern "C"
114 HRESULT CMenuDeskBar_Wrapper(IDeskBar * deskBar, REFIID riid, LPVOID *ppv)
115 {
116 HRESULT hr;
117
118 *ppv = NULL;
119
120 CMenuDeskBarWrap * bar = new CComObject<CMenuDeskBarWrap>();
121 if (!bar)
122 return E_OUTOFMEMORY;
123
124 hr = bar->InitWrap(deskBar);
125 if (FAILED(hr))
126 {
127 bar->Release();
128 return hr;
129 }
130
131 hr = bar->QueryInterface(riid, ppv);
132
133 if (FAILED(hr))
134 bar->Release();
135
136 return hr;
137 }
138
139 HRESULT CMenuDeskBarWrap::InitWrap(IDeskBar * deskBar)
140 {
141 HRESULT hr;
142
143 WrapLogOpen();
144
145 m_IDeskBar = deskBar;
146
147 hr = deskBar->QueryInterface(IID_PPV_ARG(IOleCommandTarget, &m_IOleCommandTarget));
148 if (FAILED(hr)) return hr;
149 hr = deskBar->QueryInterface(IID_PPV_ARG(IServiceProvider, &m_IServiceProvider));
150 if (FAILED(hr)) return hr;
151 hr = deskBar->QueryInterface(IID_PPV_ARG(IMenuPopup, &m_IMenuPopup));
152 if (FAILED(hr)) return hr;
153 hr = deskBar->QueryInterface(IID_PPV_ARG(IOleWindow, &m_IOleWindow));
154 if (FAILED(hr)) return hr;
155 hr = deskBar->QueryInterface(IID_PPV_ARG(IInputObjectSite, &m_IInputObjectSite));
156 if (FAILED(hr)) return hr;
157 hr = deskBar->QueryInterface(IID_PPV_ARG(IInputObject, &m_IInputObject));
158 if (FAILED(hr)) return hr;
159 hr = deskBar->QueryInterface(IID_PPV_ARG(IObjectWithSite, &m_IObjectWithSite));
160 if (FAILED(hr)) return hr;
161 hr = deskBar->QueryInterface(IID_PPV_ARG(IBanneredBar, &m_IBanneredBar));
162 if (FAILED(hr)) return hr;
163 hr = deskBar->QueryInterface(IID_PPV_ARG(IInitializeObject, &m_IInitializeObject));
164 return hr;
165 }
166
167 CMenuDeskBarWrap::~CMenuDeskBarWrap()
168 {
169 WrapLogClose();
170 }
171
172 // *** IMenuPopup methods ***
173 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::Popup(POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags)
174 {
175 WrapLogEnter("CMenuDeskBarWrap<%p>::Popup(POINTL *ppt=%p, RECTL *prcExclude=%p, MP_POPUPFLAGS dwFlags=%08x)\n", this, ppt, prcExclude, dwFlags);
176 HRESULT hr = m_IMenuPopup->Popup(ppt, prcExclude, dwFlags);
177 WrapLogExit("CMenuDeskBarWrap::Popup() = %08x\n", hr);
178 return hr;
179 }
180
181 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::OnSelect(DWORD dwSelectType)
182 {
183 WrapLogEnter("CMenuDeskBarWrap<%p>::OnSelect(DWORD dwSelectType=%08x)\n", this, dwSelectType);
184 HRESULT hr = m_IMenuPopup->OnSelect(dwSelectType);
185 WrapLogExit("CMenuDeskBarWrap::OnSelect() = %08x\n", hr);
186 return hr;
187 }
188
189 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::SetSubMenu(IMenuPopup *pmp, BOOL fSet)
190 {
191 WrapLogEnter("CMenuDeskBarWrap<%p>::SetSubMenu(IMenuPopup *pmp=%p, BOOL fSet=%d)\n", this, pmp, fSet);
192 HRESULT hr = m_IMenuPopup->SetSubMenu(pmp, fSet);
193 WrapLogExit("CMenuDeskBarWrap::SetSubMenu() = %08x\n", hr);
194 return hr;
195 }
196
197 // *** IOleWindow methods ***
198 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::GetWindow(HWND *phwnd)
199 {
200 WrapLogEnter("CMenuDeskBarWrap<%p>::GetWindow(HWND *phwnd=%p)\n", this, phwnd);
201 HRESULT hr = m_IOleWindow->GetWindow(phwnd);
202 if (phwnd) WrapLogMsg("*phwnd=%p\n", *phwnd);
203 WrapLogExit("CMenuDeskBarWrap::GetWindow() = %08x\n", hr);
204 return hr;
205 }
206
207 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::ContextSensitiveHelp(BOOL fEnterMode)
208 {
209 WrapLogEnter("CMenuDeskBarWrap<%p>::ContextSensitiveHelp(BOOL fEnterMode=%d)\n", this, fEnterMode);
210 HRESULT hr = m_IOleWindow->ContextSensitiveHelp(fEnterMode);
211 WrapLogExit("CMenuDeskBarWrap::ContextSensitiveHelp() = %08x\n", hr);
212 return hr;
213 }
214
215 // *** IObjectWithSite methods ***
216 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::SetSite(IUnknown *pUnkSite)
217 {
218 WrapLogEnter("CMenuDeskBarWrap<%p>::SetSite(IUnknown *pUnkSite=%p)\n", this, pUnkSite);
219 HRESULT hr = m_IObjectWithSite->SetSite(pUnkSite);
220 WrapLogExit("CMenuDeskBarWrap::SetSite() = %08x\n", hr);
221 return hr;
222 }
223
224 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::GetSite(REFIID riid, PVOID *ppvSite)
225 {
226 WrapLogEnter("CMenuDeskBarWrap<%p>::GetSite(REFIID riid=%s, PVOID *ppvSite=%p)\n", this, Wrap(riid), ppvSite);
227 HRESULT hr = m_IObjectWithSite->GetSite(riid, ppvSite);
228 if (ppvSite) WrapLogMsg("*ppvSite=%p\n", *ppvSite);
229 WrapLogExit("CMenuDeskBarWrap::GetSite() = %08x\n", hr);
230 return hr;
231 }
232
233 // *** IBanneredBar methods ***
234 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::SetIconSize(DWORD iIcon)
235 {
236 WrapLogEnter("CMenuDeskBarWrap<%p>::SetIconSize(DWORD iIcon=%d)\n", this, iIcon);
237 HRESULT hr = m_IBanneredBar->SetIconSize(iIcon);
238 WrapLogExit("CMenuDeskBarWrap::SetIconSize() = %08x\n", hr);
239 return hr;
240 }
241
242 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::GetIconSize(DWORD* piIcon)
243 {
244 WrapLogEnter("CMenuDeskBarWrap<%p>::GetIconSize(DWORD* piIcon=%p)\n", this, piIcon);
245 HRESULT hr = m_IBanneredBar->GetIconSize(piIcon);
246 if (piIcon) WrapLogMsg("*piIcon=%d\n", *piIcon);
247 WrapLogExit("CMenuDeskBarWrap::GetIconSize() = %08x\n", hr);
248 return hr;
249 }
250
251 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::SetBitmap(HBITMAP hBitmap)
252 {
253 WrapLogEnter("CMenuDeskBarWrap<%p>::SetBitmap(HBITMAP hBitmap=%p)\n", this, hBitmap);
254 HRESULT hr = m_IBanneredBar->SetBitmap(hBitmap);
255 WrapLogExit("CMenuDeskBarWrap::SetBitmap() = %08x\n", hr);
256 return hr;
257 }
258
259 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::GetBitmap(HBITMAP* phBitmap)
260 {
261 WrapLogEnter("CMenuDeskBarWrap<%p>::GetBitmap(HBITMAP* phBitmap=%p)\n", this, phBitmap);
262 HRESULT hr = m_IBanneredBar->GetBitmap(phBitmap);
263 if (phBitmap) WrapLogMsg("*phBitmap=%p\n", *phBitmap);
264 WrapLogExit("CMenuDeskBarWrap::GetBitmap() = %08x\n", hr);
265 return hr;
266 }
267
268
269 // *** IInitializeObject methods ***
270 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::Initialize(THIS)
271 {
272 WrapLogEnter("CMenuDeskBarWrap<%p>::Initialize()\n", this);
273 HRESULT hr = m_IInitializeObject->Initialize();
274 WrapLogExit("CMenuDeskBarWrap::Initialize() = %08x\n", hr);
275 return hr;
276 }
277
278 // *** IOleCommandTarget methods ***
279 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText)
280 {
281 WrapLogEnter("CMenuDeskBarWrap<%p>::QueryStatus(const GUID *pguidCmdGroup=%p, ULONG cCmds=%u, prgCmds=%p, pCmdText=%p)\n", this, pguidCmdGroup, cCmds, prgCmds, pCmdText);
282 HRESULT hr = m_IOleCommandTarget->QueryStatus(pguidCmdGroup, cCmds, prgCmds, pCmdText);
283 if (pguidCmdGroup) WrapLogMsg("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup));
284 WrapLogExit("CMenuDeskBarWrap::QueryStatus() = %08x\n", hr);
285 return hr;
286 }
287
288 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
289 {
290 WrapLogEnter("CMenuDeskBarWrap<%p>::Exec(const GUID *pguidCmdGroup=%p, DWORD nCmdID=%d, DWORD nCmdexecopt=%d, VARIANT *pvaIn=%p, VARIANT *pvaOut=%p)\n", this, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
291 if (pguidCmdGroup) WrapLogMsg("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup));
292 HRESULT hr = m_IOleCommandTarget->Exec(pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
293 WrapLogExit("CMenuDeskBarWrap::Exec() = %08x\n", hr);
294 return hr;
295 }
296
297 // *** IServiceProvider methods ***
298 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
299 {
300 WrapLogEnter("CMenuDeskBarWrap<%p>::QueryService(REFGUID guidService=%s, REFIID riid=%s, void **ppvObject=%p)\n", this, Wrap(guidService), Wrap(riid), ppvObject);
301
302 if (IsEqualIID(guidService, SID_SMenuPopup))
303 {
304 WrapLogMsg("SID is SID_SMenuPopup. Using QueryInterface of self instead of wrapped object.\n");
305 HRESULT hr = this->QueryInterface(riid, ppvObject);
306 if (ppvObject) WrapLogMsg("*ppvObject=%p\n", *ppvObject);
307 if (SUCCEEDED(hr))
308 {
309 WrapLogExit("CMenuDeskBarWrap::QueryService() = %08x\n", hr);
310 return hr;
311 }
312 else
313 {
314 WrapLogMsg("QueryInterface on wrapper failed. Handing over to innter object.\n");
315 }
316 }
317 else if (IsEqualIID(guidService, SID_SMenuBandParent))
318 {
319 WrapLogMsg("SID is SID_SMenuBandParent. Using QueryInterface of self instead of wrapped object.\n");
320 HRESULT hr = this->QueryInterface(riid, ppvObject);
321 if (ppvObject) WrapLogMsg("*ppvObject=%p\n", *ppvObject);
322 if (SUCCEEDED(hr))
323 {
324 WrapLogExit("CMenuDeskBarWrap::QueryService() = %08x\n", hr);
325 return hr;
326 }
327 else
328 {
329 WrapLogMsg("QueryInterface on wrapper failed. Handing over to innter object.\n");
330 }
331 }
332 else if (IsEqualIID(guidService, SID_STopLevelBrowser))
333 {
334 WrapLogMsg("SID is SID_STopLevelBrowser. Using QueryInterface of self instead of wrapped object.\n");
335 HRESULT hr = this->QueryInterface(riid, ppvObject);
336 if (ppvObject) WrapLogMsg("*ppvObject=%p\n", *ppvObject);
337 if (SUCCEEDED(hr))
338 {
339 WrapLogExit("CMenuDeskBarWrap::QueryService() = %08x\n", hr);
340 return hr;
341 }
342 else
343 {
344 WrapLogMsg("QueryInterface on wrapper failed. Handing over to innter object.\n");
345 }
346 }
347 else
348 {
349 WrapLogMsg("SID not identified. Calling wrapped object's QueryService.\n");
350 }
351 HRESULT hr = m_IServiceProvider->QueryService(guidService, riid, ppvObject);
352 if (ppvObject) WrapLogMsg("*ppvObject=%p\n", *ppvObject);
353 WrapLogExit("CMenuDeskBarWrap::QueryService() = %08x\n", hr);
354 return hr;
355 }
356
357 // *** IInputObjectSite methods ***
358 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::OnFocusChangeIS(LPUNKNOWN lpUnknown, BOOL bFocus)
359 {
360 WrapLogEnter("CMenuDeskBarWrap<%p>::OnFocusChangeIS(LPUNKNOWN lpUnknown=%p, BOOL bFocus=%d)\n", this, lpUnknown, bFocus);
361 HRESULT hr = m_IInputObjectSite->OnFocusChangeIS(lpUnknown, bFocus);
362 WrapLogExit("CMenuDeskBarWrap::OnFocusChangeIS() = %08x\n", hr);
363 return hr;
364 }
365
366 // *** IInputObject methods ***
367 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::UIActivateIO(BOOL bActivating, LPMSG lpMsg)
368 {
369 WrapLogEnter("CMenuDeskBarWrap<%p>::UIActivateIO(BOOL bActivating=%d, LPMSG lpMsg=%p)\n", this, bActivating, lpMsg);
370 HRESULT hr = m_IInputObject->UIActivateIO(bActivating, lpMsg);
371 WrapLogExit("CMenuDeskBarWrap::UIActivateIO() = %08x\n", hr);
372 return hr;
373 }
374
375 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::HasFocusIO(THIS)
376 {
377 WrapLogEnter("CMenuDeskBarWrap<%p>::HasFocusIO()\n", this);
378 HRESULT hr = m_IInputObject->HasFocusIO();
379 WrapLogExit("CMenuDeskBarWrap::HasFocusIO() = %08x\n", hr);
380 return hr;
381 }
382
383 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::TranslateAcceleratorIO(LPMSG lpMsg)
384 {
385 WrapLogEnter("CMenuDeskBarWrap<%p>::TranslateAcceleratorIO(LPMSG lpMsg=%p)\n", this, lpMsg);
386 if (lpMsg) WrapLogMsg("*lpMsg=%s\n", Wrap(*lpMsg));
387 HRESULT hr = m_IInputObject->TranslateAcceleratorIO(lpMsg);
388 WrapLogExit("CMenuDeskBarWrap::TranslateAcceleratorIO() = %08x\n", hr);
389 return hr;
390 }
391
392 // *** IDeskBar methods ***
393 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::SetClient(IUnknown *punkClient)
394 {
395 WrapLogEnter("CMenuDeskBarWrap<%p>::SetClient(IUnknown *punkClient=%p)\n", this, punkClient);
396 HRESULT hr = m_IDeskBar->SetClient(punkClient);
397 WrapLogExit("CMenuDeskBarWrap::SetClient() = %08x\n", hr);
398
399 CComPtr<IDeskBarClient> dbc;
400 punkClient->QueryInterface(IID_PPV_ARG(IDeskBarClient, &dbc));
401 dbc->SetDeskBarSite(static_cast<IDeskBar*>(this));
402
403 return hr;
404 }
405
406 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::GetClient(IUnknown **ppunkClient)
407 {
408 WrapLogEnter("CMenuDeskBarWrap<%p>::GetClient(IUnknown **ppunkClient=%p)\n", this, ppunkClient);
409 HRESULT hr = m_IDeskBar->GetClient(ppunkClient);
410 if (ppunkClient) WrapLogMsg("*ppunkClient=%p\n", *ppunkClient);
411 WrapLogExit("CMenuDeskBarWrap::GetClient() = %08x\n", hr);
412 return hr;
413 }
414
415 HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::OnPosRectChangeDB(LPRECT prc)
416 {
417 WrapLogEnter("CMenuDeskBarWrap<%p>::OnPosRectChangeDB(RECT *prc=%p)\n", this, prc);
418 HRESULT hr = m_IDeskBar->OnPosRectChangeDB(prc);
419 if (prc) WrapLogMsg("*prc=%s\n", Wrap(*prc));
420 WrapLogExit("CMenuDeskBarWrap::OnPosRectChangeDB() = %08x\n", hr);
421 return hr;
422 }