Click here to Skip to main content
15,913,722 members
Home / Discussions / COM
   

COM

 
GeneralRe: CHtmlView Pin
Rob Manderson25-Mar-04 13:14
protectorRob Manderson25-Mar-04 13:14 
GeneralRe: CHtmlView Pin
alex.barylski25-Mar-04 15:27
alex.barylski25-Mar-04 15:27 
GeneralRe: CHtmlView Pin
Rob Manderson25-Mar-04 15:50
protectorRob Manderson25-Mar-04 15:50 
GeneralRe: CHtmlView Pin
alex.barylski25-Mar-04 16:30
alex.barylski25-Mar-04 16:30 
GeneralRe: CHtmlView Pin
alex.barylski26-Mar-04 13:40
alex.barylski26-Mar-04 13:40 
GeneralRe: CHtmlView Pin
Rob Manderson26-Mar-04 13:56
protectorRob Manderson26-Mar-04 13:56 
GeneralSafeArray freak Pin
El'Cachubrey24-Mar-04 5:46
El'Cachubrey24-Mar-04 5:46 
QuestionMake a Composite Control (COM) be an OLE container? Pin
mangellj24-Mar-04 5:30
mangellj24-Mar-04 5:30 
I am working with an InProc OLE Server that was created in Visual C++ v6.0 with the ATL COM Appwizard.

I created a new Composite Control and simply tried to add the MSFlexGrid ActiveX control. The Flex Grid is added and displays fine when the Composite Control is instantiated through the ActiveX Control Test Container (or other application).

The problem comes when trying to access the members of the Flex Grid. The CWnd::InvokeHelper method ASSERTs at the following line:

ASSERT(m_pCtrlSite != NULL); // not an OLE control (not yet, at least)


Here's the body of the InitInstance method of my DLLs App class:

{<br />
  AFX_MANAGE_STATE(AfxGetStaticModuleState());<br />
  AfxEnableControlContainer();<br />
  _Module.Init(ObjectMap, m_hInstance, &LIBID_TESTCOMASCONTAINERLib);<br />
  return CWinApp::InitInstance();<br />
}<br />



Here's the body of the Composite Control's Message Handler for WM_INITDIALOG:

{<br />
  AFX_MANAGE_STATE(AfxGetStaticModuleState());<br />
  m_wThis.Attach(*m_phWndCD);<br />
  m_ctlFlexGrid.SubclassDlgItem(IDC_MSFLEXGRID1, &m_wThis);<br />
<br />
  m_ctlFlexGrid.SetRows(5);<br />
<br />
  return 0;<br />
}<br />


The SetRows method is what calls InvokeHelper. According to the MSDN documentation (e.g "...These types of controls are called composite controls because they are able to host other controls (native Windows controls and ActiveX controls)....") a composite control should be able to contain an ActiveX control.

What am I missing here? Do I need an additional AfxEnableControlContainer() call somewhere in my Composite Control's implementation? Do I simply have the style settings wrong in the Dialog Resource?

Any help or guidance is appreciated... Thanks.
QuestionActiveX storing data to be picked up by another ActiveX later? Pin
SysLo23-Mar-04 0:57
SysLo23-Mar-04 0:57 
AnswerRe: ActiveX storing data to be picked up by another ActiveX later? Pin
igor196024-Mar-04 15:01
igor196024-Mar-04 15:01 
GeneralRe: ActiveX storing data to be picked up by another ActiveX later? Pin
SysLo25-Mar-04 1:49
SysLo25-Mar-04 1:49 
GeneralI am unable to retrieve Combuilder in Matlab Pin
vil_0922-Mar-04 20:08
vil_0922-Mar-04 20:08 
QuestionWhat are issues when renaming a COM component? Pin
User 21559722-Mar-04 17:42
User 21559722-Mar-04 17:42 
AnswerRe: What are issues when renaming a COM component? Pin
Steve S22-Mar-04 22:07
Steve S22-Mar-04 22:07 
GeneralRe: What are issues when renaming a COM component? Pin
User 21559723-Mar-04 0:00
User 21559723-Mar-04 0:00 
Generaluse VB COM in C++ Pin
Cuu22-Mar-04 5:18
Cuu22-Mar-04 5:18 
GeneralRe: use VB COM in C++ Pin
Nick Parker22-Mar-04 18:07
protectorNick Parker22-Mar-04 18:07 
QuestionHow to register a proxy/stub DLL on the client? Pin
pelos21-Mar-04 10:54
pelos21-Mar-04 10:54 
AnswerRe: How to register a proxy/stub DLL on the client? Pin
pelos21-Mar-04 21:07
pelos21-Mar-04 21:07 
GeneralRe: How to register a proxy/stub DLL on the client? Pin
Nissim Salomon23-Mar-04 0:49
Nissim Salomon23-Mar-04 0:49 
GeneralActivesX design questions Pin
Cedric Moonen19-Mar-04 1:03
Cedric Moonen19-Mar-04 1:03 
GeneralRe: ActivesX design questions Pin
Cedric Moonen19-Mar-04 2:10
Cedric Moonen19-Mar-04 2:10 
QuestionAnybody know the future of MMC ? Pin
Richard John18-Mar-04 18:15
Richard John18-Mar-04 18:15 
AnswerRe: Anybody know the future of MMC ? Pin
Heath Stewart25-Mar-04 6:08
protectorHeath Stewart25-Mar-04 6:08 
GeneralDrag Stream -&gt; Drop File Pin
Tristan Rhodes18-Mar-04 12:32
Tristan Rhodes18-Mar-04 12:32 

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.