MCPcopy Create free account
hub / github.com/LegacyUpdate/LegacyUpdate / IOleInPlaceObjectImpl

Class IOleInPlaceObjectImpl

include/com/IOleInPlaceObjectImpl.h:9–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8template<typename TImpl>
9class IOleInPlaceObjectImpl : public ComClass<TImpl, IOleInPlaceObject> {
10public:
11 IOleInPlaceObjectImpl(TImpl *pParent) : ComClass<TImpl, IOleInPlaceObject>(pParent) {}
12
13 // IOleWindow
14 STDMETHODIMP GetWindow(HWND *phwnd) {
15 if (phwnd == NULL) {
16 return E_POINTER;
17 }
18 *phwnd = this->m_pParent->m_innerHwnd;
19 return *phwnd == NULL ? E_FAIL : S_OK;
20 }
21
22 STDMETHODIMP ContextSensitiveHelp(BOOL fEnterMode) {
23 return E_NOTIMPL;
24 }
25
26 // IOleInPlaceObject
27 STDMETHODIMP InPlaceDeactivate(void) {
28 return S_OK;
29 }
30
31 STDMETHODIMP UIDeactivate(void) {
32 return S_OK;
33 }
34
35 STDMETHODIMP SetObjectRects(LPCRECT lprcPosRect, LPCRECT lprcClipRect) {
36 if (lprcPosRect == NULL) {
37 return E_POINTER;
38 }
39
40 if (this->m_pParent->m_innerHwnd) {
41 SetWindowPos(
42 this->m_pParent->m_innerHwnd, NULL,
43 lprcPosRect->left, lprcPosRect->top,
44 lprcPosRect->right - lprcPosRect->left,
45 lprcPosRect->bottom - lprcPosRect->top,
46 SWP_NOZORDER | SWP_SHOWWINDOW
47 );
48 }
49
50 return S_OK;
51 }
52
53 STDMETHODIMP ReactivateAndUndo(void) {
54 return E_NOTIMPL;
55 }
56};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected