ReactOS 0.4.15-dev-8131-g4988de4
IPCtrlWindow< BASE, SMARTPTR > Struct Template Reference

#include <webchild.h>

Inheritance diagram for IPCtrlWindow< BASE, SMARTPTR >:
Collaboration diagram for IPCtrlWindow< BASE, SMARTPTR >:

Public Types

typedef BASE super
 

Public Member Functions

 IPCtrlWindow (HWND hwnd)
 
template<typename T >
 IPCtrlWindow (HWND hwnd, T &info)
 
HRESULT create_control (HWND hwnd, REFIID clsid, REFIID riid)
 

Protected Member Functions

LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
 

Protected Attributes

ComInit _usingCOM
 
SMARTPTR _control
 
OleInPlaceClient _client_side
 
SIfacePtr< IOleInPlaceObject_in_place_object
 

Detailed Description

template<typename BASE, typename SMARTPTR>
struct IPCtrlWindow< BASE, SMARTPTR >

Definition at line 321 of file webchild.h.

Member Typedef Documentation

◆ super

template<typename BASE , typename SMARTPTR >
typedef BASE IPCtrlWindow< BASE, SMARTPTR >::super

Definition at line 323 of file webchild.h.

Constructor & Destructor Documentation

◆ IPCtrlWindow() [1/2]

template<typename BASE , typename SMARTPTR >
IPCtrlWindow< BASE, SMARTPTR >::IPCtrlWindow ( HWND  hwnd)
inline

Definition at line 325 of file webchild.h.

326 : super(hwnd)
327 {
328 }
BASE super
Definition: webchild.h:323
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ IPCtrlWindow() [2/2]

template<typename BASE , typename SMARTPTR >
template<typename T >
IPCtrlWindow< BASE, SMARTPTR >::IPCtrlWindow ( HWND  hwnd,
T info 
)
inline

Definition at line 330 of file webchild.h.

331 : super(hwnd, info)
332 {
333 }

Member Function Documentation

◆ create_control()

template<typename BASE , typename SMARTPTR >
HRESULT IPCtrlWindow< BASE, SMARTPTR >::create_control ( HWND  hwnd,
REFIID  clsid,
REFIID  riid 
)
inline

Definition at line 335 of file webchild.h.

336 {
337 // Erzeugen einer Instanz des Controls
338 HRESULT hr = _control.CreateInstance(clsid, riid);
339 if (FAILED(hr))
340 return hr;
341
343
345 hwnd, &Rect(10, 10, 500, 500)*/);
346 if (FAILED(hr))
347 return hr;
348
349 // try to get a IOleInPlaceObject interface for window resizing
350 return _control.QueryInterface(IID_IOleInPlaceObject, &_in_place_object); // _in_place_object = _control
351 }
REFIID riid
Definition: atlbase.h:39
#define FAILED(hr)
Definition: intsafe.h:51
REFCLSID clsid
Definition: msctf.c:82
const GUID IID_IOleInPlaceObject
const GUID IID_IOleObject
HRESULT hr
Definition: shlfolder.c:183
OleInPlaceClient _client_side
Definition: webchild.h:376
SMARTPTR _control
Definition: webchild.h:375
SIfacePtr< IOleInPlaceObject > _in_place_object
Definition: webchild.h:377
void attach(HWND hwnd)
Definition: webchild.h:154
HRESULT attach_control(IOleObject *ole_obj, LONG iVerb=OLEIVERB_INPLACEACTIVATE, HWND hwndParent=0, LPCRECT pRect=NULL)
Definition: webchild.h:159
wrapper class for COM interface pointers
Definition: shellclasses.h:333

◆ WndProc()

template<typename BASE , typename SMARTPTR >
LRESULT IPCtrlWindow< BASE, SMARTPTR >::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
)
inlineprotected

Definition at line 354 of file webchild.h.

355 {
356 if (nmsg == WM_SIZE) {
357 if (_in_place_object) {
358 RECT rect = {0, 0, LOWORD(lparam), HIWORD(lparam)};
359
361 }
362 } else if (nmsg == WM_CLOSE) {
364
365 if (_control) {
367 _control = NULL;
368 }
369 }
370
371 return super::WndProc(nmsg, wparam, lparam);
372 }
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
#define NULL
Definition: types.h:112
HRESULT SetObjectRects([in] LPCRECT lprcPosRect, [in] LPCRECT lprcClipRect)
#define LOWORD(l)
Definition: pedump.c:82
& rect
Definition: startmenu.cpp:1413
HRESULT detach(IOleObject *ole_obj, DWORD dwSaveOption=OLECLOSE_SAVEIFDIRTY)
Definition: webchild.h:172
#define HIWORD(l)
Definition: typedefs.h:247
#define WM_CLOSE
Definition: winuser.h:1621
#define WM_SIZE
Definition: winuser.h:1611

Member Data Documentation

◆ _client_side

template<typename BASE , typename SMARTPTR >
OleInPlaceClient IPCtrlWindow< BASE, SMARTPTR >::_client_side
protected

◆ _control

template<typename BASE , typename SMARTPTR >
SMARTPTR IPCtrlWindow< BASE, SMARTPTR >::_control
protected

◆ _in_place_object

template<typename BASE , typename SMARTPTR >
SIfacePtr<IOleInPlaceObject> IPCtrlWindow< BASE, SMARTPTR >::_in_place_object
protected

◆ _usingCOM

template<typename BASE , typename SMARTPTR >
ComInit IPCtrlWindow< BASE, SMARTPTR >::_usingCOM
protected

Definition at line 374 of file webchild.h.


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