![]() ![]() into the command window after we created a picture instance like shown above. Let VFP’s IntelliSense help us and type opicture. The oPicture reference above is a COM object reference of an interface named “Picture” through which we can access our image’s properties and methods. You can load either the “StdTypes” DLL itself (at \SYSTEM32\OLEPRO32.DLL), or its type library file (\SYSTEM32\STDOLE2.TLB).Īs you can see, in VFP’s Object Browser the interface called “PICTURE” is VFP’s default interface that is returned each time we are using some command like: oPicture = LOADPICTURE(GETPIC()) To figure out the interfaces that are available within a picture COM object, use VFP’s Object Browser. PpvObj & Address of output variable that receives the & Interface pointer requested in riidĪs we all know, the right way to call a COM object’s implementation (inside a DLL) is using one of its interfaces. Riid, & Reference to the identifier of the interfaceįOwn, & Whether the picture is to be destroyed This is the syntax of the API call wrapped by VFP’s LOADPICTURE() function: OleCreatePictureIndirect(pPictDesc, & Pointer to the structure of parameters for picture There are some VERY GOOD reasons to use VFP’s LOADPICTURE() functionality! After all, carelessly using COM image objects created by VFP’s LOADPICTURE() function in conjunction with VFP’s native Image controls will introduce some almost non-trappable very tricky malfunctions! If you want to get the best out of it, without spending hours on debugging what seems to be impossible, read the rest of this post! You can find out more about OleCreatePictureIndirect() here. These COM–wrapped objects are used by many ActiveX controls. VFP’s LOADPICTURE() creates a COM picture object and returns a fancy ‘crippled’ interface reference! VFP’s LOADPICTURE() function is nothing more than a wrapper around the Windows API function called OleCreatePictureIndirect(), which in turn creates a COM picture object. Version: 0.02.02 - last update: Thursday, April 26, 2011, 14:35:00Īll you have to know about VFP’s LOADPICTURE() function
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |