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. HRESULT HrGetClassFileA(LPCSTR, CLSID*);
  553. STDAPI_(void) OleDbgPrint(
  554.       int     nDbgLvl,
  555.       LPSTR   lpszPrefix,
  556.       LPSTR   lpszMsg,
  557.       int     nIndent
  558. );
  559. STDAPI_(void) OleDbgPrintAlways(LPSTR lpszPrefix, LPSTR lpszMsg, int nIndent);
  560. STDAPI_(void) OleDbgSetDbgLevel(int nDbgLvl);
  561. STDAPI_(int) OleDbgGetDbgLevel( void );
  562. STDAPI_(void) OleDbgIndent(int n);
  563. STDAPI_(void) OleDbgPrintRefCnt(
  564.       int         nDbgLvl,
  565.       LPSTR       lpszPrefix,
  566.       LPSTR       lpszMsg,
  567.       LPVOID      lpObj,
  568.       ULONG       refcnt
  569. );
  570. STDAPI_(void) OleDbgPrintRefCntAlways(
  571.       LPSTR       lpszPrefix,
  572.       LPSTR       lpszMsg,
  573.       LPVOID      lpObj,
  574.       ULONG       refcnt
  575. );
  576. STDAPI_(void) OleDbgPrintRect(
  577.       int         nDbgLvl,
  578.       LPSTR       lpszPrefix,
  579.       LPSTR       lpszMsg,
  580.       LPRECT      lpRect
  581. );
  582. STDAPI_(void) OleDbgPrintRectAlways(
  583.       LPSTR       lpszPrefix,
  584.       LPSTR       lpszMsg,
  585.       LPRECT      lpRect
  586. );
  587. STDAPI_(void) OleDbgPrintScodeAlways(LPSTR lpszPrefix, LPSTR lpszMsg, SCODE sc);
  588. STDAPI_(LPENUMFORMATETC)
  589.   OleStdEnumFmtEtc_Create(ULONG nCount, LPFORMATETC lpEtc);
  590. STDAPI_(LPENUMSTATDATA)
  591.   OleStdEnumStatData_Create(ULONG nCount, LPSTATDATA lpStat);
  592. STDAPI_(BOOL)
  593.   OleStdCopyStatData(LPSTATDATA pDest, LPSTATDATA pSrc);
  594. STDAPI_(HPALETTE)
  595.   OleStdCreateStandardPalette(void);
  596. #if defined( OBSOLETE )
  597. /*************************************************************************
  598. ** The following API's have been converted into macros:
  599. **          OleStdQueryOleObjectData
  600. **          OleStdQueryLinkSourceData
  601. **          OleStdQueryObjectDescriptorData
  602. **          OleStdQueryFormatMedium
  603. **          OleStdCopyMetafilePict
  604. **          AreRectsEqual
  605. **          OleStdGetDropEffect
  606. **
  607. **    These macros are defined above
  608. *************************************************************************/
  609. STDAPI_(BOOL) AreRectsEqual(LPRECT lprc1, LPRECT lprc2);
  610. STDAPI_(BOOL) OleStdCopyMetafilePict(HANDLE hpictin, HANDLE FAR* phpictout);
  611. STDAPI OleStdQueryOleObjectData(LPFORMATETC lpformatetc);
  612. STDAPI OleStdQueryLinkSourceData(LPFORMATETC lpformatetc);
  613. STDAPI OleStdQueryObjectDescriptorData(LPFORMATETC lpformatetc);
  614. STDAPI OleStdQueryFormatMedium(LPFORMATETC lpformatetc, TYMED tymed);
  615. STDAPI_(DWORD) OleStdGetDropEffect ( DWORD grfKeyState );
  616. #endif  // OBSOLETE
  617. // END OF OLD OLESTD.H FILE
  618. #define UPDATELINKS_STARTDELAY 2000 // delay before first link
  619. #ifdef __TURBOC__
  620. #define _getcwd getcwd
  621. #define _itoa   itoa
  622. #define __max   max
  623. #define _find_t find_t
  624. #endif // __TURBOC__
  625. #ifdef WIN32
  626. #define _fmemset memset
  627. #define _fmemcpy memcpy
  628. #define _fmemcmp memcmp
  629. #define _fstrcpy strcpy
  630. #define _fstrncpy strncpy
  631. #define _fstrlen strlen
  632. #define _fstrrchr strrchr
  633. #define _fstrtok strtok
  634. // BUGBUG32: isspace function does not seem to work properly
  635. #undef isspace
  636. #define isspace(j) (j==' ' || j=='t' || j=='n')
  637. #endif  // WIN32
  638. #if !defined( EXPORT )
  639. #ifdef WIN32
  640. #define EXPORT
  641. #else
  642. #define EXPORT  __export
  643. #endif  // WIN32
  644. #endif  // !EXPORT
  645. /*
  646.  * Initialization / Uninitialization routines.  OleStdInitialize
  647.  * must be called prior to using any functions in OLESTD.LIB.
  648.  */
  649. STDAPI_(BOOL) OleStdInitialize(HINSTANCE hInstance);
  650. STDAPI_(void) OleStdUninitialize(void);
  651. // object count, used to support DllCanUnloadNow and OleUICanUnloadNow
  652. extern DWORD g_dwObjectCount;
  653. STDAPI OleUICanUnloadNow(void);
  654. STDAPI OleUILockLibrary(BOOL fLock);
  655. //Dialog Identifiers as passed in Help messages to identify the source.
  656. #define IDD_FILEOPEN            32253
  657. // The following Dialogs are message dialogs used by OleUIPromptUser API
  658. // Stringtable identifers
  659. #define IDS_OLE2UIUNKNOWN       32300
  660. #define IDS_OLE2UILINK          32301
  661. #define IDS_OLE2UIOBJECT        32302
  662. #define IDS_OLE2UIEDIT          32303
  663. #define IDS_OLE2UICONVERT       32304
  664. #define IDS_OLE2UIEDITLINKCMD_1VERB     32305
  665. #define IDS_OLE2UIEDITOBJECTCMD_1VERB   32306
  666. #define IDS_OLE2UIEDITLINKCMD_NVERB     32307
  667. #define IDS_OLE2UIEDITOBJECTCMD_NVERB   32308
  668. #define IDS_OLE2UIEDITNOOBJCMD  32309
  669. // def. icon label (usu. "Document")
  670. #define IDS_DEFICONLABEL        32310
  671. #define IDS_OLE2UIPASTELINKEDTYPE  32311
  672. #define IDS_FILTERS             32320
  673. #define IDS_ICONFILTERS         32321
  674. #define IDS_BROWSE              32322
  675. //Resource identifiers for bitmaps
  676. #define IDB_RESULTSEGA                  32325
  677. #define IDB_RESULTSVGA                  32326
  678. #define IDB_RESULTSHIRESVGA             32327
  679. //Missing from windows.h
  680. #ifndef PVOID
  681. typedef VOID *PVOID;
  682. #endif
  683. //Hook type used in all structures.
  684. typedef UINT (CALLBACK *LPFNOLEUIHOOK)(HWND, UINT, WPARAM, LPARAM);
  685. //Strings for registered messages
  686. #define SZOLEUI_MSG_FILEOKSTRING        "OLEUI_MSG_FILEOKSTRING"
  687. //Help Button Identifier
  688. #define ID_OLEUIHELP                    99
  689. // Static text control (use this instead of -1 so things work correctly for
  690. // localization
  691. #define  ID_STATIC                      98
  692. //Maximum key size we read from the RegDB.
  693. #define OLEUI_CCHKEYMAX                 256  // make any changes to this in geticon.c too
  694. //Maximum verb length and length of Object menu
  695. #define OLEUI_CCHVERBMAX                32
  696. #define OLEUI_OBJECTMENUMAX             256
  697. //Maximum MS-DOS pathname.
  698. #define OLEUI_CCHPATHMAX                256 // make any changes to this in geticon.c too
  699. #define OLEUI_CCHFILEMAX                13
  700. //Icon label length
  701. #define OLEUI_CCHLABELMAX               40  // make any changes to this in geticon.c too
  702. //Length of the CLSID string
  703. #define OLEUI_CCHCLSIDSTRING            39
  704. //Metafile utility functions
  705. WINOLEAPI_(HGLOBAL) OleUIMetafilePictFromIconAndLabel(HICON, LPOLESTR, LPOLESTR, UINT);
  706. STDAPI_(void)    OleUIMetafilePictIconFree(HGLOBAL);
  707. STDAPI_(BOOL)    OleUIMetafilePictIconDraw(HDC, LPRECT, HGLOBAL, BOOL);
  708. STDAPI_(UINT)    OleUIMetafilePictExtractLabel(HGLOBAL, LPOLESTR, UINT, LPDWORD);
  709. STDAPI_(HICON)   OleUIMetafilePictExtractIcon(HGLOBAL);
  710. STDAPI_(BOOL)    OleUIMetafilePictExtractIconSource(HGLOBAL,LPOLESTR,UINT FAR *);
  711. /*************************************************************************
  712. ** INSERT OBJECT DIALOG
  713. *************************************************************************/
  714. //Insert Object Dialog identifiers
  715. #define ID_IO_CREATENEW                 2100
  716. #define ID_IO_CREATEFROMFILE            2101
  717. #define ID_IO_LINKFILE                  2102
  718. #define ID_IO_OBJECTTYPELIST            2103
  719. #define ID_IO_DISPLAYASICON             2104
  720. #define ID_IO_CHANGEICON                2105
  721. #define ID_IO_FILE                      2106
  722. #define ID_IO_FILEDISPLAY               2107
  723. #define ID_IO_RESULTIMAGE               2108
  724. #define ID_IO_RESULTTEXT                2109
  725. #define ID_IO_ICONDISPLAY               2110
  726. #define ID_IO_OBJECTTYPETEXT            2111
  727. #define ID_IO_FILETEXT                  2112
  728. #define ID_IO_FILETYPE                  2113
  729. // Strings in OLE2UI resources
  730. #define IDS_IORESULTNEW                 32400
  731. #define IDS_IORESULTNEWICON             32401
  732. #define IDS_IORESULTFROMFILE1           32402
  733. #define IDS_IORESULTFROMFILE2           32403
  734. #define IDS_IORESULTFROMFILEICON2       32404
  735. #define IDS_IORESULTLINKFILE1           32405
  736. #define IDS_IORESULTLINKFILE2           32406
  737. #define IDS_IORESULTLINKFILEICON1       32407
  738. #define IDS_IORESULTLINKFILEICON2       32408
  739. /*************************************************************************
  740. ** PASTE SPECIAL DIALOG
  741. *************************************************************************/
  742. //Paste Special Dialog identifiers
  743. #define ID_PS_PASTE                    500
  744. #define ID_PS_PASTELINK                501
  745. #define ID_PS_SOURCETEXT               502
  746. #define ID_PS_PASTELIST                503
  747. #define ID_PS_PASTELINKLIST            504
  748. #define ID_PS_DISPLAYLIST              505
  749. #define ID_PS_DISPLAYASICON            506
  750. #define ID_PS_ICONDISPLAY              507
  751. #define ID_PS_CHANGEICON               508
  752. #define ID_PS_RESULTIMAGE              509
  753. #define ID_PS_RESULTTEXT               510
  754. #define ID_PS_RESULTGROUP              511
  755. #define ID_PS_STXSOURCE                512
  756. #define ID_PS_STXAS                    513
  757. // Paste Special String IDs
  758. #define IDS_PSPASTEDATA                32410
  759. #define IDS_PSPASTEOBJECT              32411
  760. #define IDS_PSPASTEOBJECTASICON        32412
  761. #define IDS_PSPASTELINKDATA            32413
  762. #define IDS_PSPASTELINKOBJECT          32414
  763. #define IDS_PSPASTELINKOBJECTASICON    32415
  764. #define IDS_PSNONOLE                   32416
  765. #define IDS_PSUNKNOWNTYPE              32417
  766. #define IDS_PSUNKNOWNSRC               32418
  767. #define IDS_PSUNKNOWNAPP               32419
  768. /*************************************************************************
  769. ** EDIT LINKS DIALOG
  770. *************************************************************************/
  771. // Edit Links Dialog identifiers
  772. #define ID_EL_CHANGESOURCE             201
  773. #define ID_EL_AUTOMATIC                202
  774. #define ID_EL_CLOSE                    208
  775. #define ID_EL_CANCELLINK               209
  776. #define ID_EL_UPDATENOW                210
  777. #define ID_EL_OPENSOURCE               211
  778. #define ID_EL_MANUAL                   212
  779. #define ID_EL_LINKSOURCE               216
  780. #define ID_EL_LINKTYPE                 217
  781. #define ID_EL_UPDATE                   218
  782. #define ID_EL_NULL                     -1
  783. #define ID_EL_LINKSLISTBOX             206
  784. #define ID_EL_COL1                     220
  785. #define ID_EL_COL2                     221
  786. #define ID_EL_COL3                     222
  787. /*************************************************************************
  788. ** CHANGE ICON DIALOG
  789. *************************************************************************/
  790. //Change Icon Dialog identifiers
  791. #define ID_GROUP                    120
  792. #define ID_CURRENT                  121
  793. #define ID_CURRENTICON              122
  794. #define ID_DEFAULT                  123
  795. #define ID_DEFAULTICON              124
  796. #define ID_FROMFILE                 125
  797. #define ID_FROMFILEEDIT             126
  798. #define ID_ICONLIST                 127
  799. #define ID_LABEL                    128
  800. #define ID_LABELEDIT                129
  801. #define ID_BROWSE                   130
  802. #define ID_RESULTICON               132
  803. #define ID_RESULTLABEL              133
  804. // Stringtable defines for Change Icon
  805. #define IDS_CINOICONSINFILE         32430
  806. #define IDS_CIINVALIDFILE           32431
  807. #define IDS_CIFILEACCESS            32432
  808. #define IDS_CIFILESHARE             32433
  809. #define IDS_CIFILEOPENFAIL          32434
  810. /*************************************************************************
  811. ** CONVERT DIALOG
  812. *************************************************************************/
  813. //Convert Dialog identifiers
  814. #define IDCV_OBJECTTYPE             150
  815. #define IDCV_DISPLAYASICON          152
  816. #define IDCV_CHANGEICON             153
  817. #define IDCV_ACTIVATELIST           154
  818. #define IDCV_CONVERTTO              155
  819. #define IDCV_ACTIVATEAS             156
  820. #define IDCV_RESULTTEXT             157
  821. #define IDCV_CONVERTLIST            158
  822. #define IDCV_ICON                   159
  823. #define IDCV_ICONLABEL1             160
  824. #define IDCV_ICONLABEL2             161
  825. #define IDCV_STXCURTYPE             162
  826. #define IDCV_GRPRESULT              163
  827. #define IDCV_STXCONVERTTO           164
  828. // String IDs for Convert dialog
  829. #define IDS_CVRESULTCONVERTLINK     32440
  830. #define IDS_CVRESULTCONVERTTO       32441
  831. #define IDS_CVRESULTNOCHANGE        32442
  832. #define IDS_CVRESULTDISPLAYASICON   32443
  833. #define IDS_CVRESULTACTIVATEAS      32444
  834. #define IDS_CVRESULTACTIVATEDIFF    32445
  835. /*************************************************************************
  836. ** BUSY DIALOG
  837. *************************************************************************/
  838. // Busy dialog identifiers
  839. #define IDBZ_RETRY                      600
  840. #define IDBZ_ICON                       601
  841. #define IDBZ_MESSAGE1                   602
  842. #define IDBZ_SWITCHTO                   604
  843. // Busy dialog stringtable defines
  844. #define IDS_BZRESULTTEXTBUSY            32447
  845. #define IDS_BZRESULTTEXTNOTRESPONDING   32448
  846. // Links dialog stringtable defines
  847. #define IDS_LINK_AUTO           32450
  848. #define IDS_LINK_MANUAL         32451
  849. #define IDS_LINK_UNKNOWN        32452
  850. #define IDS_LINKS               32453
  851. #define IDS_FAILED              32454
  852. #define IDS_CHANGESOURCE        32455
  853. #define IDS_INVALIDSOURCE       32456
  854. #define IDS_ERR_GETLINKSOURCE   32457
  855. #define IDS_ERR_GETLINKUPDATEOPTIONS    32458
  856. #define IDS_ERR_ADDSTRING       32459
  857. #define IDS_CHANGEADDITIONALLINKS   32460
  858. #define IDS_CLOSE               32461
  859. /*************************************************************************
  860. ** PROMPT USER DIALOGS
  861. *************************************************************************/
  862. #define ID_PU_LINKS             900
  863. #define ID_PU_TEXT              901
  864. #define ID_PU_CONVERT           902
  865. #define ID_PU_BROWSE            904
  866. #define ID_PU_METER             905
  867. #define ID_PU_PERCENT           906
  868. #define ID_PU_STOP              907
  869. // used for -1 ids in dialogs:
  870. #define ID_DUMMY    999
  871. /* inside ole2ui.c */
  872. #ifdef __cplusplus
  873. extern "C"
  874. #endif
  875. /*************************************************************************
  876. ** OLE OBJECT FEEDBACK EFFECTS
  877. *************************************************************************/
  878. #define OLEUI_HANDLES_USEINVERSE    0x00000001L
  879. #define OLEUI_HANDLES_NOBORDER      0x00000002L
  880. #define OLEUI_HANDLES_INSIDE        0x00000004L
  881. #define OLEUI_HANDLES_OUTSIDE       0x00000008L
  882. #define OLEUI_SHADE_FULLRECT        1
  883. #define OLEUI_SHADE_BORDERIN        2
  884. #define OLEUI_SHADE_BORDEROUT       3
  885. /* objfdbk.c function prototypes */
  886. STDAPI_(void) OleUIDrawHandles(LPRECT lpRect, HDC hdc, DWORD dwFlags, UINT cSize, BOOL fDraw);
  887. STDAPI_(void) OleUIDrawShading(LPRECT lpRect, HDC hdc, DWORD dwFlags, UINT cWidth);
  888. STDAPI_(void) OleUIShowObject(LPCRECT lprc, HDC hdc, BOOL fIsLink);
  889. /*************************************************************************
  890. ** Hatch window definitions and prototypes                              **
  891. *************************************************************************/
  892. #define DEFAULT_HATCHBORDER_WIDTH   4
  893. STDAPI_(BOOL) RegisterHatchWindowClass(HINSTANCE hInst);
  894. STDAPI_(HWND) CreateHatchWindow(HWND hWndParent, HINSTANCE hInst);
  895. STDAPI_(UINT) GetHatchWidth(HWND hWndHatch);
  896. STDAPI_(void) GetHatchRect(HWND hWndHatch, LPRECT lpHatchRect);
  897. STDAPI_(void) SetHatchRect(HWND hWndHatch, LPRECT lprcHatchRect);
  898. STDAPI_(void) SetHatchWindowSize(
  899.       HWND        hWndHatch,
  900.       LPRECT      lprcIPObjRect,
  901.       LPRECT      lprcClipRect,
  902.       LPPOINT     lpptOffset
  903. );
  904. #define OLEUI_VERSION_MAGIC 0x4D42
  905. #endif // _OLESTD_H_