ReactOS  0.4.14-dev-98-gb0d4763
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  }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
BASE super
Definition: webchild.h:323

◆ 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  }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
BASE super
Definition: webchild.h:323

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  }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
void attach(HWND hwnd)
Definition: webchild.h:154
SMARTPTR _control
Definition: webchild.h:375
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
HRESULT attach_control(IOleObject *ole_obj, LONG iVerb=OLEIVERB_INPLACEACTIVATE, HWND hwndParent=0, LPCRECT pRect=NULL)
Definition: webchild.h:159
const GUID IID_IOleInPlaceObject
const GUID IID_IOleObject
LONG HRESULT
Definition: typedefs.h:77
REFCLSID clsid
Definition: msctf.c:84
OleInPlaceClient _client_side
Definition: webchild.h:376
SIfacePtr< IOleInPlaceObject > _in_place_object
Definition: webchild.h:377
wrapper class for COM interface pointers
Definition: shellclasses.h:332

◆ 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  }
SMARTPTR _control
Definition: webchild.h:375
& rect
Definition: startmenu.cpp:1413
HRESULT SetObjectRects([in] LPCRECT lprcPosRect, [in] LPCRECT lprcClipRect)
HRESULT detach(IOleObject *ole_obj, DWORD dwSaveOption=OLECLOSE_SAVEIFDIRTY)
Definition: webchild.h:172
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IOleObject
#define WM_SIZE
Definition: winuser.h:1593
#define WM_CLOSE
Definition: winuser.h:1603
OleInPlaceClient _client_side
Definition: webchild.h:376
LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
Definition: solitaire.cpp:598
SIfacePtr< IOleInPlaceObject > _in_place_object
Definition: webchild.h:377
wrapper class for COM interface pointers
Definition: shellclasses.h:332
#define HIWORD(l)
Definition: typedefs.h:246
#define LOWORD(l)
Definition: pedump.c:82
static UINT WPARAM wparam
Definition: combo.c:716

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: