Click here to Skip to main content
14,693,631 members
Home » Discussions » ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: COM or DCOM? Pin
bkelly1320-May-13 17:19
Memberbkelly1320-May-13 17:19 
AnswerRe: COM or DCOM? Pin
imagiro4-Jul-13 2:51
Memberimagiro4-Jul-13 2:51 
QuestionI have backward compatibility, is the forward compatibility is ensured ? Pin
MrKBA17-Apr-13 7:29
MemberMrKBA17-Apr-13 7:29 
AnswerRe: I have backward compatibility, is the forward compatibility is ensured ? Pin
Richard MacCutchan17-Apr-13 10:15
mveRichard MacCutchan17-Apr-13 10:15 
AnswerRe: I have backward compatibility, is the forward compatibility is ensured ? Pin
Marco Bertschi23-Apr-13 3:34
professionalMarco Bertschi23-Apr-13 3:34 
QuestionConverting souce code form serialization/ de serialization "MBCS" to serialization/ de serialization "UNICODE" : MFC Pin
ptr_Electron16-Apr-13 20:56
Memberptr_Electron16-Apr-13 20:56 
AnswerRe: Converting souce code form serialization/ de serialization "MBCS" to serialization/ de serialization "UNICODE" : MFC Pin
Richard MacCutchan16-Apr-13 22:10
mveRichard MacCutchan16-Apr-13 22:10 
QuestionHidden window cannot get WM_COPYDATA message? Pin
yihung.hung16-Apr-13 20:26
Memberyihung.hung16-Apr-13 20:26 
My code is:

class CSubTapiCom;

class CWinHidden :
public CWindowImpl
{
BEGIN_MSG_MAP(CWinHidden)
MESSAGE_HANDLER(WM_COPYDATA, OnCopyData)
MESSAGE_HANDLER(WM_TIMER, OnTimer)
END_MSG_MAP()
public:
//CWinHidden() {};
CWinHidden(CSubTapiCom* pFullCtrl) : m_pFullCtrl(pFullCtrl) {};

public:
LRESULT OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT CWinHidden::OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
m_pFullCtrl->OnCopyData(uMsg, wParam, lParam, bHandled);

return 0;
}
private:
CSubTapiCom* m_pFullCtrl;
};


// CSubTapiCom
class ATL_NO_VTABLE CSubTapiCom :
public CComObjectRootEx,
public CStockPropImpl,
public IPersistStreamInitImpl,
public IOleControlImpl,
public IOleObjectImpl,
public IOleInPlaceActiveObjectImpl,
public IViewObjectExImpl,
public IOleInPlaceObjectWindowlessImpl,
public ISupportErrorInfo,
public IConnectionPointContainerImpl,
public CProxy_ISubTapiComEvents,
public IPersistStorageImpl,
public ISpecifyPropertyPagesImpl,
public IQuickActivateImpl,
#ifndef _WIN32_WCE
public IDataObjectImpl,
#endif
public IProvideClassInfo2Impl<&CLSID_SubTapiCom, &__uuidof(_ISubTapiComEvents), &LIBID_SubTapiATLcomLib>,
#ifdef _WIN32_WCE // IObjectSafety is required on Windows CE for the control to be loaded correctly
public IObjectSafetyImpl,
#endif
public CComCoClass,
public CComControl
{

CWinHidden m_wndHidden;
HWND m_hHidden;
UINT m_uintTimer;
public:


CSubTapiCom() : m_wndHidden(this)
{
}

DECLARE_OLEMISC_STATUS(OLEMISC_RECOMPOSEONRESIZE |
OLEMISC_CANTLINKINSIDE |
OLEMISC_INSIDEOUT |
OLEMISC_ACTIVATEWHENVISIBLE |
OLEMISC_SETCLIENTSITEFIRST
)

DECLARE_REGISTRY_RESOURCEID(IDR_SUBTAPICOM)


BEGIN_COM_MAP(CSubTapiCom)
COM_INTERFACE_ENTRY(ISubTapiCom)
COM_INTERFACE_ENTRY(IDispatch)
COM_INTERFACE_ENTRY(IViewObjectEx)
COM_INTERFACE_ENTRY(IViewObject2)
COM_INTERFACE_ENTRY(IViewObject)
COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless)
COM_INTERFACE_ENTRY(IOleInPlaceObject)
COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObjectWindowless)
COM_INTERFACE_ENTRY(IOleInPlaceActiveObject)
COM_INTERFACE_ENTRY(IOleControl)
COM_INTERFACE_ENTRY(IOleObject)
COM_INTERFACE_ENTRY(IPersistStreamInit)
COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit)
COM_INTERFACE_ENTRY(ISupportErrorInfo)
COM_INTERFACE_ENTRY(IConnectionPointContainer)
COM_INTERFACE_ENTRY(ISpecifyPropertyPages)
COM_INTERFACE_ENTRY(IQuickActivate)
COM_INTERFACE_ENTRY(IPersistStorage)
#ifndef _WIN32_WCE
COM_INTERFACE_ENTRY(IDataObject)
#endif
COM_INTERFACE_ENTRY(IProvideClassInfo)
COM_INTERFACE_ENTRY(IProvideClassInfo2)
#ifdef _WIN32_WCE // IObjectSafety is required on Windows CE for the control to be loaded correctly
COM_INTERFACE_ENTRY_IID(IID_IObjectSafety, IObjectSafety)
#endif
END_COM_MAP()

