Microsoft KB Archive/104393: Difference between revisions
From BetaArchive Wiki
m (Text replacement - ">" to ">") |
m (Text replacement - "<" to "<") |
||
Line 56: | Line 56: | ||
The IPROP_STD_LEFT, IPROP_STD_TOP, IPROP_STD_WIDTH, and IPROP_STD_HEIGHT properties are stored as floats. The following code shows how to call VBGetControlProperty to get these properties from a VBX and DLL. It is assumed that the standard property indexes found in VBAPI.H were used to build the control. | The IPROP_STD_LEFT, IPROP_STD_TOP, IPROP_STD_WIDTH, and IPROP_STD_HEIGHT properties are stored as floats. The following code shows how to call VBGetControlProperty to get these properties from a VBX and DLL. It is assumed that the standard property indexes found in VBAPI.H were used to build the control. | ||
<pre class="codesample">/* VBGetControlProperty is prototyped in vbapi.h */ | <pre class="codesample">/* VBGetControlProperty is prototyped in vbapi.h */ | ||
#include | #include <vbapi.h> | ||
*** You also need to add "vbapi.lib" to the libraries in the makefile. *** | *** You also need to add "vbapi.lib" to the libraries in the makefile. *** |
Revision as of 14:45, 20 July 2020
Article ID: 104393
Article Last Modified on 12/9/2003
APPLIES TO
- Microsoft Visual Basic 2.0 Professional Edition
- Microsoft Visual Basic 3.0 Professional Edition
- Microsoft Visual Basic 2.0 Standard Edition
- Microsoft Visual Basic 3.0 Professional Edition
This article was previously published under Q104393
SUMMARY
This article shows by example how to get the IPROP_STD_LEFT, IPROP_STD_TOP, IPROP_STD_WIDTH, and IPROP_STD_HEIGHT values using the VBGetControlProperty function.
MORE INFORMATION
The IPROP_STD_LEFT, IPROP_STD_TOP, IPROP_STD_WIDTH, and IPROP_STD_HEIGHT properties are stored as floats. The following code shows how to call VBGetControlProperty to get these properties from a VBX and DLL. It is assumed that the standard property indexes found in VBAPI.H were used to build the control.
/* VBGetControlProperty is prototyped in vbapi.h */ #include <vbapi.h> *** You also need to add "vbapi.lib" to the libraries in the makefile. *** float fValue ; int nRet ; /* hctl would normally be passed in as a HCTL to the function using VBGetControlProperty */ /* The third parameter must be the address of a float */ nRet = VBGetControlProperty(hctl, IPROP_STD_TOP, &fValue) ;
Now fValue has the value of Top property for the hctl control.
Additional query words: 2.00 3.00
Keywords: KB104393