OLESTD.H
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:37k
源码类别:

Windows编程

开发平台:

Visual C++

  1. /*************************************************************************
  2. **
  3. **    OLE 2.0 Utilities
  4. **
  5. **    olestd.h
  6. **
  7. **    This file contains file contains data structure defintions,
  8. **    function prototypes, constants, etc. for the common OLE 2.0
  9. **    utilities.
  10. **
  11. **    These utilities include the following:
  12. **          Debuging Assert/Verify macros
  13. **          HIMETRIC conversion routines
  14. **          reference counting debug support
  15. **          OleStd API's for common compound-document app support
  16. **
  17. **    (c) Copyright Microsoft Corp. 1990 - 1996 All Rights Reserved
  18. **
  19. *************************************************************************/
  20. #if !defined( _OLESTD_H_ )
  21. #define _OLESTD_H_
  22. #if !defined(__cplusplus) && !defined( __TURBOC__)
  23. #define NONAMELESSUNION     // use strict ANSI standard (for DVOBJ.H)
  24. #endif
  25. #include <windows.h>
  26. #include <shellapi.h>
  27. #include <ole2.h>
  28. #include <string.h>
  29. #include <dlgs.h>           //For fileopen dlg; standard include
  30. #include "ansiapi.h"
  31. #include "oledlg.h"
  32. /*************************************************************************
  33. ** DEBUG ASSERTION ROUTINES
  34. *************************************************************************/
  35. #if DBG
  36. #include "assert.h"
  37. #define FnAssert(lpstrExpr, lpstrMsg, lpstrFileName, iLine)     
  38.         (_assert(lpstrMsg ? lpstrMsg : lpstrExpr,               
  39.                  lpstrFileName,                                 
  40.                  iLine), NOERROR)
  41. #endif //DBG
  42. // BEGINING OF OLD OLESTD.H FILE
  43. #if defined( __TURBOC__ ) || defined( WIN32 )
  44. #define _based(a)
  45. #endif
  46. #ifndef RC_INVOKED
  47. #include <dos.h>        // needed for filetime
  48. #endif  /* RC_INVOKED */
  49. #include <commdlg.h>    // needed for LPPRINTDLG
  50. #include <shellapi.h>   // needed for HKEY
  51. #include "ansiapi.h"
  52. // String table defines...
  53. #define  IDS_OLESTDNOCREATEFILE   700
  54. #define  IDS_OLESTDNOOPENFILE     701
  55. #define  IDS_OLESTDDISKFULL       702
  56. /*
  57.  * Some C interface declaration stuff
  58.  */
  59. #if ! defined(__cplusplus)
  60. typedef struct tagINTERFACEIMPL {
  61.       IUnknownVtbl FAR*       lpVtbl;
  62.       LPVOID                  lpBack;
  63.       int                     cRef;   // interface specific ref count.
  64. } INTERFACEIMPL, FAR* LPINTERFACEIMPL;
  65. #define INIT_INTERFACEIMPL(lpIFace, pVtbl, pBack)   
  66.       ((lpIFace)->lpVtbl = pVtbl, 
  67.          ((LPINTERFACEIMPL)(lpIFace))->lpBack = (LPVOID)pBack,   
  68.          ((LPINTERFACEIMPL)(lpIFace))->cRef = 0  
  69.       )
  70. #if defined( _DEBUG )
  71. #define OleDbgQueryInterfaceMethod(lpUnk)   
  72.       ((lpUnk) != NULL ? ((LPINTERFACEIMPL)(lpUnk))->cRef++ : 0)
  73. #define OleDbgAddRefMethod(lpThis, iface)   
  74.       ((LPINTERFACEIMPL)(lpThis))->cRef++
  75. #if _DEBUGLEVEL >= 2
  76. #define OleDbgReleaseMethod(lpThis, iface) 
  77.       (--((LPINTERFACEIMPL)(lpThis))->cRef == 0 ? 
  78.          OleDbgOut("t" iface "* RELEASED (cRef == 0)rn"),1 : 
  79.           (((LPINTERFACEIMPL)(lpThis))->cRef < 0) ? 
  80.             ( 
  81.                DebugBreak(), 
  82.                OleDbgOut(  
  83.                   "tERROR: " iface "* RELEASED TOO MANY TIMESrn") 
  84.             ),1 : 
  85.             1)
  86. #else       // if _DEBUGLEVEL < 2
  87. #define OleDbgReleaseMethod(lpThis, iface) 
  88.       (--((LPINTERFACEIMPL)(lpThis))->cRef == 0 ? 
  89.          1 : 
  90.           (((LPINTERFACEIMPL)(lpThis))->cRef < 0) ? 
  91.             ( 
  92.                OleDbgOut(  
  93.                   "tERROR: " iface "* RELEASED TOO MANY TIMESrn") 
  94.       ),1 : 
  95.             1)
  96. #endif      // if _DEBUGLEVEL < 2
  97. #else       // ! defined (_DEBUG)
  98. #define OleDbgQueryInterfaceMethod(lpUnk)
  99. #define OleDbgAddRefMethod(lpThis, iface)
  100. #define OleDbgReleaseMethod(lpThis, iface)
  101. #endif      // if defined( _DEBUG )
  102. #endif      // ! defined(__cplusplus)
  103. /*
  104.  * Some docfiles stuff
  105.  */
  106. #define STGM_DFRALL (STGM_READWRITE | STGM_TRANSACTED | STGM_SHARE_DENY_WRITE)
  107. #define STGM_DFALL (STGM_READWRITE | STGM_TRANSACTED | STGM_SHARE_EXCLUSIVE)
  108. #define STGM_SALL (STGM_READWRITE | STGM_SHARE_EXCLUSIVE)
  109. /*
  110.  * Some Concurrency stuff
  111.  */
  112. /* standard Delay (in msec) to wait before retrying an LRPC call.
  113. **    this value is returned from IMessageFilter::RetryRejectedCall
  114. */
  115. #define OLESTDRETRYDELAY    (DWORD)5000
  116. /* Cancel the pending outgoing LRPC call.
  117. **    this value is returned from IMessageFilter::RetryRejectedCall
  118. */
  119. #define OLESTDCANCELRETRY   (DWORD)-1
  120. /*
  121.  * Some Icon support stuff.
  122.  *
  123.  * The following API's are now OBSOLETE because equivalent API's have been
  124.  * added to the OLE2.DLL library
  125.  *      GetIconOfFile       superceeded by OleGetIconOfFile
  126.  *      GetIconOfClass      superceeded by OleGetIconOfClass
  127.  *      OleUIMetafilePictFromIconAndLabel
  128.  *                          superceeded by OleMetafilePictFromIconAndLabel
  129.  *
  130.  * The following macros are defined for backward compatibility with previous
  131.  * versions of the OLE2UI library. It is recommended that the new Ole* API's
  132.  * should be used instead.
  133.  */
  134. #define GetIconOfFile(hInst, lpszFileName, fUseFileAsLabel) 
  135.    OleGetIconOfFile(lpszFileName, fUseFileAsLabel)
  136. #define GetIconOfClass(hInst, rclsid, lpszLabel, fUseTypeAsLabel) 
  137.    OleGetIconOfClass(rclsid, lpszLabel, fUseTypeAsLabel)
  138. #define OleUIMetafilePictFromIconAndLabel(hIcon,pszLabel,pszSourceFile,iIcon)
  139.    OleMetafilePictFromIconAndLabel(hIcon, pszLabel, pszSourceFile, iIcon)
  140. /*
  141.  * Some Clipboard Copy/Paste & Drag/Drop support stuff
  142.  */
  143. //Macro to set all FormatEtc fields
  144. #define SETFORMATETC(fe, cf, asp, td, med, li)   
  145.    ((fe).cfFormat=cf, 
  146.     (fe).dwAspect=asp, 
  147.     (fe).ptd=td, 
  148.     (fe).tymed=med, 
  149.     (fe).lindex=li)
  150. //Macro to set interesting FormatEtc fields defaulting the others.
  151. #define SETDEFAULTFORMATETC(fe, cf, med)  
  152.    ((fe).cfFormat=cf, 
  153.     (fe).dwAspect=DVASPECT_CONTENT, 
  154.     (fe).ptd=NULL, 
  155.     (fe).tymed=med, 
  156.     (fe).lindex=-1)
  157. // Macro to test if two FormatEtc structures are an exact match
  158. #define IsEqualFORMATETC(fe1, fe2)  
  159.    (OleStdCompareFormatEtc(&(fe1), &(fe2))==0)
  160. // Clipboard format strings
  161. #define CF_EMBEDSOURCE      TEXT("Embed Source")
  162. #define CF_EMBEDDEDOBJECT   TEXT("Embedded Object")
  163. #define CF_LINKSOURCE       TEXT("Link Source")
  164. #define CF_CUSTOMLINKSOURCE TEXT("Custom Link Source")
  165. #define CF_OBJECTDESCRIPTOR TEXT("Object Descriptor")
  166. #define CF_LINKSRCDESCRIPTOR TEXT("Link Source Descriptor")
  167. #define CF_OWNERLINK        TEXT("OwnerLink")
  168. #define CF_FILENAME         TEXT("FileName")
  169. #define OleStdQueryOleObjectData(lpformatetc)   
  170.    (((lpformatetc)->tymed & TYMED_ISTORAGE) ?    
  171.          NOERROR : ResultFromScode(DV_E_FORMATETC))
  172. #define OleStdQueryLinkSourceData(lpformatetc)   
  173.    (((lpformatetc)->tymed & TYMED_ISTREAM) ?    
  174.          NOERROR : ResultFromScode(DV_E_FORMATETC))
  175. #define OleStdQueryObjectDescriptorData(lpformatetc)    
  176.    (((lpformatetc)->tymed & TYMED_HGLOBAL) ?    
  177.          NOERROR : ResultFromScode(DV_E_FORMATETC))
  178. #define OleStdQueryFormatMedium(lpformatetc, tymd)  
  179.    (((lpformatetc)->tymed & tymd) ?    
  180.          NOERROR : ResultFromScode(DV_E_FORMATETC))
  181. // Make an independent copy of a MetafilePict
  182. #define OleStdCopyMetafilePict(hpictin, phpictout)  
  183.    (*(phpictout) = OleDuplicateData(hpictin,CF_METAFILEPICT,GHND|GMEM_SHARE))
  184. // REVIEW: these need to be added to OLE2.H
  185. #if !defined( DD_DEFSCROLLINTERVAL )
  186. #define DD_DEFSCROLLINTERVAL    50
  187. #endif
  188. #if !defined( DD_DEFDRAGDELAY )
  189. #define DD_DEFDRAGDELAY         200
  190. #endif
  191. #if !defined( DD_DEFDRAGMINDIST )
  192. #define DD_DEFDRAGMINDIST       2
  193. #endif
  194. /* OleStdGetDropEffect
  195. ** -------------------
  196. **
  197. ** Convert a keyboard state into a DROPEFFECT.
  198. **
  199. ** returns the DROPEFFECT value derived from the key state.
  200. **    the following is the standard interpretation:
  201. **          no modifier -- Default Drop     (NULL is returned)
  202. **          CTRL        -- DROPEFFECT_COPY
  203. **          SHIFT       -- DROPEFFECT_MOVE
  204. **          CTRL-SHIFT  -- DROPEFFECT_LINK
  205. **
  206. **    Default Drop: this depends on the type of the target application.
  207. **    this is re-interpretable by each target application. a typical
  208. **    interpretation is if the drag is local to the same document
  209. **    (which is source of the drag) then a MOVE operation is
  210. **    performed. if the drag is not local, then a COPY operation is
  211. **    performed.
  212. */
  213. #define OleStdGetDropEffect(grfKeyState)    
  214.    ( (grfKeyState & MK_CONTROL) ?          
  215.       ( (grfKeyState & MK_SHIFT) ? DROPEFFECT_LINK : DROPEFFECT_COPY ) :  
  216.       ( (grfKeyState & MK_SHIFT) ? DROPEFFECT_MOVE : 0 ) )
  217. #define OLESTDDROP_NONE         0
  218. #define OLESTDDROP_DEFAULT      1
  219. #define OLESTDDROP_NONDEFAULT   2
  220. /*
  221.  * Some misc stuff
  222.  */
  223. #define EMBEDDINGFLAG "Embedding"     // Cmd line switch for launching a srvr
  224. #define HIMETRIC_PER_INCH   2540      // number HIMETRIC units per inch
  225. #define PTS_PER_INCH        72        // number points (font size) per inch
  226. #define MAP_PIX_TO_LOGHIM(x,ppli)   MulDiv(HIMETRIC_PER_INCH, (x), (ppli))
  227. #define MAP_LOGHIM_TO_PIX(x,ppli)   MulDiv((ppli), (x), HIMETRIC_PER_INCH)
  228. // Returns TRUE if all fields of the two Rect's are equal, else FALSE.
  229. #define AreRectsEqual(lprc1, lprc2)     
  230.    (((lprc1->top == lprc2->top) &&     
  231.      (lprc1->left == lprc2->left) &&   
  232.      (lprc1->right == lprc2->right) && 
  233.      (lprc1->bottom == lprc2->bottom)) ? TRUE : FALSE)
  234. #define LSTRCPYN(lpdst, lpsrc, cch) 
  235. (
  236.    (lpdst)[(cch)-1] = '', 
  237.    ((cch)>1 ? _fstrncpy(lpdst, lpsrc, (cch)-1) : 0)
  238. )
  239. /****** DEBUG Stuff *****************************************************/
  240. #ifdef _DEBUG
  241. #if !defined( _DBGTRACE )
  242. #define _DEBUGLEVEL 2
  243. #else
  244. #define _DEBUGLEVEL _DBGTRACE
  245. #endif
  246. #if defined( NOASSERT )
  247. #define OLEDBGASSERTDATA
  248. #define OleDbgAssert(a)
  249. #define OleDbgAssertSz(a, b)
  250. #define OleDbgVerify(a)
  251. #define OleDbgVerifySz(a, b)
  252. #else   // ! NOASSERT
  253. #define OLEDBGASSERTDATA    
  254.       static char _based(_segname("_CODE")) _szAssertFile[]= __FILE__;
  255. #define OleDbgAssert(a) 
  256.       (!(a) ? FnAssert(#a, NULL, _szAssertFile, __LINE__) : (HRESULT)1)
  257. #define OleDbgAssertSz(a, b)    
  258.       (!(a) ? FnAssert(#a, b, _szAssertFile, __LINE__) : (HRESULT)1)
  259. #define OleDbgVerify(a) 
  260.       OleDbgAssert(a)
  261. #define OleDbgVerifySz(a, b)    
  262.       OleDbgAssertSz(a, b)
  263. #endif  // ! NOASSERT
  264. #define OLEDBGDATA_MAIN(szPrefix)   
  265.       char near g_szDbgPrefix[] = szPrefix;    
  266.       OLEDBGASSERTDATA
  267. #define OLEDBGDATA  
  268.       extern char near g_szDbgPrefix[];    
  269.       OLEDBGASSERTDATA
  270. #define OLEDBG_BEGIN(lpsz) 
  271.       OleDbgPrintAlways(g_szDbgPrefix,lpsz,1);
  272. #define OLEDBG_END  
  273.       OleDbgPrintAlways(g_szDbgPrefix,"Endrn",-1);
  274. #define OleDbgOut(lpsz) 
  275.       OleDbgPrintAlways(g_szDbgPrefix,lpsz,0)
  276. #define OleDbgOutNoPrefix(lpsz) 
  277.       OleDbgPrintAlways("",lpsz,0)
  278. #define OleDbgOutRefCnt(lpsz,lpObj,refcnt)      
  279.       OleDbgPrintRefCntAlways(g_szDbgPrefix,lpsz,lpObj,(ULONG)refcnt)
  280. #define OleDbgOutRect(lpsz,lpRect)      
  281.       OleDbgPrintRectAlways(g_szDbgPrefix,lpsz,lpRect)
  282. #define OleDbgOutHResult(lpsz,hr)   
  283.       OleDbgPrintScodeAlways(g_szDbgPrefix,lpsz,GetScode(hr))
  284. #define OleDbgOutScode(lpsz,sc) 
  285.       OleDbgPrintScodeAlways(g_szDbgPrefix,lpsz,sc)
  286. #define OleDbgOut1(lpsz)    
  287.       OleDbgPrint(1,g_szDbgPrefix,lpsz,0)
  288. #define OleDbgOutNoPrefix1(lpsz)    
  289.       OleDbgPrint(1,"",lpsz,0)
  290. #define OLEDBG_BEGIN1(lpsz)    
  291.       OleDbgPrint(1,g_szDbgPrefix,lpsz,1);
  292. #define OLEDBG_END1 
  293.       OleDbgPrint(1,g_szDbgPrefix,"Endrn",-1);
  294. #define OleDbgOutRefCnt1(lpsz,lpObj,refcnt)     
  295.       OleDbgPrintRefCnt(1,g_szDbgPrefix,lpsz,lpObj,(ULONG)refcnt)
  296. #define OleDbgOutRect1(lpsz,lpRect)     
  297.       OleDbgPrintRect(1,g_szDbgPrefix,lpsz,lpRect)
  298. #define OleDbgOut2(lpsz)    
  299.       OleDbgPrint(2,g_szDbgPrefix,lpsz,0)
  300. #define OleDbgOutNoPrefix2(lpsz)    
  301.       OleDbgPrint(2,"",lpsz,0)
  302. #define OLEDBG_BEGIN2(lpsz)    
  303.       OleDbgPrint(2,g_szDbgPrefix,lpsz,1);
  304. #define OLEDBG_END2 
  305.       OleDbgPrint(2,g_szDbgPrefix,"Endrn",-1);
  306. #define OleDbgOutRefCnt2(lpsz,lpObj,refcnt)     
  307.       OleDbgPrintRefCnt(2,g_szDbgPrefix,lpsz,lpObj,(ULONG)refcnt)
  308. #define OleDbgOutRect2(lpsz,lpRect)     
  309.       OleDbgPrintRect(2,g_szDbgPrefix,lpsz,lpRect)
  310. #define OleDbgOut3(lpsz)    
  311.       OleDbgPrint(3,g_szDbgPrefix,lpsz,0)
  312. #define OleDbgOutNoPrefix3(lpsz)    
  313.       OleDbgPrint(3,"",lpsz,0)
  314. #define OLEDBG_BEGIN3(lpsz)    
  315.       OleDbgPrint(3,g_szDbgPrefix,lpsz,1);
  316. #define OLEDBG_END3 
  317.       OleDbgPrint(3,g_szDbgPrefix,"Endrn",-1);
  318. #define OleDbgOutRefCnt3(lpsz,lpObj,refcnt)     
  319.       OleDbgPrintRefCnt(3,g_szDbgPrefix,lpsz,lpObj,(ULONG)refcnt)
  320. #define OleDbgOutRect3(lpsz,lpRect)     
  321.       OleDbgPrintRect(3,g_szDbgPrefix,lpsz,lpRect)
  322. #define OleDbgOut4(lpsz)    
  323.       OleDbgPrint(4,g_szDbgPrefix,lpsz,0)
  324. #define OleDbgOutNoPrefix4(lpsz)    
  325.       OleDbgPrint(4,"",lpsz,0)
  326. #define OLEDBG_BEGIN4(lpsz)    
  327.       OleDbgPrint(4,g_szDbgPrefix,lpsz,1);
  328. #define OLEDBG_END4 
  329.       OleDbgPrint(4,g_szDbgPrefix,"Endrn",-1);
  330. #define OleDbgOutRefCnt4(lpsz,lpObj,refcnt)     
  331.       OleDbgPrintRefCnt(4,g_szDbgPrefix,lpsz,lpObj,(ULONG)refcnt)
  332. #define OleDbgOutRect4(lpsz,lpRect)     
  333.       OleDbgPrintRect(4,g_szDbgPrefix,lpsz,lpRect)
  334. #else   //  !_DEBUG
  335. #define OLEDBGDATA_MAIN(szPrefix)
  336. #define OLEDBGDATA
  337. #define OleDbgAssert(a)
  338. #define OleDbgAssertSz(a, b)
  339. #define OleDbgVerify(a)         (a)
  340. #define OleDbgVerifySz(a, b)    (a)
  341. #define OleDbgOutHResult(lpsz,hr)
  342. #define OleDbgOutScode(lpsz,sc)
  343. #define OLEDBG_BEGIN(lpsz)
  344. #define OLEDBG_END
  345. #define OleDbgOut(lpsz)
  346. #define OleDbgOut1(lpsz)
  347. #define OleDbgOut2(lpsz)
  348. #define OleDbgOut3(lpsz)
  349. #define OleDbgOut4(lpsz)
  350. #define OleDbgOutNoPrefix(lpsz)
  351. #define OleDbgOutNoPrefix1(lpsz)
  352. #define OleDbgOutNoPrefix2(lpsz)
  353. #define OleDbgOutNoPrefix3(lpsz)
  354. #define OleDbgOutNoPrefix4(lpsz)
  355. #define OLEDBG_BEGIN1(lpsz)
  356. #define OLEDBG_BEGIN2(lpsz)
  357. #define OLEDBG_BEGIN3(lpsz)
  358. #define OLEDBG_BEGIN4(lpsz)
  359. #define OLEDBG_END1
  360. #define OLEDBG_END2
  361. #define OLEDBG_END3
  362. #define OLEDBG_END4
  363. #define OleDbgOutRefCnt(lpsz,lpObj,refcnt)
  364. #define OleDbgOutRefCnt1(lpsz,lpObj,refcnt)
  365. #define OleDbgOutRefCnt2(lpsz,lpObj,refcnt)
  366. #define OleDbgOutRefCnt3(lpsz,lpObj,refcnt)
  367. #define OleDbgOutRefCnt4(lpsz,lpObj,refcnt)
  368. #define OleDbgOutRect(lpsz,lpRect)
  369. #define OleDbgOutRect1(lpsz,lpRect)
  370. #define OleDbgOutRect2(lpsz,lpRect)
  371. #define OleDbgOutRect3(lpsz,lpRect)
  372. #define OleDbgOutRect4(lpsz,lpRect)
  373. #endif  //  _DEBUG
  374. /*************************************************************************
  375. ** Function prototypes
  376. *************************************************************************/
  377. //OLESTD.C
  378. STDAPI_(int) SetDCToAnisotropic(HDC hDC, LPRECT lprcPhysical, LPRECT lprcLogical, LPRECT lprcWindowOld, LPRECT lprcViewportOld);
  379. STDAPI_(int) SetDCToDrawInHimetricRect(HDC, LPRECT, LPRECT, LPRECT, LPRECT);
  380. STDAPI_(int) ResetOrigDC(HDC, int, LPRECT, LPRECT);
  381. STDAPI_(int)        XformWidthInHimetricToPixels(HDC, int);
  382. STDAPI_(int)        XformWidthInPixelsToHimetric(HDC, int);
  383. STDAPI_(int)        XformHeightInHimetricToPixels(HDC, int);
  384. STDAPI_(int)        XformHeightInPixelsToHimetric(HDC, int);
  385. STDAPI_(void) XformRectInPixelsToHimetric(HDC, LPRECT, LPRECT);
  386. STDAPI_(void) XformRectInHimetricToPixels(HDC, LPRECT, LPRECT);
  387. STDAPI_(void) XformSizeInPixelsToHimetric(HDC, LPSIZEL, LPSIZEL);
  388. STDAPI_(void) XformSizeInHimetricToPixels(HDC, LPSIZEL, LPSIZEL);
  389. STDAPI_(int) XformWidthInHimetricToPixels(HDC, int);
  390. STDAPI_(int) XformWidthInPixelsToHimetric(HDC, int);
  391. STDAPI_(int) XformHeightInHimetricToPixels(HDC, int);
  392. STDAPI_(int) XformHeightInPixelsToHimetric(HDC, int);
  393. STDAPI_(void) ParseCmdLine(LPSTR, BOOL FAR *, LPSTR);
  394. STDAPI_(BOOL) OleStdIsOleLink(LPUNKNOWN lpUnk);
  395. STDAPI_(LPUNKNOWN) OleStdQueryInterface(LPUNKNOWN lpUnk, REFIID riid);
  396. STDAPI_(LPSTORAGE) OleStdCreateRootStorage(LPOLESTR lpszStgName, DWORD grfMode);
  397. STDAPI_(LPSTORAGE) OleStdOpenRootStorage(LPOLESTR lpszStgName, DWORD grfMode);
  398. STDAPI_(LPSTORAGE) OleStdOpenOrCreateRootStorage(LPOLESTR lpszStgName, DWORD grfMode);
  399. STDAPI_(LPSTORAGE) OleStdCreateChildStorage(LPSTORAGE lpStg, LPOLESTR lpszStgName);
  400. STDAPI_(LPSTORAGE) OleStdOpenChildStorage(LPSTORAGE lpStg, LPOLESTR lpszStgName, DWORD grfMode);
  401. STDAPI_(BOOL) OleStdCommitStorage(LPSTORAGE lpStg);
  402. STDAPI OleStdDestroyAllElements(LPSTORAGE lpStg);
  403. STDAPI_(LPSTORAGE) OleStdCreateStorageOnHGlobal(
  404.       HANDLE hGlobal,
  405.       BOOL fDeleteOnRelease,
  406.       DWORD dwgrfMode
  407. );
  408. STDAPI_(LPSTORAGE) OleStdCreateTempStorage(BOOL fUseMemory, DWORD grfMode);
  409. STDAPI OleStdDoConvert(LPSTORAGE lpStg, REFCLSID rClsidNew);
  410. STDAPI_(BOOL) OleStdGetTreatAsFmtUserType(
  411.       REFCLSID        rClsidApp,
  412.       LPSTORAGE       lpStg,
  413.       CLSID FAR*      lpclsid,
  414.       CLIPFORMAT FAR* lpcfFmt,
  415.       LPOLESTR FAR*      lplpszType
  416. );
  417. STDAPI OleStdDoTreatAsClass(LPOLESTR lpszUserType, REFCLSID rclsid, REFCLSID rclsidNew);
  418. STDAPI_(BOOL) OleStdSetupAdvises(LPOLEOBJECT lpOleObject, DWORD dwDrawAspect,
  419.                LPOLESTR lpszContainerApp, LPOLESTR lpszContainerObj,
  420.                LPADVISESINK lpAdviseSink, BOOL fCreate);
  421. STDAPI OleStdSwitchDisplayAspect(
  422.       LPOLEOBJECT             lpOleObj,
  423.       LPDWORD                 lpdwCurAspect,
  424.       DWORD                   dwNewAspect,
  425.       HGLOBAL                 hMetaPict,
  426.       BOOL                    fDeleteOldAspect,
  427.       BOOL                    fSetupViewAdvise,
  428.       LPADVISESINK            lpAdviseSink,
  429.       BOOL FAR*               lpfMustUpdate
  430. );
  431. STDAPI OleStdSetIconInCache(LPOLEOBJECT lpOleObj, HGLOBAL hMetaPict);
  432. STDAPI_(HGLOBAL) OleStdGetData(
  433.       LPDATAOBJECT        lpDataObj,
  434.       CLIPFORMAT          cfFormat,
  435.       DVTARGETDEVICE FAR* lpTargetDevice,
  436.       DWORD               dwAspect,
  437.       LPSTGMEDIUM         lpMedium
  438. );
  439. STDAPI_(void) OleStdMarkPasteEntryList(
  440.       LPDATAOBJECT        lpSrcDataObj,
  441.       LPOLEUIPASTEENTRY   lpPriorityList,
  442.       int                 cEntries
  443. );
  444. STDAPI_(int) OleStdGetPriorityClipboardFormat(
  445.       LPDATAOBJECT        lpSrcDataObj,
  446.       LPOLEUIPASTEENTRY   lpPriorityList,
  447.       int                 cEntries
  448. );
  449. STDAPI_(BOOL) OleStdIsDuplicateFormat(
  450.       LPFORMATETC         lpFmtEtc,
  451.       LPFORMATETC         arrFmtEtc,
  452.       int                 nFmtEtc
  453. );
  454. STDAPI_(void) OleStdRegisterAsRunning(LPUNKNOWN lpUnk, LPMONIKER lpmkFull, DWORD FAR* lpdwRegister);
  455. STDAPI_(void) OleStdRevokeAsRunning(DWORD FAR* lpdwRegister);
  456. STDAPI_(void) OleStdNoteFileChangeTime(LPOLESTR lpszFileName, DWORD dwRegister);
  457. STDAPI_(void) OleStdNoteObjectChangeTime(DWORD dwRegister);
  458. STDAPI OleStdGetOleObjectData(
  459.       LPPERSISTSTORAGE    lpPStg,
  460.       LPFORMATETC         lpformatetc,
  461.       LPSTGMEDIUM         lpMedium,
  462.       BOOL                fUseMemory
  463. );
  464. STDAPI OleStdGetLinkSourceData(
  465.       LPMONIKER           lpmk,
  466.       LPCLSID             lpClsID,
  467.       LPFORMATETC         lpformatetc,
  468.       LPSTGMEDIUM         lpMedium
  469. );
  470. STDAPI_(HGLOBAL) OleStdGetObjectDescriptorData(
  471.       CLSID               clsid,
  472.       DWORD               dwAspect,
  473.       SIZEL               sizel,
  474.       POINTL              pointl,
  475.       DWORD               dwStatus,
  476.       LPOLESTR            lpszFullUserTypeName,
  477.       LPOLESTR            lpszSrcOfCopy
  478. );
  479. STDAPI_(HGLOBAL) OleStdGetObjectDescriptorDataFromOleObject(
  480.       LPOLEOBJECT         lpOleObj,
  481.       LPOLESTR            lpszSrcOfCopy,
  482.       DWORD               dwAspect,
  483.       POINTL              pointl,
  484.       LPSIZEL             lpSizelHim
  485. );
  486. STDAPI_(HGLOBAL) OleStdFillObjectDescriptorFromData(
  487.       LPDATAOBJECT       lpDataObject,
  488.       LPSTGMEDIUM        lpmedium,
  489.       CLIPFORMAT FAR*    lpcfFmt
  490. );
  491. STDAPI_(HANDLE) OleStdGetMetafilePictFromOleObject(
  492.       LPOLEOBJECT         lpOleObj,
  493.       DWORD               dwDrawAspect,
  494.       LPSIZEL             lpSizelHim,
  495.       DVTARGETDEVICE FAR* ptd
  496. );
  497. STDAPI_(void) OleStdCreateTempFileMoniker(LPOLESTR lpszPrefixString, UINT FAR* lpuUnique, LPOLESTR lpszName, LPMONIKER FAR* lplpmk);
  498. STDAPI_(LPMONIKER) OleStdGetFirstMoniker(LPMONIKER lpmk);
  499. STDAPI_(ULONG) OleStdGetLenFilePrefixOfMoniker(LPMONIKER lpmk);
  500. STDAPI OleStdMkParseDisplayName(
  501.       REFCLSID        rClsid,
  502.       LPBC            lpbc,
  503.       LPOLESTR        lpszUserName,
  504.       ULONG FAR*      lpchEaten,
  505.       LPMONIKER FAR*  lplpmk
  506. );
  507. STDAPI_(LPVOID) OleStdMalloc(ULONG ulSize);
  508. STDAPI_(LPVOID) OleStdRealloc(LPVOID pmem, ULONG ulSize);
  509. STDAPI_(void) OleStdFree(LPVOID pmem);
  510. STDAPI_(ULONG) OleStdGetSize(LPVOID pmem);
  511. STDAPI_(void) OleStdFreeString(LPOLESTR lpsz, LPMALLOC lpMalloc);
  512. STDAPI_(LPOLESTR) OleStdCopyString(LPOLESTR lpszSrc, LPMALLOC lpMalloc);
  513. STDAPI_(ULONG) OleStdGetItemToken(LPOLESTR lpszSrc, LPOLESTR lpszDst,int nMaxChars);
  514. STDAPI_(UINT)     OleStdIconLabelTextOut(HDC        hDC,
  515.                                HFONT      hFont,
  516.                                int        nXStart,
  517.                                int        nYStart,
  518.                                UINT       fuOptions,
  519.                                RECT FAR * lpRect,
  520.                                LPOLESTR   lpszString,
  521.                                UINT       cchString,
  522.                                int FAR *  lpDX);
  523. // registration database query functions
  524. STDAPI_(UINT)     OleStdGetAuxUserType(REFCLSID rclsid,
  525.                              WORD   wAuxUserType,
  526.                              LPOLESTR  lpszAuxUserType,
  527.                              int    cch,
  528.                              HKEY   hKey);
  529. STDAPI_(UINT)     OleStdGetUserTypeOfClass(REFCLSID rclsid,
  530.                                  LPOLESTR lpszUserType,
  531.                                  UINT cch,
  532.                                  HKEY hKey);
  533. STDAPI_(BOOL) OleStdGetMiscStatusOfClass(REFCLSID, HKEY, DWORD FAR *);
  534. STDAPI_(CLIPFORMAT) OleStdGetDefaultFileFormatOfClass(
  535.       REFCLSID        rclsid,
  536.       HKEY            hKey
  537. );
  538. STDAPI_(void) OleStdInitVtbl(LPVOID lpVtbl, UINT nSizeOfVtbl);
  539. STDMETHODIMP OleStdNullMethod(LPUNKNOWN lpThis);
  540. STDAPI_(BOOL) OleStdCheckVtbl(LPVOID lpVtbl, UINT nSizeOfVtbl, LPOLESTR lpszIface);
  541. STDAPI_(ULONG) OleStdVerifyRelease(LPUNKNOWN lpUnk, LPOLESTR lpszMsg);
  542. STDAPI_(ULONG) OleStdRelease(LPUNKNOWN lpUnk);
  543. STDAPI_(HDC) OleStdCreateDC(DVTARGETDEVICE FAR* ptd);
  544. STDAPI_(HDC) OleStdCreateIC(DVTARGETDEVICE FAR* ptd);
  545. STDAPI_(DVTARGETDEVICE FAR*) OleStdCreateTargetDevice(LPPRINTDLG lpPrintDlg);
  546. STDAPI_(BOOL) OleStdDeleteTargetDevice(DVTARGETDEVICE FAR* ptd);
  547. STDAPI_(DVTARGETDEVICE FAR*) OleStdCopyTargetDevice(DVTARGETDEVICE FAR* ptdSrc);
  548. STDAPI_(BOOL) OleStdCopyFormatEtc(LPFORMATETC petcDest, LPFORMATETC petcSrc);
  549. STDAPI_(int) OleStdCompareFormatEtc(FORMATETC FAR* pFetcLeft, FORMATETC FAR* pFetcRight);
  550. STDAPI_(BOOL) OleStdCompareTargetDevice
  551.    (DVTARGETDEVICE FAR* ptdLeft, DVTARGETDEVICE FAR* ptdRight);
  552. STDAPI_(void) OleDbgPrint(
  553.       int     nDbgLvl,
  554.       LPSTR   lpszPrefix,
  555.       LPSTR   lpszMsg,
  556.       int     nIndent
  557. );
  558. STDAPI_(void) OleDbgPrintAlways(LPSTR lpszPrefix, LPSTR lpszMsg, int nIndent);
  559. STDAPI_(void) OleDbgSetDbgLevel(int nDbgLvl);
  560. STDAPI_(int) OleDbgGetDbgLevel( void );
  561. STDAPI_(void) OleDbgIndent(int n);
  562. STDAPI_(void) OleDbgPrintRefCnt(
  563.       int         nDbgLvl,
  564.       LPSTR       lpszPrefix,
  565.       LPSTR       lpszMsg,
  566.       LPVOID      lpObj,
  567.       ULONG       refcnt
  568. );
  569. STDAPI_(void) OleDbgPrintRefCntAlways(
  570.       LPSTR       lpszPrefix,
  571.       LPSTR       lpszMsg,
  572.       LPVOID      lpObj,
  573.       ULONG       refcnt
  574. );
  575. STDAPI_(void) OleDbgPrintRect(
  576.       int         nDbgLvl,
  577.       LPSTR       lpszPrefix,
  578.       LPSTR       lpszMsg,
  579.       LPRECT      lpRect
  580. );
  581. STDAPI_(void) OleDbgPrintRectAlways(
  582.       LPSTR       lpszPrefix,
  583.       LPSTR       lpszMsg,
  584.       LPRECT      lpRect
  585. );
  586. STDAPI_(void) OleDbgPrintScodeAlways(LPSTR lpszPrefix, LPSTR lpszMsg, SCODE sc);
  587. STDAPI_(LPENUMFORMATETC)
  588.   OleStdEnumFmtEtc_Create(ULONG nCount, LPFORMATETC lpEtc);
  589. STDAPI_(LPENUMSTATDATA)
  590.   OleStdEnumStatData_Create(ULONG nCount, LPSTATDATA lpStat);
  591. STDAPI_(BOOL)
  592.   OleStdCopyStatData(LPSTATDATA pDest, LPSTATDATA pSrc);
  593. STDAPI_(HPALETTE)
  594.   OleStdCreateStandardPalette(void);
  595. #if defined( OBSOLETE )
  596. /*************************************************************************
  597. ** The following API's have been converted into macros:
  598. **          OleStdQueryOleObjectData
  599. **          OleStdQueryLinkSourceData
  600. **          OleStdQueryObjectDescriptorData
  601. **          OleStdQueryFormatMedium
  602. **          OleStdCopyMetafilePict
  603. **          AreRectsEqual
  604. **          OleStdGetDropEffect
  605. **
  606. **    These macros are defined above
  607. *************************************************************************/
  608. STDAPI_(BOOL) AreRectsEqual(LPRECT lprc1, LPRECT lprc2);
  609. STDAPI_(BOOL) OleStdCopyMetafilePict(HANDLE hpictin, HANDLE FAR* phpictout);
  610. STDAPI OleStdQueryOleObjectData(LPFORMATETC lpformatetc);
  611. STDAPI OleStdQueryLinkSourceData(LPFORMATETC lpformatetc);
  612. STDAPI OleStdQueryObjectDescriptorData(LPFORMATETC lpformatetc);
  613. STDAPI OleStdQueryFormatMedium(LPFORMATETC lpformatetc, TYMED tymed);
  614. STDAPI_(DWORD) OleStdGetDropEffect ( DWORD grfKeyState );
  615. #endif  // OBSOLETE
  616. // END OF OLD OLESTD.H FILE
  617. #define UPDATELINKS_STARTDELAY 2000 // delay before first link
  618. #ifdef __TURBOC__
  619. #define _getcwd getcwd
  620. #define _itoa   itoa
  621. #define __max   max
  622. #define _find_t find_t
  623. #endif // __TURBOC__
  624. #ifdef WIN32
  625. #define _fmemset memset
  626. #define _fmemcpy memcpy
  627. #define _fmemcmp memcmp
  628. #define _fstrcpy strcpy
  629. #define _fstrncpy strncpy
  630. #define _fstrlen strlen
  631. #define _fstrrchr strrchr
  632. #define _fstrtok strtok
  633. // BUGBUG32: isspace function does not seem to work properly
  634. #undef isspace
  635. #define isspace(j) (j==' ' || j=='t' || j=='n')
  636. #endif  // WIN32
  637. #if !defined( EXPORT )
  638. #ifdef WIN32
  639. #define EXPORT
  640. #else
  641. #define EXPORT  __export
  642. #endif  // WIN32
  643. #endif  // !EXPORT
  644. /*
  645.  * Initialization / Uninitialization routines.  OleStdInitialize
  646.  * must be called prior to using any functions in OLESTD.LIB.
  647.  */
  648. STDAPI_(BOOL) OleStdInitialize(HINSTANCE hInstance);
  649. STDAPI_(void) OleStdUninitialize(void);
  650. // object count, used to support DllCanUnloadNow and OleUICanUnloadNow
  651. extern DWORD g_dwObjectCount;
  652. STDAPI OleUICanUnloadNow(void);
  653. STDAPI OleUILockLibrary(BOOL fLock);
  654. //Dialog Identifiers as passed in Help messages to identify the source.
  655. #define IDD_FILEOPEN            32253
  656. // The following Dialogs are message dialogs used by OleUIPromptUser API
  657. // Stringtable identifers
  658. #define IDS_OLE2UIUNKNOWN       32300
  659. #define IDS_OLE2UILINK          32301
  660. #define IDS_OLE2UIOBJECT        32302
  661. #define IDS_OLE2UIEDIT          32303
  662. #define IDS_OLE2UICONVERT       32304
  663. #define IDS_OLE2UIEDITLINKCMD_1VERB     32305
  664. #define IDS_OLE2UIEDITOBJECTCMD_1VERB   32306
  665. #define IDS_OLE2UIEDITLINKCMD_NVERB     32307
  666. #define IDS_OLE2UIEDITOBJECTCMD_NVERB   32308
  667. #define IDS_OLE2UIEDITNOOBJCMD  32309
  668. // def. icon label (usu. "Document")
  669. #define IDS_DEFICONLABEL        32310
  670. #define IDS_OLE2UIPASTELINKEDTYPE  32311
  671. #define IDS_FILTERS             32320
  672. #define IDS_ICONFILTERS         32321
  673. #define IDS_BROWSE              32322
  674. //Resource identifiers for bitmaps
  675. #define IDB_RESULTSEGA                  32325
  676. #define IDB_RESULTSVGA                  32326
  677. #define IDB_RESULTSHIRESVGA             32327
  678. //Missing from windows.h
  679. #ifndef PVOID
  680. typedef VOID *PVOID;
  681. #endif
  682. //Hook type used in all structures.
  683. typedef UINT (CALLBACK *LPFNOLEUIHOOK)(HWND, UINT, WPARAM, LPARAM);
  684. //Strings for registered messages
  685. #define SZOLEUI_MSG_FILEOKSTRING        "OLEUI_MSG_FILEOKSTRING"
  686. //Help Button Identifier
  687. #define ID_OLEUIHELP                    99
  688. // Static text control (use this instead of -1 so things work correctly for
  689. // localization
  690. #define  ID_STATIC                      98
  691. //Maximum key size we read from the RegDB.
  692. #define OLEUI_CCHKEYMAX                 256  // make any changes to this in geticon.c too
  693. //Maximum verb length and length of Object menu
  694. #define OLEUI_CCHVERBMAX                32
  695. #define OLEUI_OBJECTMENUMAX             256
  696. //Maximum MS-DOS pathname.
  697. #define OLEUI_CCHPATHMAX                256 // make any changes to this in geticon.c too
  698. #define OLEUI_CCHFILEMAX                13
  699. //Icon label length
  700. #define OLEUI_CCHLABELMAX               40  // make any changes to this in geticon.c too
  701. //Length of the CLSID string
  702. #define OLEUI_CCHCLSIDSTRING            39
  703. //Metafile utility functions
  704. WINOLEAPI_(HGLOBAL) OleUIMetafilePictFromIconAndLabel(HICON, LPOLESTR, LPOLESTR, UINT);
  705. STDAPI_(void)    OleUIMetafilePictIconFree(HGLOBAL);
  706. STDAPI_(BOOL)    OleUIMetafilePictIconDraw(HDC, LPRECT, HGLOBAL, BOOL);
  707. STDAPI_(UINT)    OleUIMetafilePictExtractLabel(HGLOBAL, LPOLESTR, UINT, LPDWORD);
  708. STDAPI_(HICON)   OleUIMetafilePictExtractIcon(HGLOBAL);
  709. STDAPI_(BOOL)    OleUIMetafilePictExtractIconSource(HGLOBAL,LPOLESTR,UINT FAR *);
  710. /*************************************************************************
  711. ** INSERT OBJECT DIALOG
  712. *************************************************************************/
  713. //Insert Object Dialog identifiers
  714. #define ID_IO_CREATENEW                 2100
  715. #define ID_IO_CREATEFROMFILE            2101
  716. #define ID_IO_LINKFILE                  2102
  717. #define ID_IO_OBJECTTYPELIST            2103
  718. #define ID_IO_DISPLAYASICON             2104
  719. #define ID_IO_CHANGEICON                2105
  720. #define ID_IO_FILE                      2106
  721. #define ID_IO_FILEDISPLAY               2107
  722. #define ID_IO_RESULTIMAGE               2108
  723. #define ID_IO_RESULTTEXT                2109
  724. #define ID_IO_ICONDISPLAY               2110
  725. #define ID_IO_OBJECTTYPETEXT            2111
  726. #define ID_IO_FILETEXT                  2112
  727. #define ID_IO_FILETYPE                  2113
  728. // Strings in OLE2UI resources
  729. #define IDS_IORESULTNEW                 32400
  730. #define IDS_IORESULTNEWICON             32401
  731. #define IDS_IORESULTFROMFILE1           32402
  732. #define IDS_IORESULTFROMFILE2           32403
  733. #define IDS_IORESULTFROMFILEICON2       32404
  734. #define IDS_IORESULTLINKFILE1           32405
  735. #define IDS_IORESULTLINKFILE2           32406
  736. #define IDS_IORESULTLINKFILEICON1       32407
  737. #define IDS_IORESULTLINKFILEICON2       32408
  738. /*************************************************************************
  739. ** PASTE SPECIAL DIALOG
  740. *************************************************************************/
  741. //Paste Special Dialog identifiers
  742. #define ID_PS_PASTE                    500
  743. #define ID_PS_PASTELINK                501
  744. #define ID_PS_SOURCETEXT               502
  745. #define ID_PS_PASTELIST                503
  746. #define ID_PS_PASTELINKLIST            504
  747. #define ID_PS_DISPLAYLIST              505
  748. #define ID_PS_DISPLAYASICON            506
  749. #define ID_PS_ICONDISPLAY              507
  750. #define ID_PS_CHANGEICON               508
  751. #define ID_PS_RESULTIMAGE              509
  752. #define ID_PS_RESULTTEXT               510
  753. #define ID_PS_RESULTGROUP              511
  754. #define ID_PS_STXSOURCE                512
  755. #define ID_PS_STXAS                    513
  756. // Paste Special String IDs
  757. #define IDS_PSPASTEDATA                32410
  758. #define IDS_PSPASTEOBJECT              32411
  759. #define IDS_PSPASTEOBJECTASICON        32412
  760. #define IDS_PSPASTELINKDATA            32413
  761. #define IDS_PSPASTELINKOBJECT          32414
  762. #define IDS_PSPASTELINKOBJECTASICON    32415
  763. #define IDS_PSNONOLE                   32416
  764. #define IDS_PSUNKNOWNTYPE              32417
  765. #define IDS_PSUNKNOWNSRC               32418
  766. #define IDS_PSUNKNOWNAPP               32419
  767. /*************************************************************************
  768. ** EDIT LINKS DIALOG
  769. *************************************************************************/
  770. // Edit Links Dialog identifiers
  771. #define ID_EL_CHANGESOURCE             201
  772. #define ID_EL_AUTOMATIC                202
  773. #define ID_EL_CLOSE                    208
  774. #define ID_EL_CANCELLINK               209
  775. #define ID_EL_UPDATENOW                210
  776. #define ID_EL_OPENSOURCE               211
  777. #define ID_EL_MANUAL                   212
  778. #define ID_EL_LINKSOURCE               216
  779. #define ID_EL_LINKTYPE                 217
  780. #define ID_EL_UPDATE                   218
  781. #define ID_EL_NULL                     -1
  782. #define ID_EL_LINKSLISTBOX             206
  783. #define ID_EL_COL1                     220
  784. #define ID_EL_COL2                     221
  785. #define ID_EL_COL3                     222
  786. /*************************************************************************
  787. ** CHANGE ICON DIALOG
  788. *************************************************************************/
  789. //Change Icon Dialog identifiers
  790. #define ID_GROUP                    120
  791. #define ID_CURRENT                  121
  792. #define ID_CURRENTICON              122
  793. #define ID_DEFAULT                  123
  794. #define ID_DEFAULTICON              124
  795. #define ID_FROMFILE                 125
  796. #define ID_FROMFILEEDIT             126
  797. #define ID_ICONLIST                 127
  798. #define ID_LABEL                    128
  799. #define ID_LABELEDIT                129
  800. #define ID_BROWSE                   130
  801. #define ID_RESULTICON               132
  802. #define ID_RESULTLABEL              133
  803. // Stringtable defines for Change Icon
  804. #define IDS_CINOICONSINFILE         32430
  805. #define IDS_CIINVALIDFILE           32431
  806. #define IDS_CIFILEACCESS            32432
  807. #define IDS_CIFILESHARE             32433
  808. #define IDS_CIFILEOPENFAIL          32434
  809. /*************************************************************************
  810. ** CONVERT DIALOG
  811. *************************************************************************/
  812. //Convert Dialog identifiers
  813. #define IDCV_OBJECTTYPE             150
  814. #define IDCV_DISPLAYASICON          152
  815. #define IDCV_CHANGEICON             153
  816. #define IDCV_ACTIVATELIST           154
  817. #define IDCV_CONVERTTO              155
  818. #define IDCV_ACTIVATEAS             156
  819. #define IDCV_RESULTTEXT             157
  820. #define IDCV_CONVERTLIST            158
  821. #define IDCV_ICON                   159
  822. #define IDCV_ICONLABEL1             160
  823. #define IDCV_ICONLABEL2             161
  824. #define IDCV_STXCURTYPE             162
  825. #define IDCV_GRPRESULT              163
  826. #define IDCV_STXCONVERTTO           164
  827. // String IDs for Convert dialog
  828. #define IDS_CVRESULTCONVERTLINK     32440
  829. #define IDS_CVRESULTCONVERTTO       32441
  830. #define IDS_CVRESULTNOCHANGE        32442
  831. #define IDS_CVRESULTDISPLAYASICON   32443
  832. #define IDS_CVRESULTACTIVATEAS      32444
  833. #define IDS_CVRESULTACTIVATEDIFF    32445
  834. /*************************************************************************
  835. ** BUSY DIALOG
  836. *************************************************************************/
  837. // Busy dialog identifiers
  838. #define IDBZ_RETRY                      600
  839. #define IDBZ_ICON                       601
  840. #define IDBZ_MESSAGE1                   602
  841. #define IDBZ_SWITCHTO                   604
  842. // Busy dialog stringtable defines
  843. #define IDS_BZRESULTTEXTBUSY            32447
  844. #define IDS_BZRESULTTEXTNOTRESPONDING   32448
  845. // Links dialog stringtable defines
  846. #define IDS_LINK_AUTO           32450
  847. #define IDS_LINK_MANUAL         32451
  848. #define IDS_LINK_UNKNOWN        32452
  849. #define IDS_LINKS               32453
  850. #define IDS_FAILED              32454
  851. #define IDS_CHANGESOURCE        32455
  852. #define IDS_INVALIDSOURCE       32456
  853. #define IDS_ERR_GETLINKSOURCE   32457
  854. #define IDS_ERR_GETLINKUPDATEOPTIONS    32458
  855. #define IDS_ERR_ADDSTRING       32459
  856. #define IDS_CHANGEADDITIONALLINKS   32460
  857. #define IDS_CLOSE               32461
  858. /*************************************************************************
  859. ** PROMPT USER DIALOGS
  860. *************************************************************************/
  861. #define ID_PU_LINKS             900
  862. #define ID_PU_TEXT              901
  863. #define ID_PU_CONVERT           902
  864. #define ID_PU_BROWSE            904
  865. #define ID_PU_METER             905
  866. #define ID_PU_PERCENT           906
  867. #define ID_PU_STOP              907
  868. // used for -1 ids in dialogs:
  869. #define ID_DUMMY    999
  870. /* inside ole2ui.c */
  871. #ifdef __cplusplus
  872. extern "C"
  873. #endif
  874. /*************************************************************************
  875. ** OLE OBJECT FEEDBACK EFFECTS
  876. *************************************************************************/
  877. #define OLEUI_HANDLES_USEINVERSE    0x00000001L
  878. #define OLEUI_HANDLES_NOBORDER      0x00000002L
  879. #define OLEUI_HANDLES_INSIDE        0x00000004L
  880. #define OLEUI_HANDLES_OUTSIDE       0x00000008L
  881. #define OLEUI_SHADE_FULLRECT        1
  882. #define OLEUI_SHADE_BORDERIN        2
  883. #define OLEUI_SHADE_BORDEROUT       3
  884. /* objfdbk.c function prototypes */
  885. STDAPI_(void) OleUIDrawHandles(LPRECT lpRect, HDC hdc, DWORD dwFlags, UINT cSize, BOOL fDraw);
  886. STDAPI_(void) OleUIDrawShading(LPRECT lpRect, HDC hdc, DWORD dwFlags, UINT cWidth);
  887. STDAPI_(void) OleUIShowObject(LPCRECT lprc, HDC hdc, BOOL fIsLink);
  888. /*************************************************************************
  889. ** Hatch window definitions and prototypes                              **
  890. *************************************************************************/
  891. #define DEFAULT_HATCHBORDER_WIDTH   4
  892. STDAPI_(BOOL) RegisterHatchWindowClass(HINSTANCE hInst);
  893. STDAPI_(HWND) CreateHatchWindow(HWND hWndParent, HINSTANCE hInst);
  894. STDAPI_(UINT) GetHatchWidth(HWND hWndHatch);
  895. STDAPI_(void) GetHatchRect(HWND hWndHatch, LPRECT lpHatchRect);
  896. STDAPI_(void) SetHatchRect(HWND hWndHatch, LPRECT lprcHatchRect);
  897. STDAPI_(void) SetHatchWindowSize(
  898.       HWND        hWndHatch,
  899.       LPRECT      lprcIPObjRect,
  900.       LPRECT      lprcClipRect,
  901.       LPPOINT     lpptOffset
  902. );
  903. #define OLEUI_VERSION_MAGIC 0x4D42
  904. #endif // _OLESTD_H_