BEGIN_PROP_MAP(CSubTapiCom)
PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4)
PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4)
PROP_ENTRY_TYPE("AutoSize", DISPID_AUTOSIZE, CLSID_NULL, VT_BOOL)
// Example entries
// PROP_ENTRY_TYPE("Property Name", dispid, clsid, vtType)
// PROP_PAGE(CLSID_StockColorPage)
END_PROP_MAP()

BEGIN_CONNECTION_POINT_MAP(CSubTapiCom)
CONNECTION_POINT_ENTRY(__uuidof(_ISubTapiComEvents))
END_CONNECTION_POINT_MAP()

BEGIN_MSG_MAP(CSubTapiCom)
CHAIN_MSG_MAP(CComControl)
DEFAULT_REFLECTION_HANDLER()
MESSAGE_HANDLER(WM_COPYDATA, OnCopyData)
END_MSG_MAP()

// ISupportsErrorInfo
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid)
{
static const IID* arr[] =
{
&IID_ISubTapiCom,
};

for (int i=0; im_hWnd;
this->m_hWndCD;

RECT rect;

CString cstrName("subtapirec");
m_hHidden = m_wndHidden.Create(NULL, rect,cstrName);

return S_OK;
}

void FinalRelease()
{
::KillTimer(m_hHidden, 1);
m_wndHidden.DestroyWindow();

}

LRESULT OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
::MessageBox(NULL, _T("OnCopyData...1"), _T("INFO"), MB_OK);

return 0;
}
};
AnswerRe: Hidden window cannot get WM_COPYDATA message? Pin
Richard MacCutchan16-Apr-13 22:09
mveRichard MacCutchan16-Apr-13 22:09 
QuestionCoCreateInstance Problem & GetLastError 0x0000007e Pin
yihung.hung1-Apr-13 21:58
Memberyihung.hung1-Apr-13 21:58 
AnswerRe: CoCreateInstance Problem & GetLastError 0x0000007e Pin
Richard MacCutchan1-Apr-13 22:32
mveRichard MacCutchan1-Apr-13 22:32 
GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007e Pin
yihung.hung9-Apr-13 20:25
Memberyihung.hung9-Apr-13 20:25 
GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007e Pin
Richard MacCutchan9-Apr-13 22:18
mveRichard MacCutchan9-Apr-13 22:18 
GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007e Pin
yihung.hung12-Apr-13 15:32
Memberyihung.hung12-Apr-13 15:32 
GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007e Pin
Richard MacCutchan12-Apr-13 22:55
mveRichard MacCutchan12-Apr-13 22:55 
AnswerRe: CoCreateInstance Problem & GetLastError 0x0000007e Pin
Stephen Hewitt12-Apr-13 0:32
MemberStephen Hewitt12-Apr-13 0:32 
GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007e Pin
yihung.hung12-Apr-13 16:31
Memberyihung.hung12-Apr-13 16:31 
GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007e Pin
Stephen Hewitt12-Apr-13 20:11
MemberStephen Hewitt12-Apr-13 20:11 
GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007e Pin
yihung.hung13-Apr-13 3:52
Memberyihung.hung13-Apr-13 3:52 
GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007e Pin
Richard MacCutchan12-Apr-13 23:00
mveRichard MacCutchan12-Apr-13 23:00 
Question[SOLVED] IHTMLDOCUMENT2 get_Script problem in thread Pin
mr_m_imran28-Mar-13 9:20
Membermr_m_imran28-Mar-13 9:20 
AnswerRe: IHTMLDOCUMENT2 get_Script problem in thread Pin
Richard MacCutchan28-Mar-13 9:48
mveRichard MacCutchan28-Mar-13 9:48 
GeneralRe: IHTMLDOCUMENT2 get_Script problem in thread Pin
mr_m_imran28-Mar-13 18:36
Membermr_m_imran28-Mar-13 18:36 
QuestionTo Identify .Net Dll's among many Dll's in a Project. Pin
Vishal_K8927-Mar-13 2:36
MemberVishal_K8927-Mar-13 2:36 
AnswerRe: To Identify .Net Dll's among many Dll's in a Project. Pin
Richard MacCutchan27-Mar-13 4:51
mveRichard MacCutchan27-Mar-13 4:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.