Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Tabcontrol in none VB6 container
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tabcontrol in none VB6 container

 Post Reply Post Reply
Author
Message
youka View Drop Down
Groupie
Groupie


Joined: 20 March 2006
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote youka Quote  Post ReplyReply Direct Link To This Post Topic: Tabcontrol in none VB6 container
    Posted: 01 June 2011 at 5:01am

Hi all ,

This is a question for CJ developers. I know this is far beyond a  technical support , but i do hope to find answers here.
 
I am recently work on a test container that can host activex controls but found something strange in cj tab control(tested with suitcontrol 11.1.3 and 15.0.2 demo), i have even succeeded in make the old age sstab control work with my container ,  but not for codejock tabcontrol. 
 
when tabcontrol switchs selected tab,  the control will do late bound invoke to extender controls' visible, name, index , left properties, but it won't work if it's not VB6.
 
the problem is that when tabcontrol is trying to set the left and visible property to the child control contained,  but the parameter passed is not a COM standard one, which is , as documented in msdn, 'a DISPATCH_PROPERTYPUT call should use named arguments' , in fact it's not and it do works with VB6, but won't work with other containers.
 
snap1:
getidofname : left
 
 
snap2:
invoke property put to left to an offscreen position
you can see that "cNamedArgs' is 0 and rgdispidNamedArgs is NULL instead of &DISPID_PROPERTYPUT
 
 
 
Regards,
-Youka
 
 
 
 
 
 
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2011 at 4:49am
Please open new ticket in support.codejock.com (support@codejock.com) 
We will try to help and send changed ActiveX to test.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
youka View Drop Down
Groupie
Groupie


Joined: 20 March 2006
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote youka Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2011 at 8:16am
Originally posted by oleg oleg wrote:

Please open new ticket in support.codejock.com (support@codejock.com) 
We will try to help and send changed ActiveX to test.
thanks oleg , i have sent the mail.
 
Also present a small fix here for ATL dispatch impl (not so good but anyway solve the problem now)
 

#define NO_DISPATCH_FIX //fix for some control ?
#ifndef NO_DISPATCH_FIX
     #define IDispatchImplFix IDispatchImpl
#else
     //define for replacement of idispatchimpl
     template <class T, const IID* piid = &__uuidof(T), const GUID* plibid = &CAtlModule::m_libid, WORD wMajor = 1,
         WORD wMinor = 0, class tihclass = CComTypeInfoHolder>
     class ATL_NO_VTABLE IDispatchImplFix : public IDispatchImpl<T, piid, plibid, wMajor, wMinor>
     {
     public:
         STDMETHOD(Invoke)(DISPID dispidMember, REFIID riid,
              LCID lcid, WORD wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult,
              EXCEPINFO* pexcepinfo, UINT* puArgErr)
         {
              HRESULT hr = _tih.Invoke((IDispatch*)this, dispidMember, riid, lcid, wFlags, pdispparams, pvarResult, pexcepinfo, puArgErr);
              if (hr == DISP_E_PARAMNOTFOUND && wFlags == DISPATCH_PROPERTYPUT)
              {
                   //fix and invoke again
                   if (pdispparams->cNamedArgs==0 && pdispparams->rgdispidNamedArgs==NULL && pdispparams->cArgs==1)
                   {
                       DISPID dispidPut = DISPID_PROPERTYPUT;
                       pdispparams->rgdispidNamedArgs = &dispidPut;
                       pdispparams->cNamedArgs=1;
                       hr = _tih.Invoke((IDispatch*)this, dispidMember, riid, lcid, wFlags, pdispparams, pvarResult, pexcepinfo, puArgErr);
                   }
              }
              return hr;
         }
     };
#endif
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.234 seconds.