But when I expand the TYPELIB folder it only shows me a HEX dump. cpp files instead of all being located in the SigPlusCtl.cpp fileįollowing the comment by Hans on 3-20 I tried to open the ocx file with Visual Studio 2013 to examine the TYPELIB. I don't know if it matters to class wizard but the method locations are somewhat unconventional in that the implementations for the OCX control's methods are scattered across multiple. Void CSigPlus::SetImageFileFormat(short propVal) =FILE:sigplus.cpp= // CSigPlus properties Since I was unable to regenerate these files using VC++6.0 (see my 1st comment below), I don't know if this copied code was originally created by VC++6.0 wizard or the original programmer edited these header files also. cpp files in the container app before I tried to regenerate them with VS2013. I copied this code from the original OCX. cpp files in the container project to use this missing attribute. If ( ( nNewValue >= 0 ) & ( nNewValue <= 11 ) )Īnd here's what I had to add to the generated. Void CSigPlusCtrl::SetImageFileFormat( short nNewValue) =FILE:SigPlusImage.cpp= short CSigPlusCtrl::GetImageFileFormat() =FILE:SigPlusCtl.cpp= // Dispatch mapīEGIN_DISPATCH_MAP(CSigPlusCtrl, COleControl)ĭISP_PROPERTY_EX(CSigPlusCtrl, "ImageFileFormat", GetImageFileFormat, SetImageFileFormat, VT_I2) =FILE:SigPlusCtl.h= class CSigPlusCtrl : public COleControlĪfx_msg void SetImageFileFormat(short nNewValue) Here's what one of the missing attributes looked like in the original OCX project I thought to go back to the VC++6.0 version to see if it would correctly generate the files but I am unclear how to use 6.0 to generate the ocx.h and ocx.cpp files as the same menu options are not available.Īdded 3-5-2018 in response to Hans comment I resorted to manually editing the ocx.h and ocx.cpp file to add the missing attribute methods but don't understand why Class Wizard is not generating them. I also tried giving Class Wizard the OCX file directly instead of using the registry but had the same results. The generated h and cpp output files are missing all the Attribute methods // Attributes
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |