Gabor Pesti
October 29th, 1998, 03:52 AM
Hi folks, I am not a VB programmer, so if my problem is not a real problem, please let me know, and I will learn more on how to use VB. The scenario is the following: I am developing an ActiveX control in VC++ (MFC). The control fires an event which has some parameters. One of the parameters' type is OLE_XSIZE_PIXELS (actually, this is a long, more precisely a VT_I4 type). As far as I know, this parameter is known to VB, and has the advantage that VB automatically converts the given value to TWIPS (what is the standard dimension for size in VB, hm?). If I use my control in any ActiveX control container, it works just fine. But if I put it into a VB form and create an event handler function, VB makes an access violation as soon as the control fires the event, but before the event handler function gets called. I have tried different parameter types (long, OLE_XSIZE_PIXELS, OLE_XPOS_PIXELS, OLE_YPOS_PIXELS) all worked. The only exception was my OLE_YSIZE_PIXELS which makes VB crazy. I have tried to modify the official Microsoft sample control called Button which comes as part of the MFC ActiveX samples, and SURPISE, it causes the same Access Violation error in VB. Do you have any suggestions? Is this a known bug in VB? Is there a service pack for VB to correct this problem?
Development environment:
NT 4.0 (Intel platform) Service Pack 3.0
VC++ 6.0
Testing environment:
NT 4.0 (Intel platform) Service Pack 3.0
VB 6.0
If it is not the best place to ask this question, please let me know to whom I should address it? Thanks in advance.
Development environment:
NT 4.0 (Intel platform) Service Pack 3.0
VC++ 6.0
Testing environment:
NT 4.0 (Intel platform) Service Pack 3.0
VB 6.0
If it is not the best place to ask this question, please let me know to whom I should address it? Thanks in advance.