using #import
-
I wanted to import one active X control(.ocx) and start calling methods. in Visual C++. I understand we can do it by using #import "myocx.ocx" . Could anyone please give me complete example to do it?
aaahhhh COM run for the hills. Truthfully this is my usually reaction. But FEAR NOT!!! Your dealing with an OCX file. Simply register the file on your system using regsvr32.exe. Then in the fabulous VC6 menu system 'Project', 'Add to Project', 'Components and Controls' then choose the Registered ActiveX Controls folder and select your component. This will automatically generate all the wrapper classes for you (up yours VB boys :laugh:) Then you can drag and drop on your new active control and get events, manipulate it whatever. #import is really used for interacting with ATL COM objects that are not ActiveX based.
-
aaahhhh COM run for the hills. Truthfully this is my usually reaction. But FEAR NOT!!! Your dealing with an OCX file. Simply register the file on your system using regsvr32.exe. Then in the fabulous VC6 menu system 'Project', 'Add to Project', 'Components and Controls' then choose the Registered ActiveX Controls folder and select your component. This will automatically generate all the wrapper classes for you (up yours VB boys :laugh:) Then you can drag and drop on your new active control and get events, manipulate it whatever. #import is really used for interacting with ATL COM objects that are not ActiveX based.
Hi , just an question from a novice like me : how to use #import in c programme ? not c++ is there an directive like it for c ? it's for use ADO in a c program thank you Adan that which hesitates is lost.