home *** CD-ROM | disk | FTP | other *** search
Wrap
#ifndef _StdType_HPP_INCLUDED #define _StdType_HPP_INCLUDED #define WVARIANT _WVARIANT #ifndef _stdole_HPP_INCLUDED # include "wstdole.hpp" #endif #ifndef _OLECTL_H_ typedef long OLE_TRISTATE; #define OLE_TRISTATEUnchecked 0 #define OLE_TRISTATEChecked 1 #define OLE_TRISTATEGray 2 #endif // _OLECTL_H_ class IFont; class _Font; class StdFont; class IPicture; class _Picture; class StdPicture; #ifndef _OLECTL_H_ typedef unsigned long OLE_COLOR; typedef long OLE_XPOS_PIXELS; typedef long OLE_YPOS_PIXELS; typedef long OLE_XSIZE_PIXELS; typedef long OLE_YSIZE_PIXELS; typedef long OLE_XPOS_HIMETRIC; typedef long OLE_YPOS_HIMETRIC; typedef long OLE_XSIZE_HIMETRIC; typedef long OLE_YSIZE_HIMETRIC; typedef float OLE_XPOS_CONTAINER; typedef float OLE_YPOS_CONTAINER; typedef float OLE_XSIZE_CONTAINER; typedef float OLE_YSIZE_CONTAINER; typedef int OLE_HANDLE; typedef WVARIANT_BOOL OLE_OPTEXCLUSIVE; typedef WVARIANT_BOOL OLE_CANCELBOOL; typedef WVARIANT_BOOL OLE_ENABLEDEFAULTBOOL; typedef WBStr FONTNAME; typedef WCurrency FONTSIZE; typedef WVARIANT_BOOL FONTBOLD; typedef WVARIANT_BOOL FONTITALIC; typedef WVARIANT_BOOL FONTUNDERSCORE; typedef WVARIANT_BOOL FONTSTRIKETHROUGH; typedef IDispatch * IFontDisp; typedef IDispatch * IPictureDisp; #endif // _OLECTL_H_ #ifndef _OLECTL_H_ class __stdcall IFont : public IUnknown { public: /* Methods */ virtual WHRESULT GetName( WBStr * __pname ) = 0; virtual WHRESULT SetName( WBStr __Name ) = 0; virtual WHRESULT GetSize( WCurrency * __psize ) = 0; virtual WHRESULT SetSize( WCurrency __Size ) = 0; virtual WHRESULT GetBold( WVARIANT_BOOL * __pbold ) = 0; virtual WHRESULT SetBold( WVARIANT_BOOL __Bold ) = 0; virtual WHRESULT GetItalic( WVARIANT_BOOL * __pitalic ) = 0; virtual WHRESULT SetItalic( WVARIANT_BOOL __Italic ) = 0; virtual WHRESULT GetUnderline( WVARIANT_BOOL * __punderline ) = 0; virtual WHRESULT SetUnderline( WVARIANT_BOOL __Underline ) = 0; virtual WHRESULT GetStrikethrough( WVARIANT_BOOL * __pstrikethrough ) = 0; virtual WHRESULT SetStrikethrough( WVARIANT_BOOL __Strikethrough ) = 0; virtual WHRESULT GetWeight( short * __pweight ) = 0; virtual WHRESULT SetWeight( short __Weight ) = 0; virtual WHRESULT GetCharset( short * __pcharset ) = 0; virtual WHRESULT SetCharset( short __Charset ) = 0; virtual WHRESULT GethFont( OLE_HANDLE * __phfont ) = 0; virtual WHRESULT Clone( IFont * * __lplpfont ) = 0; virtual WHRESULT IsEqual( IFont const * __lpFontOther ) = 0; virtual WHRESULT SetRatio( long __cyLogical, long __cyHimetric ) = 0; virtual WHRESULT AddRefHfont( OLE_HANDLE __hFont ) = 0; virtual WHRESULT ReleaseHfont( OLE_HANDLE __hFont ) = 0; }; #endif // _OLECTL_H_ class WCMCLASS _Font : public WOleDispatchHelper { public: _Font(); ~_Font(); /* Properties */ void SetName( WBString ); WBString GetName( void ); void SetSize( WCurrency ); WCurrency GetSize( void ); void SetBold( WVARIANT_BOOL ); WVARIANT_BOOL GetBold( void ); void SetItalic( WVARIANT_BOOL ); WVARIANT_BOOL GetItalic( void ); void SetUnderline( WVARIANT_BOOL ); WVARIANT_BOOL GetUnderline( void ); void SetStrikethrough( WVARIANT_BOOL ); WVARIANT_BOOL GetStrikethrough( void ); void SetWeight( short ); short GetWeight( void ); void SetCharset( short ); short GetCharset( void ); _Font & operator=( const WVariant & v ) { WOleDispatchHelper::Create( (WPIDispatch)v ); return *this; } _Font & operator=( WPIDispatch p ) { WOleDispatchHelper::Create( p ); return *this; } }; class WCMCLASS StdFont : public WOleProgrammableObject { public: StdFont(); ~StdFont(); /* Properties */ void SetName( WBString ); WBString GetName( void ); void SetSize( WCurrency ); WCurrency GetSize( void ); void SetBold( WVARIANT_BOOL ); WVARIANT_BOOL GetBold( void ); void SetItalic( WVARIANT_BOOL ); WVARIANT_BOOL GetItalic( void ); void SetUnderline( WVARIANT_BOOL ); WVARIANT_BOOL GetUnderline( void ); void SetStrikethrough( WVARIANT_BOOL ); WVARIANT_BOOL GetStrikethrough( void ); void SetWeight( short ); short GetWeight( void ); void SetCharset( short ); short GetCharset( void ); private: const WChar * GetRegisteredClass(); private: WString _clsid; }; #ifndef _OLECTL_H_ class __stdcall IPicture : public IUnknown { public: /* Methods */ virtual WHRESULT GetHandle( OLE_HANDLE * __phandle ) = 0; virtual WHRESULT GethPal( OLE_HANDLE * __phpal ) = 0; virtual WHRESULT GetType( short * __ptype ) = 0; virtual WHRESULT GetWidth( OLE_XSIZE_HIMETRIC * __pwidth ) = 0; virtual WHRESULT GetHeight( OLE_YSIZE_HIMETRIC * __pheight ) = 0; virtual WHRESULT Render( int __hdc, long __x, long __y, long __cx, long __cy, OLE_XPOS_HIMETRIC __xSrc, OLE_YPOS_HIMETRIC __ySrc, OLE_XSIZE_HIMETRIC __cxSrc , OLE_YSIZE_HIMETRIC __cySrc, void const * __lprcWBounds ) = 0; virtual WHRESULT SethPal( OLE_HANDLE __hPal ) = 0; virtual WHRESULT GetCurDC( int * __phdcOut ) = 0; virtual WHRESULT SelectPicture( int __hdcIn, int * __phdcOut, OLE_HANDLE * __phbmpOut ) = 0; virtual WHRESULT GetKeepOriginalFormat( WVARIANT_BOOL * __pfkeep ) = 0; virtual WHRESULT SetKeepOriginalFormat( WVARIANT_BOOL __KeepOriginalFormat ) = 0; virtual WHRESULT PictureChanged( void ) = 0; virtual WHRESULT SaveAsFile( void const * __lpstream, WVARIANT_BOOL __fSaveMemCopy, long * __lpcbSize ) = 0; virtual WHRESULT GetAttributes( long * __lpdwAttr ) = 0; virtual WHRESULT SetHdc( OLE_HANDLE __hdc ) = 0; }; #endif // _OLECTL_H_ class WCMCLASS _Picture : public WOleDispatchHelper { public: _Picture(); ~_Picture(); /* Methods */ void Render( int __hdc, long __x, long __y, long __cx, long __cy, OLE_XPOS_HIMETRIC __xSrc, OLE_YPOS_HIMETRIC __ySrc, OLE_XSIZE_HIMETRIC __cxSrc , OLE_YSIZE_HIMETRIC __cySrc, void * __lprcWBounds ); /* Properties */ OLE_HANDLE GetHandle( void ); void SethPal( OLE_HANDLE ); OLE_HANDLE GethPal( void ); short GetType( void ); OLE_XSIZE_HIMETRIC GetWidth( void ); OLE_YSIZE_HIMETRIC GetHeight( void ); _Picture & operator=( const WVariant & v ) { WOleDispatchHelper::Create( (WPIDispatch)v ); return *this; } _Picture & operator=( WPIDispatch p ) { WOleDispatchHelper::Create( p ); return *this; } }; class WCMCLASS StdPicture : public WOleProgrammableObject { public: StdPicture(); ~StdPicture(); /* Methods */ void Render( int __hdc, long __x, long __y, long __cx, long __cy, OLE_XPOS_HIMETRIC __xSrc, OLE_YPOS_HIMETRIC __ySrc, OLE_XSIZE_HIMETRIC __cxSrc , OLE_YSIZE_HIMETRIC __cySrc, void * __lprcWBounds ); /* Properties */ OLE_HANDLE GetHandle( void ); void SethPal( OLE_HANDLE ); OLE_HANDLE GethPal( void ); short GetType( void ); OLE_XSIZE_HIMETRIC GetWidth( void ); OLE_YSIZE_HIMETRIC GetHeight( void ); private: const WChar * GetRegisteredClass(); private: WString _clsid; }; #endif // _StdType_HPP_INCLUDED #ifdef GUID_DEFINED extern WHRESULT WEXPORT WOleLoadRegTypeLib( const GUID & rguid, unsigned short wVerMajor, unsigned short wVerMinor, unsigned long lcid, ITypeLib **pptlib ); extern WHRESULT WEXPORT WOleDispGetIDsOfNames( ITypeInfo *ptinfo, long char **rgszNames, unsigned int cNames, long *rgdispid); extern WBool WEXPORT WOleIsEqualGUID( const GUID & guid1, const GUID & guid2 ); #define WOleIsEqualCLSID WOleIsEqualGUID #define WOleIsEqualIID WOleIsEqualGUID extern WBool WEXPORT operator==(const WGUID& wguid, const GUID& guid ); extern WBool WEXPORT operator!=(const WGUID& wguid, const GUID& guid ); extern WBool WEXPORT operator==(const GUID& guid, const WGUID& wguid ); extern WBool WEXPORT operator!=(const GUID& guid, const WGUID& wguid ); #endif