Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1629 lines
73 KiB

  1. /*++ BUILD Version: 0002 Increment this if a change has global effects
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. oledlg.h
  5. Abstract:
  6. Include file for the OLE common dialogs.
  7. The following dialog implementations are provided:
  8. - Insert Object Dialog
  9. - Convert Object Dialog
  10. - Paste Special Dialog
  11. - Change Icon Dialog
  12. - Edit Links Dialog
  13. - Update Links Dialog
  14. - Change Source Dialog
  15. - Busy Dialog
  16. - User Error Message Dialog
  17. - Object Properties Dialog
  18. --*/
  19. #ifndef _OLEDLG_H_
  20. #define _OLEDLG_H_
  21. #if _MSC_VER > 1000
  22. #pragma once
  23. #endif
  24. #ifndef RC_INVOKED
  25. #ifndef __cplusplus
  26. #define NONAMELESSUNION // use strict ANSI standard (for DVOBJ.H)
  27. #endif
  28. // syncronize UNICODE options
  29. #if defined(_UNICODE) && !defined(UNICODE)
  30. #define UNICODE
  31. #endif
  32. #if defined(UNICODE) && !defined(_UNICODE)
  33. #define _UNICODE
  34. #endif
  35. #ifndef _WINDOWS_
  36. #include <windows.h>
  37. #endif
  38. #ifndef _INC_SHELLAPI
  39. #include <shellapi.h>
  40. #endif
  41. #ifndef _INC_COMMDLG
  42. #include <commdlg.h>
  43. #endif
  44. #ifndef _OLE2_H_
  45. #include <ole2.h>
  46. #endif
  47. #include <string.h>
  48. #include <tchar.h>
  49. #endif // RC_INVOKED
  50. #include <dlgs.h> // common dialog IDs
  51. // Help Button Identifier
  52. #define IDC_OLEUIHELP 99
  53. // Insert Object Dialog identifiers
  54. #define IDC_IO_CREATENEW 2100
  55. #define IDC_IO_CREATEFROMFILE 2101
  56. #define IDC_IO_LINKFILE 2102
  57. #define IDC_IO_OBJECTTYPELIST 2103
  58. #define IDC_IO_DISPLAYASICON 2104
  59. #define IDC_IO_CHANGEICON 2105
  60. #define IDC_IO_FILE 2106
  61. #define IDC_IO_FILEDISPLAY 2107
  62. #define IDC_IO_RESULTIMAGE 2108
  63. #define IDC_IO_RESULTTEXT 2109
  64. #define IDC_IO_ICONDISPLAY 2110
  65. #define IDC_IO_OBJECTTYPETEXT 2111 //{{NOHELP}}
  66. #define IDC_IO_FILETEXT 2112 //{{NOHELP}}
  67. #define IDC_IO_FILETYPE 2113
  68. #define IDC_IO_INSERTCONTROL 2114
  69. #define IDC_IO_ADDCONTROL 2115
  70. #define IDC_IO_CONTROLTYPELIST 2116
  71. // Paste Special Dialog identifiers
  72. #define IDC_PS_PASTE 500
  73. #define IDC_PS_PASTELINK 501
  74. #define IDC_PS_SOURCETEXT 502
  75. #define IDC_PS_PASTELIST 503 //{{NOHELP}}
  76. #define IDC_PS_PASTELINKLIST 504 //{{NOHELP}}
  77. #define IDC_PS_DISPLAYLIST 505
  78. #define IDC_PS_DISPLAYASICON 506
  79. #define IDC_PS_ICONDISPLAY 507
  80. #define IDC_PS_CHANGEICON 508
  81. #define IDC_PS_RESULTIMAGE 509
  82. #define IDC_PS_RESULTTEXT 510
  83. // Change Icon Dialog identifiers
  84. #define IDC_CI_GROUP 120 //{{NOHELP}}
  85. #define IDC_CI_CURRENT 121
  86. #define IDC_CI_CURRENTICON 122
  87. #define IDC_CI_DEFAULT 123
  88. #define IDC_CI_DEFAULTICON 124
  89. #define IDC_CI_FROMFILE 125
  90. #define IDC_CI_FROMFILEEDIT 126
  91. #define IDC_CI_ICONLIST 127
  92. #define IDC_CI_LABEL 128 //{{NOHELP}
  93. #define IDC_CI_LABELEDIT 129
  94. #define IDC_CI_BROWSE 130
  95. #define IDC_CI_ICONDISPLAY 131
  96. // Convert Dialog identifiers
  97. #define IDC_CV_OBJECTTYPE 150
  98. #define IDC_CV_DISPLAYASICON 152
  99. #define IDC_CV_CHANGEICON 153
  100. #define IDC_CV_ACTIVATELIST 154
  101. #define IDC_CV_CONVERTTO 155
  102. #define IDC_CV_ACTIVATEAS 156
  103. #define IDC_CV_RESULTTEXT 157
  104. #define IDC_CV_CONVERTLIST 158
  105. #define IDC_CV_ICONDISPLAY 165
  106. // Edit Links Dialog identifiers
  107. #define IDC_EL_CHANGESOURCE 201
  108. #define IDC_EL_AUTOMATIC 202
  109. #define IDC_EL_CANCELLINK 209
  110. #define IDC_EL_UPDATENOW 210
  111. #define IDC_EL_OPENSOURCE 211
  112. #define IDC_EL_MANUAL 212
  113. #define IDC_EL_LINKSOURCE 216
  114. #define IDC_EL_LINKTYPE 217
  115. #define IDC_EL_LINKSLISTBOX 206
  116. #define IDC_EL_COL1 220 //{{NOHELP}}
  117. #define IDC_EL_COL2 221 //{{NOHELP}}
  118. #define IDC_EL_COL3 222 //{{NOHELP}}
  119. // Busy dialog identifiers
  120. #define IDC_BZ_RETRY 600
  121. #define IDC_BZ_ICON 601
  122. #define IDC_BZ_MESSAGE1 602 //{{NOHELP}}
  123. #define IDC_BZ_SWITCHTO 604
  124. // Update Links dialog identifiers
  125. #define IDC_UL_METER 1029 //{{NOHELP}}
  126. #define IDC_UL_STOP 1030 //{{NOHELP}}
  127. #define IDC_UL_PERCENT 1031 //{{NOHELP}}
  128. #define IDC_UL_PROGRESS 1032 //{{NOHELP}}
  129. // User Prompt dialog identifiers
  130. #define IDC_PU_LINKS 900 //{{NOHELP}}
  131. #define IDC_PU_TEXT 901 //{{NOHELP}}
  132. #define IDC_PU_CONVERT 902 //{{NOHELP}}
  133. #define IDC_PU_ICON 908 //{{NOHELP}}
  134. // General Properties identifiers
  135. #define IDC_GP_OBJECTNAME 1009
  136. #define IDC_GP_OBJECTTYPE 1010
  137. #define IDC_GP_OBJECTSIZE 1011
  138. #define IDC_GP_CONVERT 1013
  139. #define IDC_GP_OBJECTICON 1014 //{{NOHELP}}
  140. #define IDC_GP_OBJECTLOCATION 1022
  141. // View Properties identifiers
  142. #define IDC_VP_PERCENT 1000
  143. #define IDC_VP_CHANGEICON 1001
  144. #define IDC_VP_EDITABLE 1002
  145. #define IDC_VP_ASICON 1003
  146. #define IDC_VP_RELATIVE 1005
  147. #define IDC_VP_SPIN 1006
  148. #define IDC_VP_SCALETXT 1034
  149. #define IDC_VP_ICONDISPLAY 1021
  150. #define IDC_VP_RESULTIMAGE 1033
  151. // Link Properties identifiers
  152. #define IDC_LP_OPENSOURCE 1006
  153. #define IDC_LP_UPDATENOW 1007
  154. #define IDC_LP_BREAKLINK 1008
  155. #define IDC_LP_LINKSOURCE 1012
  156. #define IDC_LP_CHANGESOURCE 1015
  157. #define IDC_LP_AUTOMATIC 1016
  158. #define IDC_LP_MANUAL 1017
  159. #define IDC_LP_DATE 1018
  160. #define IDC_LP_TIME 1019
  161. // Dialog Identifiers as passed in Help messages to identify the source.
  162. #define IDD_INSERTOBJECT 1000
  163. #define IDD_CHANGEICON 1001
  164. #define IDD_CONVERT 1002
  165. #define IDD_PASTESPECIAL 1003
  166. #define IDD_EDITLINKS 1004
  167. #define IDD_BUSY 1006
  168. #define IDD_UPDATELINKS 1007
  169. #define IDD_CHANGESOURCE 1009
  170. #define IDD_INSERTFILEBROWSE 1010
  171. #define IDD_CHANGEICONBROWSE 1011
  172. #define IDD_CONVERTONLY 1012
  173. #define IDD_CHANGESOURCE4 1013
  174. #define IDD_GNRLPROPS 1100
  175. #define IDD_VIEWPROPS 1101
  176. #define IDD_LINKPROPS 1102
  177. #define IDD_CONVERT4 1103
  178. #define IDD_CONVERTONLY4 1104
  179. #define IDD_EDITLINKS4 1105
  180. #define IDD_GNRLPROPS4 1106
  181. #define IDD_LINKPROPS4 1107
  182. #define IDD_PASTESPECIAL4 1108
  183. // The following Dialogs are message dialogs used by OleUIPromptUser API
  184. #define IDD_CANNOTUPDATELINK 1008
  185. #define IDD_LINKSOURCEUNAVAILABLE 1020
  186. #define IDD_SERVERNOTFOUND 1023
  187. #define IDD_OUTOFMEMORY 1024
  188. #define IDD_SERVERNOTREGW 1021
  189. #define IDD_LINKTYPECHANGEDW 1022
  190. #define IDD_SERVERNOTREGA 1025
  191. #define IDD_LINKTYPECHANGEDA 1026
  192. #ifdef UNICODE
  193. #define IDD_SERVERNOTREG IDD_SERVERNOTREGW
  194. #define IDD_LINKTYPECHANGED IDD_LINKTYPECHANGEDW
  195. #else
  196. #define IDD_SERVERNOTREG IDD_SERVERNOTREGA
  197. #define IDD_LINKTYPECHANGED IDD_LINKTYPECHANGEDA
  198. #endif
  199. #ifndef RC_INVOKED
  200. #ifdef __cplusplus
  201. extern "C" {
  202. #endif
  203. #pragma pack(push, 8)
  204. // Delimeter used to separate ItemMoniker pieces of a composite moniker
  205. #ifdef _MAC
  206. #define OLESTDDELIM ":"
  207. #else
  208. #define OLESTDDELIM TEXT("\\")
  209. #endif
  210. // Hook type used in all structures.
  211. typedef UINT (CALLBACK *LPFNOLEUIHOOK)(HWND, UINT, WPARAM, LPARAM);
  212. // Strings for registered messages
  213. #define SZOLEUI_MSG_HELP TEXT("OLEUI_MSG_HELP")
  214. #define SZOLEUI_MSG_ENDDIALOG TEXT("OLEUI_MSG_ENDDIALOG")
  215. #define SZOLEUI_MSG_BROWSE TEXT("OLEUI_MSG_BROWSE")
  216. #define SZOLEUI_MSG_CHANGEICON TEXT("OLEUI_MSG_CHANGEICON")
  217. #define SZOLEUI_MSG_CLOSEBUSYDIALOG TEXT("OLEUI_MSG_CLOSEBUSYDIALOG")
  218. #define SZOLEUI_MSG_CONVERT TEXT("OLEUI_MSG_CONVERT")
  219. #define SZOLEUI_MSG_CHANGESOURCE TEXT("OLEUI_MSG_CHANGESOURCE")
  220. #define SZOLEUI_MSG_ADDCONTROL TEXT("OLEUI_MSG_ADDCONTROL")
  221. #define SZOLEUI_MSG_BROWSE_OFN TEXT("OLEUI_MSG_BROWSE_OFN")
  222. // Identifiers for SZOLEUI_MSG_BROWSE_OFN (in wParam)
  223. #define ID_BROWSE_CHANGEICON 1
  224. #define ID_BROWSE_INSERTFILE 2
  225. #define ID_BROWSE_ADDCONTROL 3
  226. #define ID_BROWSE_CHANGESOURCE 4
  227. // Standard success/error definitions
  228. #define OLEUI_FALSE 0
  229. #define OLEUI_SUCCESS 1 // No error, same as OLEUI_OK
  230. #define OLEUI_OK 1 // OK button pressed
  231. #define OLEUI_CANCEL 2 // Cancel button pressed
  232. #define OLEUI_ERR_STANDARDMIN 100
  233. #define OLEUI_ERR_OLEMEMALLOC 100
  234. #define OLEUI_ERR_STRUCTURENULL 101 // Standard field validation
  235. #define OLEUI_ERR_STRUCTUREINVALID 102
  236. #define OLEUI_ERR_CBSTRUCTINCORRECT 103
  237. #define OLEUI_ERR_HWNDOWNERINVALID 104
  238. #define OLEUI_ERR_LPSZCAPTIONINVALID 105
  239. #define OLEUI_ERR_LPFNHOOKINVALID 106
  240. #define OLEUI_ERR_HINSTANCEINVALID 107
  241. #define OLEUI_ERR_LPSZTEMPLATEINVALID 108
  242. #define OLEUI_ERR_HRESOURCEINVALID 109
  243. #define OLEUI_ERR_FINDTEMPLATEFAILURE 110 // Initialization errors
  244. #define OLEUI_ERR_LOADTEMPLATEFAILURE 111
  245. #define OLEUI_ERR_DIALOGFAILURE 112
  246. #define OLEUI_ERR_LOCALMEMALLOC 113
  247. #define OLEUI_ERR_GLOBALMEMALLOC 114
  248. #define OLEUI_ERR_LOADSTRING 115
  249. #define OLEUI_ERR_STANDARDMAX 116 // Start here for specific errors.
  250. // Miscellaneous utility functions.
  251. STDAPI_(BOOL) OleUIAddVerbMenuW(LPOLEOBJECT lpOleObj, LPCWSTR lpszShortType,
  252. HMENU hMenu, UINT uPos, UINT uIDVerbMin, UINT uIDVerbMax,
  253. BOOL bAddConvert, UINT idConvert, HMENU *lphMenu);
  254. STDAPI_(BOOL) OleUIAddVerbMenuA(LPOLEOBJECT lpOleObj, LPCSTR lpszShortType,
  255. HMENU hMenu, UINT uPos, UINT uIDVerbMin, UINT uIDVerbMax,
  256. BOOL bAddConvert, UINT idConvert, HMENU *lphMenu);
  257. #ifdef UNICODE
  258. #define OleUIAddVerbMenu OleUIAddVerbMenuW
  259. #else
  260. #define OleUIAddVerbMenu OleUIAddVerbMenuA
  261. #endif
  262. /////////////////////////////////////////////////////////////////////////////
  263. // INSERT OBJECT DIALOG
  264. typedef struct tagOLEUIINSERTOBJECTW
  265. {
  266. // These IN fields are standard across all OLEUI dialog functions.
  267. DWORD cbStruct; // Structure Size
  268. DWORD dwFlags; // IN-OUT: Flags
  269. HWND hWndOwner; // Owning window
  270. LPCWSTR lpszCaption; // Dialog caption bar contents
  271. LPFNOLEUIHOOK lpfnHook; // Hook callback
  272. LPARAM lCustData; // Custom data to pass to hook
  273. HINSTANCE hInstance; // Instance for customized template name
  274. LPCWSTR lpszTemplate; // Customized template name
  275. HRSRC hResource; // Customized template handle
  276. // Specifics for OLEUIINSERTOBJECT.
  277. CLSID clsid; // OUT: Return space for class ID
  278. LPWSTR lpszFile; // IN-OUT: Filename for inserts or links
  279. UINT cchFile; // IN: Size of lpszFile buffer: MAX_PATH
  280. UINT cClsidExclude; // IN: CLSIDs in lpClsidExclude
  281. LPCLSID lpClsidExclude; // IN: List of CLSIDs to exclude from listing.
  282. // Specific to create objects if flags say so
  283. IID iid; // IN: Requested interface on creation.
  284. DWORD oleRender; // IN: Rendering option
  285. LPFORMATETC lpFormatEtc; // IN: Desired format
  286. LPOLECLIENTSITE lpIOleClientSite; // IN: Site to be use for the object.
  287. LPSTORAGE lpIStorage; // IN: Storage used for the object
  288. LPVOID *ppvObj; // OUT: Where the object is returned.
  289. SCODE sc; // OUT: Result of creation calls.
  290. HGLOBAL hMetaPict; // OUT: metafile aspect (METAFILEPICT)
  291. } OLEUIINSERTOBJECTW, *POLEUIINSERTOBJECTW, *LPOLEUIINSERTOBJECTW;
  292. typedef struct tagOLEUIINSERTOBJECTA
  293. {
  294. // These IN fields are standard across all OLEUI dialog functions.
  295. DWORD cbStruct; // Structure Size
  296. DWORD dwFlags; // IN-OUT: Flags
  297. HWND hWndOwner; // Owning window
  298. LPCSTR lpszCaption; // Dialog caption bar contents
  299. LPFNOLEUIHOOK lpfnHook; // Hook callback
  300. LPARAM lCustData; // Custom data to pass to hook
  301. HINSTANCE hInstance; // Instance for customized template name
  302. LPCSTR lpszTemplate; // Customized template name
  303. HRSRC hResource; // Customized template handle
  304. // Specifics for OLEUIINSERTOBJECT.
  305. CLSID clsid; // OUT: Return space for class ID
  306. LPSTR lpszFile; // IN-OUT: Filename for inserts or links
  307. UINT cchFile; // IN: Size of lpszFile buffer: MAX_PATH
  308. UINT cClsidExclude; // IN: CLSIDs in lpClsidExclude
  309. LPCLSID lpClsidExclude; // IN: List of CLSIDs to exclude from listing.
  310. // Specific to create objects if flags say so
  311. IID iid; // IN: Requested interface on creation.
  312. DWORD oleRender; // IN: Rendering option
  313. LPFORMATETC lpFormatEtc; // IN: Desired format
  314. LPOLECLIENTSITE lpIOleClientSite; // IN: Site to be use for the object.
  315. LPSTORAGE lpIStorage; // IN: Storage used for the object
  316. LPVOID *ppvObj; // OUT: Where the object is returned.
  317. SCODE sc; // OUT: Result of creation calls.
  318. HGLOBAL hMetaPict; // OUT: metafile aspect (METAFILEPICT)
  319. } OLEUIINSERTOBJECTA, *POLEUIINSERTOBJECTA, *LPOLEUIINSERTOBJECTA;
  320. STDAPI_(UINT) OleUIInsertObjectW(LPOLEUIINSERTOBJECTW);
  321. STDAPI_(UINT) OleUIInsertObjectA(LPOLEUIINSERTOBJECTA);
  322. #ifdef UNICODE
  323. #define tagOLEUIINSERTOBJECT tagOLEUIINSERTOBJECTW
  324. #define OLEUIINSERTOBJECT OLEUIINSERTOBJECTW
  325. #define POLEUIINSERTOBJECT POLEUIINSERTOBJECTW
  326. #define LPOLEUIINSERTOBJECT LPOLEUIINSERTOBJECTW
  327. #define OleUIInsertObject OleUIInsertObjectW
  328. #else
  329. #define tagOLEUIINSERTOBJECT tagOLEUIINSERTOBJECTA
  330. #define OLEUIINSERTOBJECT OLEUIINSERTOBJECTA
  331. #define POLEUIINSERTOBJECT POLEUIINSERTOBJECTA
  332. #define LPOLEUIINSERTOBJECT LPOLEUIINSERTOBJECTA
  333. #define OleUIInsertObject OleUIInsertObjectA
  334. #endif
  335. // Insert Object flags
  336. #define IOF_SHOWHELP 0x00000001L
  337. #define IOF_SELECTCREATENEW 0x00000002L
  338. #define IOF_SELECTCREATEFROMFILE 0x00000004L
  339. #define IOF_CHECKLINK 0x00000008L
  340. #define IOF_CHECKDISPLAYASICON 0x00000010L
  341. #define IOF_CREATENEWOBJECT 0x00000020L
  342. #define IOF_CREATEFILEOBJECT 0x00000040L
  343. #define IOF_CREATELINKOBJECT 0x00000080L
  344. #define IOF_DISABLELINK 0x00000100L
  345. #define IOF_VERIFYSERVERSEXIST 0x00000200L
  346. #define IOF_DISABLEDISPLAYASICON 0x00000400L
  347. #define IOF_HIDECHANGEICON 0x00000800L
  348. #define IOF_SHOWINSERTCONTROL 0x00001000L
  349. #define IOF_SELECTCREATECONTROL 0x00002000L
  350. // Insert Object specific error codes
  351. #define OLEUI_IOERR_LPSZFILEINVALID (OLEUI_ERR_STANDARDMAX+0)
  352. #define OLEUI_IOERR_LPSZLABELINVALID (OLEUI_ERR_STANDARDMAX+1)
  353. #define OLEUI_IOERR_HICONINVALID (OLEUI_ERR_STANDARDMAX+2)
  354. #define OLEUI_IOERR_LPFORMATETCINVALID (OLEUI_ERR_STANDARDMAX+3)
  355. #define OLEUI_IOERR_PPVOBJINVALID (OLEUI_ERR_STANDARDMAX+4)
  356. #define OLEUI_IOERR_LPIOLECLIENTSITEINVALID (OLEUI_ERR_STANDARDMAX+5)
  357. #define OLEUI_IOERR_LPISTORAGEINVALID (OLEUI_ERR_STANDARDMAX+6)
  358. #define OLEUI_IOERR_SCODEHASERROR (OLEUI_ERR_STANDARDMAX+7)
  359. #define OLEUI_IOERR_LPCLSIDEXCLUDEINVALID (OLEUI_ERR_STANDARDMAX+8)
  360. #define OLEUI_IOERR_CCHFILEINVALID (OLEUI_ERR_STANDARDMAX+9)
  361. /////////////////////////////////////////////////////////////////////////////
  362. // PASTE SPECIAL DIALOG
  363. // The OLEUIPASTEFLAG enumeration is used by the OLEUIPASTEENTRY structure.
  364. //
  365. // OLEUIPASTE_ENABLEICON: If the container does not specify this flag for
  366. // the entry in the OLEUIPASTEENTRY array passed as input to
  367. // OleUIPasteSpecial, the DisplayAsIcon button will be unchecked and
  368. // disabled when the the user selects the format that corresponds to
  369. // the entry.
  370. //
  371. // OLEUIPASTE_PASTEONLY: Indicates that the entry in the OLEUIPASTEENTRY
  372. // array is valid for pasting only.
  373. //
  374. // OLEUIPASTE_PASTE: Indicates that the entry in the OLEUIPASTEENTRY array
  375. // is valid for pasting. It may also be valid for linking if any of
  376. // the following linking flags are specified.
  377. //
  378. // If the entry in the OLEUIPASTEENTRY array is valid for linking, the
  379. // following flags indicate which link types are acceptable by OR'ing
  380. // together the appropriate OLEUIPASTE_LINKTYPE<#> values.
  381. //
  382. // These values correspond as follows to the array of link types passed to
  383. // OleUIPasteSpecial:
  384. //
  385. // OLEUIPASTE_LINKTYPE1 = arrLinkTypes[0]
  386. // OLEUIPASTE_LINKTYPE2 = arrLinkTypes[1]
  387. // OLEUIPASTE_LINKTYPE3 = arrLinkTypes[2]
  388. // OLEUIPASTE_LINKTYPE4 = arrLinkTypes[3]
  389. // OLEUIPASTE_LINKTYPE5 = arrLinkTypes[4]
  390. // OLEUIPASTE_LINKTYPE6 = arrLinkTypes[5]
  391. // OLEUIPASTE_LINKTYPE7 = arrLinkTypes[6]
  392. // OLEUIPASTE_LINKTYPE8 = arrLinkTypes[7]
  393. //
  394. // where,
  395. // UINT arrLinkTypes[8] is an array of registered clipboard formats for
  396. // linking. A maximium of 8 link types are allowed.
  397. typedef enum tagOLEUIPASTEFLAG
  398. {
  399. OLEUIPASTE_ENABLEICON = 2048, // enable display as icon
  400. OLEUIPASTE_PASTEONLY = 0,
  401. OLEUIPASTE_PASTE = 512,
  402. OLEUIPASTE_LINKANYTYPE = 1024,
  403. OLEUIPASTE_LINKTYPE1 = 1,
  404. OLEUIPASTE_LINKTYPE2 = 2,
  405. OLEUIPASTE_LINKTYPE3 = 4,
  406. OLEUIPASTE_LINKTYPE4 = 8,
  407. OLEUIPASTE_LINKTYPE5 = 16,
  408. OLEUIPASTE_LINKTYPE6 = 32,
  409. OLEUIPASTE_LINKTYPE7 = 64,
  410. OLEUIPASTE_LINKTYPE8 = 128
  411. } OLEUIPASTEFLAG;
  412. // OLEUIPASTEENTRY structure
  413. //
  414. // An array of OLEUIPASTEENTRY entries is specified for the PasteSpecial
  415. // dialog box. Each entry includes a FORMATETC which specifies the
  416. // formats that are acceptable, a string that is to represent the format
  417. // in the dialog's list box, a string to customize the result text of the
  418. // dialog and a set of flags from the OLEUIPASTEFLAG enumeration. The
  419. // flags indicate if the entry is valid for pasting only, linking only or
  420. // both pasting and linking.
  421. typedef struct tagOLEUIPASTEENTRYW
  422. {
  423. FORMATETC fmtetc; // Format that is acceptable.
  424. LPCWSTR lpstrFormatName;// String that represents the format
  425. // to the user. %s is replaced by the
  426. // full user type name of the object.
  427. LPCWSTR lpstrResultText;// String to customize the result text
  428. // of the dialog when the user
  429. // selects the format correspoding to
  430. // this entry. Any %s in this string
  431. // is replaced by the the application
  432. // name or FullUserTypeName of the
  433. // object on the clipboard.
  434. DWORD dwFlags; // Values from OLEUIPASTEFLAG enum
  435. DWORD dwScratchSpace; // Scratch space used internally.
  436. } OLEUIPASTEENTRYW, *POLEUIPASTEENTRYW, *LPOLEUIPASTEENTRYW;
  437. typedef struct tagOLEUIPASTEENTRYA
  438. {
  439. FORMATETC fmtetc; // Format that is acceptable.
  440. LPCSTR lpstrFormatName;// String that represents the format
  441. // to the user. %s is replaced by the
  442. // full user type name of the object.
  443. LPCSTR lpstrResultText;// String to customize the result text
  444. // of the dialog when the user
  445. // selects the format correspoding to
  446. // this entry. Any %s in this string
  447. // is replaced by the the application
  448. // name or FullUserTypeName of the
  449. // object on the clipboard.
  450. DWORD dwFlags; // Values from OLEUIPASTEFLAG enum
  451. DWORD dwScratchSpace; // Scratch space used internally.
  452. } OLEUIPASTEENTRYA, *POLEUIPASTEENTRYA, *LPOLEUIPASTEENTRYA;
  453. #ifdef UNICODE
  454. #define tagOLEUIPASTEENTRY tagOLEUIPASTEENTRYW
  455. #define OLEUIPASTEENTRY OLEUIPASTEENTRYW
  456. #define POLEUIPASTEENTRY POLEUIPASTEENTRYW
  457. #define LPOLEUIPASTEENTRY LPOLEUIPASTEENTRYW
  458. #else
  459. #define tagOLEUIPASTEENTRY tagOLEUIPASTEENTRYA
  460. #define OLEUIPASTEENTRY OLEUIPASTEENTRYA
  461. #define POLEUIPASTEENTRY POLEUIPASTEENTRYA
  462. #define LPOLEUIPASTEENTRY LPOLEUIPASTEENTRYA
  463. #endif
  464. // Maximum number of link types
  465. #define PS_MAXLINKTYPES 8
  466. typedef struct tagOLEUIPASTESPECIALW
  467. {
  468. // These IN fields are standard across all OLEUI dialog functions.
  469. DWORD cbStruct; // Structure Size
  470. DWORD dwFlags; // IN-OUT: Flags
  471. HWND hWndOwner; // Owning window
  472. LPCWSTR lpszCaption; // Dialog caption bar contents
  473. LPFNOLEUIHOOK lpfnHook; // Hook callback
  474. LPARAM lCustData; // Custom data to pass to hook
  475. HINSTANCE hInstance; // Instance for customized template name
  476. LPCWSTR lpszTemplate; // Customized template name
  477. HRSRC hResource; // Customized template handle
  478. // Specifics for OLEUIPASTESPECIAL.
  479. LPDATAOBJECT lpSrcDataObj; // IN-OUT: Source IDataObject* on the clipboard
  480. // If lpSrcDataObj is NULL when OleUIPasteSpecial is called, then
  481. // OleUIPasteSpecial will attempt to retrieve a pointer to an
  482. // IDataObject from the clipboard. If OleUIPasteSpecial succeeds
  483. // then it is the caller's responsibility to free the IDataObject
  484. // returned in lpSrcDataObj.
  485. LPOLEUIPASTEENTRYW arrPasteEntries;// IN: Array of acceptable formats
  486. int cPasteEntries; // IN: No. of OLEUIPASTEENTRY array entries
  487. UINT FAR* arrLinkTypes; // IN: List of acceptable link types
  488. int cLinkTypes; // IN: Number of link types
  489. UINT cClsidExclude; // IN: Number of CLSIDs in lpClsidExclude
  490. LPCLSID lpClsidExclude; // IN: List of CLSIDs to exclude from list.
  491. int nSelectedIndex; // OUT: Index that the user selected
  492. BOOL fLink; // OUT: Indicates if Paste or PasteLink
  493. HGLOBAL hMetaPict; // OUT: Handle to Metafile containing icon
  494. SIZEL sizel; // OUT: size of object/link in its source
  495. // may be 0,0 if different display
  496. // aspect is chosen.
  497. } OLEUIPASTESPECIALW, *POLEUIPASTESPECIALW, *LPOLEUIPASTESPECIALW;
  498. typedef struct tagOLEUIPASTESPECIALA
  499. {
  500. // These IN fields are standard across all OLEUI dialog functions.
  501. DWORD cbStruct; // Structure Size
  502. DWORD dwFlags; // IN-OUT: Flags
  503. HWND hWndOwner; // Owning window
  504. LPCSTR lpszCaption; // Dialog caption bar contents
  505. LPFNOLEUIHOOK lpfnHook; // Hook callback
  506. LPARAM lCustData; // Custom data to pass to hook
  507. HINSTANCE hInstance; // Instance for customized template name
  508. LPCSTR lpszTemplate; // Customized template name
  509. HRSRC hResource; // Customized template handle
  510. // Specifics for OLEUIPASTESPECIAL.
  511. LPDATAOBJECT lpSrcDataObj; // IN-OUT: Source IDataObject* on the clipboard
  512. // If lpSrcDataObj is NULL when OleUIPasteSpecial is called, then
  513. // OleUIPasteSpecial will attempt to retrieve a pointer to an
  514. // IDataObject from the clipboard. If OleUIPasteSpecial succeeds
  515. // then it is the caller's responsibility to free the IDataObject
  516. // returned in lpSrcDataObj.
  517. LPOLEUIPASTEENTRYA arrPasteEntries;// IN: Array of acceptable formats
  518. int cPasteEntries; // IN: No. of OLEUIPASTEENTRY array entries
  519. UINT FAR* arrLinkTypes; // IN: List of acceptable link types
  520. int cLinkTypes; // IN: Number of link types
  521. UINT cClsidExclude; // IN: Number of CLSIDs in lpClsidExclude
  522. LPCLSID lpClsidExclude; // IN: List of CLSIDs to exclude from list.
  523. int nSelectedIndex; // OUT: Index that the user selected
  524. BOOL fLink; // OUT: Indicates if Paste or PasteLink
  525. HGLOBAL hMetaPict; // OUT: Handle to Metafile containing icon
  526. SIZEL sizel; // OUT: size of object/link in its source
  527. // may be 0,0 if different display
  528. // aspect is chosen.
  529. } OLEUIPASTESPECIALA, *POLEUIPASTESPECIALA, *LPOLEUIPASTESPECIALA;
  530. #ifdef UNICODE
  531. #define tagOLEUIPASTESPECIAL tagOLEUIPASTESPECIALW
  532. #define OLEUIPASTESPECIAL OLEUIPASTESPECIALW
  533. #define POLEUIPASTESPECIAL POLEUIPASTESPECIALW
  534. #define LPOLEUIPASTESPECIAL LPOLEUIPASTESPECIALW
  535. #else
  536. #define tagOLEUIPASTESPECIAL tagOLEUIPASTESPECIALA
  537. #define OLEUIPASTESPECIAL OLEUIPASTESPECIALA
  538. #define POLEUIPASTESPECIAL POLEUIPASTESPECIALA
  539. #define LPOLEUIPASTESPECIAL LPOLEUIPASTESPECIALA
  540. #endif
  541. STDAPI_(UINT) OleUIPasteSpecialW(LPOLEUIPASTESPECIALW);
  542. STDAPI_(UINT) OleUIPasteSpecialA(LPOLEUIPASTESPECIALA);
  543. #ifdef UNICODE
  544. #define OleUIPasteSpecial OleUIPasteSpecialW
  545. #else
  546. #define OleUIPasteSpecial OleUIPasteSpecialA
  547. #endif
  548. // Paste Special specific flags
  549. #define PSF_SHOWHELP 0x00000001L
  550. #define PSF_SELECTPASTE 0x00000002L
  551. #define PSF_SELECTPASTELINK 0x00000004L
  552. // NOTE: PSF_CHECKDISPLAYASICON is strictly an output flag.
  553. // It is ignored if set when calling OleUIPasteSpecial.
  554. #define PSF_CHECKDISPLAYASICON 0x00000008L
  555. #define PSF_DISABLEDISPLAYASICON 0x00000010L
  556. #define PSF_HIDECHANGEICON 0x00000020L
  557. #define PSF_STAYONCLIPBOARDCHANGE 0x00000040L
  558. #define PSF_NOREFRESHDATAOBJECT 0x00000080L
  559. // Paste Special specific error codes
  560. #define OLEUI_IOERR_SRCDATAOBJECTINVALID (OLEUI_ERR_STANDARDMAX+0)
  561. #define OLEUI_IOERR_ARRPASTEENTRIESINVALID (OLEUI_ERR_STANDARDMAX+1)
  562. #define OLEUI_IOERR_ARRLINKTYPESINVALID (OLEUI_ERR_STANDARDMAX+2)
  563. #define OLEUI_PSERR_CLIPBOARDCHANGED (OLEUI_ERR_STANDARDMAX+3)
  564. #define OLEUI_PSERR_GETCLIPBOARDFAILED (OLEUI_ERR_STANDARDMAX+4)
  565. /////////////////////////////////////////////////////////////////////////////
  566. // EDIT LINKS DIALOG
  567. // IOleUILinkContainer interface
  568. //
  569. // This interface must be implemented by container applications that
  570. // want to use the EditLinks dialog. the EditLinks dialog calls back
  571. // to the container app to perform the OLE functions to manipulate
  572. // the links within the container.
  573. #undef INTERFACE
  574. #define INTERFACE IOleUILinkContainerW
  575. DECLARE_INTERFACE_(IOleUILinkContainerW, IUnknown)
  576. {
  577. // *** IUnknown methods *** //
  578. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  579. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  580. STDMETHOD_(ULONG,Release) (THIS) PURE;
  581. // *** IOleUILinkContainer *** //
  582. STDMETHOD_(DWORD,GetNextLink) (THIS_ DWORD dwLink) PURE;
  583. STDMETHOD(SetLinkUpdateOptions) (THIS_ DWORD dwLink,
  584. DWORD dwUpdateOpt) PURE;
  585. STDMETHOD(GetLinkUpdateOptions) (THIS_ DWORD dwLink,
  586. DWORD FAR* lpdwUpdateOpt) PURE;
  587. STDMETHOD(SetLinkSource) (THIS_ DWORD dwLink, LPWSTR lpszDisplayName,
  588. ULONG lenFileName, ULONG FAR* pchEaten, BOOL fValidateSource) PURE;
  589. STDMETHOD(GetLinkSource) (THIS_ DWORD dwLink,
  590. LPWSTR FAR* lplpszDisplayName, ULONG FAR* lplenFileName,
  591. LPWSTR FAR* lplpszFullLinkType, LPWSTR FAR* lplpszShortLinkType,
  592. BOOL FAR* lpfSourceAvailable, BOOL FAR* lpfIsSelected) PURE;
  593. STDMETHOD(OpenLinkSource) (THIS_ DWORD dwLink) PURE;
  594. STDMETHOD(UpdateLink) (THIS_ DWORD dwLink,
  595. BOOL fErrorMessage, BOOL fReserved) PURE;
  596. STDMETHOD(CancelLink) (THIS_ DWORD dwLink) PURE;
  597. };
  598. typedef IOleUILinkContainerW FAR* LPOLEUILINKCONTAINERW;
  599. #undef INTERFACE
  600. #define INTERFACE IOleUILinkContainerA
  601. DECLARE_INTERFACE_(IOleUILinkContainerA, IUnknown)
  602. {
  603. // *** IUnknown methods *** //
  604. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  605. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  606. STDMETHOD_(ULONG,Release) (THIS) PURE;
  607. // *** IOleUILinkContainer *** //
  608. STDMETHOD_(DWORD,GetNextLink) (THIS_ DWORD dwLink) PURE;
  609. STDMETHOD(SetLinkUpdateOptions) (THIS_ DWORD dwLink,
  610. DWORD dwUpdateOpt) PURE;
  611. STDMETHOD(GetLinkUpdateOptions) (THIS_ DWORD dwLink,
  612. DWORD FAR* lpdwUpdateOpt) PURE;
  613. STDMETHOD(SetLinkSource) (THIS_ DWORD dwLink, LPSTR lpszDisplayName,
  614. ULONG lenFileName, ULONG FAR* pchEaten, BOOL fValidateSource) PURE;
  615. STDMETHOD(GetLinkSource) (THIS_ DWORD dwLink,
  616. LPSTR FAR* lplpszDisplayName, ULONG FAR* lplenFileName,
  617. LPSTR FAR* lplpszFullLinkType, LPSTR FAR* lplpszShortLinkType,
  618. BOOL FAR* lpfSourceAvailable, BOOL FAR* lpfIsSelected) PURE;
  619. STDMETHOD(OpenLinkSource) (THIS_ DWORD dwLink) PURE;
  620. STDMETHOD(UpdateLink) (THIS_ DWORD dwLink,
  621. BOOL fErrorMessage, BOOL fReserved) PURE;
  622. STDMETHOD(CancelLink) (THIS_ DWORD dwLink) PURE;
  623. };
  624. typedef IOleUILinkContainerA FAR* LPOLEUILINKCONTAINERA;
  625. #ifdef UNICODE
  626. #define IOleUILinkContainer IOleUILinkContainerW
  627. #define IOleUILinkContainerVtbl IOleUILinkContainerWVtbl
  628. #define LPOLEUILINKCONTAINER LPOLEUILINKCONTAINERW
  629. #else
  630. #define IOleUILinkContainer IOleUILinkContainerA
  631. #define IOleUILinkContainerVtbl IOleUILinkContainerAVtbl
  632. #define LPOLEUILINKCONTAINER LPOLEUILINKCONTAINERA
  633. #endif
  634. typedef struct tagOLEUIEDITLINKSW
  635. {
  636. // These IN fields are standard across all OLEUI dialog functions.
  637. DWORD cbStruct; // Structure Size
  638. DWORD dwFlags; // IN-OUT: Flags
  639. HWND hWndOwner; // Owning window
  640. LPCWSTR lpszCaption; // Dialog caption bar contents
  641. LPFNOLEUIHOOK lpfnHook; // Hook callback
  642. LPARAM lCustData; // Custom data to pass to hook
  643. HINSTANCE hInstance; // Instance for customized template name
  644. LPCWSTR lpszTemplate; // Customized template name
  645. HRSRC hResource; // Customized template handle
  646. // Specifics for OLEUIEDITLINKS.
  647. LPOLEUILINKCONTAINERW lpOleUILinkContainer; // IN: Interface to manipulate
  648. // links in the container
  649. } OLEUIEDITLINKSW, *POLEUIEDITLINKSW, *LPOLEUIEDITLINKSW;
  650. typedef struct tagOLEUIEDITLINKSA
  651. {
  652. // These IN fields are standard across all OLEUI dialog functions.
  653. DWORD cbStruct; // Structure Size
  654. DWORD dwFlags; // IN-OUT: Flags
  655. HWND hWndOwner; // Owning window
  656. LPCSTR lpszCaption; // Dialog caption bar contents
  657. LPFNOLEUIHOOK lpfnHook; // Hook callback
  658. LPARAM lCustData; // Custom data to pass to hook
  659. HINSTANCE hInstance; // Instance for customized template name
  660. LPCSTR lpszTemplate; // Customized template name
  661. HRSRC hResource; // Customized template handle
  662. // Specifics for OLEUIEDITLINKS.
  663. LPOLEUILINKCONTAINERA lpOleUILinkContainer; // IN: Interface to manipulate
  664. // links in the container
  665. } OLEUIEDITLINKSA, *POLEUIEDITLINKSA, *LPOLEUIEDITLINKSA;
  666. #ifdef UNICODE
  667. #define tagOLEUIEDITLINKS tagOLEUIEDITLINKSW
  668. #define OLEUIEDITLINKS OLEUIEDITLINKSW
  669. #define POLEUIEDITLINKS POLEUIEDITLINKSW
  670. #define LPOLEUIEDITLINKS LPOLEUIEDITLINKSW
  671. #else
  672. #define tagOLEUIEDITLINKS tagOLEUIEDITLINKSA
  673. #define OLEUIEDITLINKS OLEUIEDITLINKSA
  674. #define POLEUIEDITLINKS POLEUIEDITLINKSA
  675. #define LPOLEUIEDITLINKS LPOLEUIEDITLINKSA
  676. #endif
  677. #define OLEUI_ELERR_LINKCNTRNULL (OLEUI_ERR_STANDARDMAX+0)
  678. #define OLEUI_ELERR_LINKCNTRINVALID (OLEUI_ERR_STANDARDMAX+1)
  679. STDAPI_(UINT) OleUIEditLinksW(LPOLEUIEDITLINKSW);
  680. STDAPI_(UINT) OleUIEditLinksA(LPOLEUIEDITLINKSA);
  681. #ifdef UNICODE
  682. #define OleUIEditLinks OleUIEditLinksW
  683. #else
  684. #define OleUIEditLinks OleUIEditLinksA
  685. #endif
  686. // Edit Links flags
  687. #define ELF_SHOWHELP 0x00000001L
  688. #define ELF_DISABLEUPDATENOW 0x00000002L
  689. #define ELF_DISABLEOPENSOURCE 0x00000004L
  690. #define ELF_DISABLECHANGESOURCE 0x00000008L
  691. #define ELF_DISABLECANCELLINK 0x00000010L
  692. /////////////////////////////////////////////////////////////////////////////
  693. // CHANGE ICON DIALOG
  694. typedef struct tagOLEUICHANGEICONW
  695. {
  696. // These IN fields are standard across all OLEUI dialog functions.
  697. DWORD cbStruct; // Structure Size
  698. DWORD dwFlags; // IN-OUT: Flags
  699. HWND hWndOwner; // Owning window
  700. LPCWSTR lpszCaption; // Dialog caption bar contents
  701. LPFNOLEUIHOOK lpfnHook; // Hook callback
  702. LPARAM lCustData; // Custom data to pass to hook
  703. HINSTANCE hInstance; // Instance for customized template name
  704. LPCWSTR lpszTemplate; // Customized template name
  705. HRSRC hResource; // Customized template handle
  706. // Specifics for OLEUICHANGEICON.
  707. HGLOBAL hMetaPict; // IN-OUT: Current and final image.
  708. // Source of the icon is embedded in
  709. // the metafile itself.
  710. CLSID clsid; // IN: class used to get Default icon
  711. WCHAR szIconExe[MAX_PATH]; // IN: explicit icon source path
  712. int cchIconExe; // IN: number of characters in szIconExe
  713. } OLEUICHANGEICONW, *POLEUICHANGEICONW, *LPOLEUICHANGEICONW;
  714. typedef struct tagOLEUICHANGEICONA
  715. {
  716. // These IN fields are standard across all OLEUI dialog functions.
  717. DWORD cbStruct; // Structure Size
  718. DWORD dwFlags; // IN-OUT: Flags
  719. HWND hWndOwner; // Owning window
  720. LPCSTR lpszCaption; // Dialog caption bar contents
  721. LPFNOLEUIHOOK lpfnHook; // Hook callback
  722. LPARAM lCustData; // Custom data to pass to hook
  723. HINSTANCE hInstance; // Instance for customized template name
  724. LPCSTR lpszTemplate; // Customized template name
  725. HRSRC hResource; // Customized template handle
  726. // Specifics for OLEUICHANGEICON.
  727. HGLOBAL hMetaPict; // IN-OUT: Current and final image.
  728. // Source of the icon is embedded in
  729. // the metafile itself.
  730. CLSID clsid; // IN: class used to get Default icon
  731. CHAR szIconExe[MAX_PATH]; // IN: explicit icon source path
  732. int cchIconExe; // IN: number of characters in szIconExe
  733. } OLEUICHANGEICONA, *POLEUICHANGEICONA, *LPOLEUICHANGEICONA;
  734. STDAPI_(UINT) OleUIChangeIconW(LPOLEUICHANGEICONW);
  735. STDAPI_(UINT) OleUIChangeIconA(LPOLEUICHANGEICONA);
  736. #ifdef UNICODE
  737. #define tagOLEUICHANGEICON tagOLEUICHANGEICONW
  738. #define OLEUICHANGEICON OLEUICHANGEICONW
  739. #define POLEUICHANGEICON POLEUICHANGEICONW
  740. #define LPOLEUICHANGEICON LPOLEUICHANGEICONW
  741. #define OleUIChangeIcon OleUIChangeIconW
  742. #else
  743. #define tagOLEUICHANGEICON tagOLEUICHANGEICONA
  744. #define OLEUICHANGEICON OLEUICHANGEICONA
  745. #define POLEUICHANGEICON POLEUICHANGEICONA
  746. #define LPOLEUICHANGEICON LPOLEUICHANGEICONA
  747. #define OleUIChangeIcon OleUIChangeIconA
  748. #endif
  749. // Change Icon flags
  750. #define CIF_SHOWHELP 0x00000001L
  751. #define CIF_SELECTCURRENT 0x00000002L
  752. #define CIF_SELECTDEFAULT 0x00000004L
  753. #define CIF_SELECTFROMFILE 0x00000008L
  754. #define CIF_USEICONEXE 0x00000010L
  755. // Change Icon specific error codes
  756. #define OLEUI_CIERR_MUSTHAVECLSID (OLEUI_ERR_STANDARDMAX+0)
  757. #define OLEUI_CIERR_MUSTHAVECURRENTMETAFILE (OLEUI_ERR_STANDARDMAX+1)
  758. #define OLEUI_CIERR_SZICONEXEINVALID (OLEUI_ERR_STANDARDMAX+2)
  759. // Property used by ChangeIcon dialog to give its parent window access to
  760. // its hDlg. The PasteSpecial dialog may need to force the ChgIcon dialog
  761. // down if the clipboard contents change underneath it. if so it will send
  762. // a IDCANCEL command to the ChangeIcon dialog.
  763. #define PROP_HWND_CHGICONDLG TEXT("HWND_CIDLG")
  764. /////////////////////////////////////////////////////////////////////////////
  765. // CONVERT DIALOG
  766. typedef struct tagOLEUICONVERTW
  767. {
  768. // These IN fields are standard across all OLEUI dialog functions.
  769. DWORD cbStruct; // Structure Size
  770. DWORD dwFlags; // IN-OUT: Flags
  771. HWND hWndOwner; // Owning window
  772. LPCWSTR lpszCaption; // Dialog caption bar contents
  773. LPFNOLEUIHOOK lpfnHook; // Hook callback
  774. LPARAM lCustData; // Custom data to pass to hook
  775. HINSTANCE hInstance; // Instance for customized template name
  776. LPCWSTR lpszTemplate; // Customized template name
  777. HRSRC hResource; // Customized template handle
  778. // Specifics for OLEUICONVERT.
  779. CLSID clsid; // IN: Class ID sent in to dialog: IN only
  780. CLSID clsidConvertDefault; // IN: use as convert default: IN only
  781. CLSID clsidActivateDefault; // IN: use as activate default: IN only
  782. CLSID clsidNew; // OUT: Selected Class ID
  783. DWORD dvAspect; // IN-OUT: either DVASPECT_CONTENT or
  784. // DVASPECT_ICON
  785. WORD wFormat; // IN" Original data format
  786. BOOL fIsLinkedObject;// IN: true if object is linked
  787. HGLOBAL hMetaPict; // IN-OUT: metafile icon image
  788. LPWSTR lpszUserType; // IN-OUT: user type name of original class.
  789. // We'll do lookup if NULL.
  790. // This gets freed on exit.
  791. BOOL fObjectsIconChanged; // OUT: TRUE == ChangeIcon was called
  792. LPWSTR lpszDefLabel; //IN-OUT: default label to use for icon.
  793. // if NULL, the short user type name
  794. // will be used. if the object is a
  795. // link, the caller should pass the
  796. // DisplayName of the link source
  797. // This gets freed on exit.
  798. UINT cClsidExclude; //IN: No. of CLSIDs in lpClsidExclude
  799. LPCLSID lpClsidExclude; //IN: List of CLSIDs to exclude from list
  800. } OLEUICONVERTW, *POLEUICONVERTW, *LPOLEUICONVERTW;
  801. typedef struct tagOLEUICONVERTA
  802. {
  803. // These IN fields are standard across all OLEUI dialog functions.
  804. DWORD cbStruct; // Structure Size
  805. DWORD dwFlags; // IN-OUT: Flags
  806. HWND hWndOwner; // Owning window
  807. LPCSTR lpszCaption; // Dialog caption bar contents
  808. LPFNOLEUIHOOK lpfnHook; // Hook callback
  809. LPARAM lCustData; // Custom data to pass to hook
  810. HINSTANCE hInstance; // Instance for customized template name
  811. LPCSTR lpszTemplate; // Customized template name
  812. HRSRC hResource; // Customized template handle
  813. // Specifics for OLEUICONVERT.
  814. CLSID clsid; // IN: Class ID sent in to dialog: IN only
  815. CLSID clsidConvertDefault; // IN: use as convert default: IN only
  816. CLSID clsidActivateDefault; // IN: use as activate default: IN only
  817. CLSID clsidNew; // OUT: Selected Class ID
  818. DWORD dvAspect; // IN-OUT: either DVASPECT_CONTENT or
  819. // DVASPECT_ICON
  820. WORD wFormat; // IN" Original data format
  821. BOOL fIsLinkedObject;// IN: true if object is linked
  822. HGLOBAL hMetaPict; // IN-OUT: metafile icon image
  823. LPSTR lpszUserType; // IN-OUT: user type name of original class.
  824. // We'll do lookup if NULL.
  825. // This gets freed on exit.
  826. BOOL fObjectsIconChanged; // OUT: TRUE == ChangeIcon was called
  827. LPSTR lpszDefLabel; //IN-OUT: default label to use for icon.
  828. // if NULL, the short user type name
  829. // will be used. if the object is a
  830. // link, the caller should pass the
  831. // DisplayName of the link source
  832. // This gets freed on exit.
  833. UINT cClsidExclude; //IN: No. of CLSIDs in lpClsidExclude
  834. LPCLSID lpClsidExclude; //IN: List of CLSIDs to exclude from list
  835. } OLEUICONVERTA, *POLEUICONVERTA, *LPOLEUICONVERTA;
  836. STDAPI_(UINT) OleUIConvertW(LPOLEUICONVERTW);
  837. STDAPI_(UINT) OleUIConvertA(LPOLEUICONVERTA);
  838. #ifdef UNICODE
  839. #define tagOLEUICONVERT tagOLEUICONVERTW
  840. #define OLEUICONVERT OLEUICONVERTW
  841. #define POLEUICONVERT POLEUICONVERTW
  842. #define LPOLEUICONVERT LPOLEUICONVERTW
  843. #define OleUIConvert OleUIConvertW
  844. #else
  845. #define tagOLEUICONVERT tagOLEUICONVERTA
  846. #define OLEUICONVERT OLEUICONVERTA
  847. #define POLEUICONVERT POLEUICONVERTA
  848. #define LPOLEUICONVERT LPOLEUICONVERTA
  849. #define OleUIConvert OleUIConvertA
  850. #endif
  851. // Determine if there is at least one class that can Convert or ActivateAs
  852. // the given clsid.
  853. STDAPI_(BOOL) OleUICanConvertOrActivateAs(
  854. REFCLSID rClsid, BOOL fIsLinkedObject, WORD wFormat);
  855. // Convert Dialog flags
  856. #define CF_SHOWHELPBUTTON 0x00000001L
  857. #define CF_SETCONVERTDEFAULT 0x00000002L
  858. #define CF_SETACTIVATEDEFAULT 0x00000004L
  859. #define CF_SELECTCONVERTTO 0x00000008L
  860. #define CF_SELECTACTIVATEAS 0x00000010L
  861. #define CF_DISABLEDISPLAYASICON 0x00000020L
  862. #define CF_DISABLEACTIVATEAS 0x00000040L
  863. #define CF_HIDECHANGEICON 0x00000080L
  864. #define CF_CONVERTONLY 0x00000100L
  865. // Convert specific error codes
  866. #define OLEUI_CTERR_CLASSIDINVALID (OLEUI_ERR_STANDARDMAX+1)
  867. #define OLEUI_CTERR_DVASPECTINVALID (OLEUI_ERR_STANDARDMAX+2)
  868. #define OLEUI_CTERR_CBFORMATINVALID (OLEUI_ERR_STANDARDMAX+3)
  869. #define OLEUI_CTERR_HMETAPICTINVALID (OLEUI_ERR_STANDARDMAX+4)
  870. #define OLEUI_CTERR_STRINGINVALID (OLEUI_ERR_STANDARDMAX+5)
  871. /////////////////////////////////////////////////////////////////////////////
  872. // BUSY DIALOG
  873. typedef struct tagOLEUIBUSYW
  874. {
  875. // These IN fields are standard across all OLEUI dialog functions.
  876. DWORD cbStruct; // Structure Size
  877. DWORD dwFlags; // IN-OUT: see below
  878. HWND hWndOwner; // Owning window
  879. LPCWSTR lpszCaption; // Dialog caption bar contents
  880. LPFNOLEUIHOOK lpfnHook; // Hook callback
  881. LPARAM lCustData; // Custom data to pass to hook
  882. HINSTANCE hInstance; // Instance for customized template name
  883. LPCWSTR lpszTemplate; // Customized template name
  884. HRSRC hResource; // Customized template handle
  885. // Specifics for OLEUIBUSY.
  886. HTASK hTask; // IN: HTask which is blocking
  887. HWND * lphWndDialog; // OUT: Dialog's HWND is placed here
  888. } OLEUIBUSYW, *POLEUIBUSYW, *LPOLEUIBUSYW;
  889. typedef struct tagOLEUIBUSYA
  890. {
  891. // These IN fields are standard across all OLEUI dialog functions.
  892. DWORD cbStruct; // Structure Size
  893. DWORD dwFlags; // IN-OUT: see below
  894. HWND hWndOwner; // Owning window
  895. LPCSTR lpszCaption; // Dialog caption bar contents
  896. LPFNOLEUIHOOK lpfnHook; // Hook callback
  897. LPARAM lCustData; // Custom data to pass to hook
  898. HINSTANCE hInstance; // Instance for customized template name
  899. LPCSTR lpszTemplate; // Customized template name
  900. HRSRC hResource; // Customized template handle
  901. // Specifics for OLEUIBUSY.
  902. HTASK hTask; // IN: HTask which is blocking
  903. HWND * lphWndDialog; // OUT: Dialog's HWND is placed here
  904. } OLEUIBUSYA, *POLEUIBUSYA, *LPOLEUIBUSYA;
  905. STDAPI_(UINT) OleUIBusyW(LPOLEUIBUSYW);
  906. STDAPI_(UINT) OleUIBusyA(LPOLEUIBUSYA);
  907. #ifdef UNICODE
  908. #define tagOLEUIBUSY tagOLEUIBUSYW
  909. #define OLEUIBUSY OLEUIBUSYW
  910. #define POLEUIBUSY POLEUIBUSYW
  911. #define LPOLEUIBUSY LPOLEUIBUSYW
  912. #define OleUIBusy OleUIBusyW
  913. #else
  914. #define tagOLEUIBUSY tagOLEUIBUSYA
  915. #define OLEUIBUSY OLEUIBUSYA
  916. #define POLEUIBUSY POLEUIBUSYA
  917. #define LPOLEUIBUSY LPOLEUIBUSYA
  918. #define OleUIBusy OleUIBusyA
  919. #endif
  920. // Flags for the Busy dialog
  921. #define BZ_DISABLECANCELBUTTON 0x00000001L
  922. #define BZ_DISABLESWITCHTOBUTTON 0x00000002L
  923. #define BZ_DISABLERETRYBUTTON 0x00000004L
  924. #define BZ_NOTRESPONDINGDIALOG 0x00000008L
  925. // Busy specific error/return codes
  926. #define OLEUI_BZERR_HTASKINVALID (OLEUI_ERR_STANDARDMAX+0)
  927. #define OLEUI_BZ_SWITCHTOSELECTED (OLEUI_ERR_STANDARDMAX+1)
  928. #define OLEUI_BZ_RETRYSELECTED (OLEUI_ERR_STANDARDMAX+2)
  929. #define OLEUI_BZ_CALLUNBLOCKED (OLEUI_ERR_STANDARDMAX+3)
  930. /////////////////////////////////////////////////////////////////////////////
  931. // CHANGE SOURCE DIALOG
  932. // Data to and from the ChangeSource dialog hook
  933. typedef struct tagOLEUICHANGESOURCEW
  934. {
  935. // These IN fields are standard across all OLEUI dialog functions.
  936. DWORD cbStruct; // Structure Size
  937. DWORD dwFlags; // IN-OUT: Flags
  938. HWND hWndOwner; // Owning window
  939. LPCWSTR lpszCaption; // Dialog caption bar contents
  940. LPFNOLEUIHOOK lpfnHook; // Hook callback
  941. LPARAM lCustData; // Custom data to pass to hook
  942. HINSTANCE hInstance; // Instance for customized template name
  943. LPCWSTR lpszTemplate; // Customized template name
  944. HRSRC hResource; // Customized template handle
  945. // INTERNAL ONLY: do not modify these members
  946. OPENFILENAMEW* lpOFN; // pointer OPENFILENAME struct
  947. DWORD dwReserved1[4]; // (reserved for future use)
  948. // Specifics for OLEUICHANGESOURCE.
  949. LPOLEUILINKCONTAINERW lpOleUILinkContainer; // IN: used to validate link sources
  950. DWORD dwLink; // IN: magic# for lpOleUILinkContainer
  951. LPWSTR lpszDisplayName;// IN-OUT: complete source display name
  952. ULONG nFileLength; // IN-OUT: file moniker part of lpszDisplayName
  953. LPWSTR lpszFrom; // OUT: prefix of source changed from
  954. LPWSTR lpszTo; // OUT: prefix of source changed to
  955. } OLEUICHANGESOURCEW, *POLEUICHANGESOURCEW, *LPOLEUICHANGESOURCEW;
  956. typedef struct tagOLEUICHANGESOURCEA
  957. {
  958. // These IN fields are standard across all OLEUI dialog functions.
  959. DWORD cbStruct; // Structure Size
  960. DWORD dwFlags; // IN-OUT: Flags
  961. HWND hWndOwner; // Owning window
  962. LPCSTR lpszCaption; // Dialog caption bar contents
  963. LPFNOLEUIHOOK lpfnHook; // Hook callback
  964. LPARAM lCustData; // Custom data to pass to hook
  965. HINSTANCE hInstance; // Instance for customized template name
  966. LPCSTR lpszTemplate; // Customized template name
  967. HRSRC hResource; // Customized template handle
  968. // INTERNAL ONLY: do not modify these members
  969. OPENFILENAMEA* lpOFN; // pointer OPENFILENAME struct
  970. DWORD dwReserved1[4]; // (reserved for future use)
  971. // Specifics for OLEUICHANGESOURCE.
  972. LPOLEUILINKCONTAINERA lpOleUILinkContainer; // IN: used to validate link sources
  973. DWORD dwLink; // IN: magic# for lpOleUILinkContainer
  974. LPSTR lpszDisplayName;// IN-OUT: complete source display name
  975. ULONG nFileLength; // IN-OUT: file moniker part of lpszDisplayName
  976. LPSTR lpszFrom; // OUT: prefix of source changed from
  977. LPSTR lpszTo; // OUT: prefix of source changed to
  978. } OLEUICHANGESOURCEA, *POLEUICHANGESOURCEA, *LPOLEUICHANGESOURCEA;
  979. STDAPI_(UINT) OleUIChangeSourceW(LPOLEUICHANGESOURCEW);
  980. STDAPI_(UINT) OleUIChangeSourceA(LPOLEUICHANGESOURCEA);
  981. #ifdef UNICODE
  982. #define tagOLEUICHANGESOURCE tagOLEUICHANGESOURCEW
  983. #define OLEUICHANGESOURCE OLEUICHANGESOURCEW
  984. #define POLEUICHANGESOURCE POLEUICHANGESOURCEW
  985. #define LPOLEUICHANGESOURCE LPOLEUICHANGESOURCEW
  986. #define OleUIChangeSource OleUIChangeSourceW
  987. #else
  988. #define tagOLEUICHANGESOURCE tagOLEUICHANGESOURCEA
  989. #define OLEUICHANGESOURCE OLEUICHANGESOURCEA
  990. #define POLEUICHANGESOURCE POLEUICHANGESOURCEA
  991. #define LPOLEUICHANGESOURCE LPOLEUICHANGESOURCEA
  992. #define OleUIChangeSource OleUIChangeSourceA
  993. #endif
  994. // Change Source Dialog flags
  995. #define CSF_SHOWHELP 0x00000001L // IN: enable/show help button
  996. #define CSF_VALIDSOURCE 0x00000002L // OUT: link was validated
  997. #define CSF_ONLYGETSOURCE 0x00000004L // IN: disables validation of source
  998. #define CSF_EXPLORER 0x00000008L // IN: use new OFN_EXPLORER custom template behavior
  999. // Change Source Dialog errors
  1000. #define OLEUI_CSERR_LINKCNTRNULL (OLEUI_ERR_STANDARDMAX+0)
  1001. #define OLEUI_CSERR_LINKCNTRINVALID (OLEUI_ERR_STANDARDMAX+1)
  1002. #define OLEUI_CSERR_FROMNOTNULL (OLEUI_ERR_STANDARDMAX+2)
  1003. #define OLEUI_CSERR_TONOTNULL (OLEUI_ERR_STANDARDMAX+3)
  1004. #define OLEUI_CSERR_SOURCENULL (OLEUI_ERR_STANDARDMAX+4)
  1005. #define OLEUI_CSERR_SOURCEINVALID (OLEUI_ERR_STANDARDMAX+5)
  1006. #define OLEUI_CSERR_SOURCEPARSERROR (OLEUI_ERR_STANDARDMAX+6)
  1007. #define OLEUI_CSERR_SOURCEPARSEERROR (OLEUI_ERR_STANDARDMAX+6)
  1008. /////////////////////////////////////////////////////////////////////////////
  1009. // OBJECT PROPERTIES DIALOG
  1010. #undef INTERFACE
  1011. #define INTERFACE IOleUIObjInfoW
  1012. DECLARE_INTERFACE_(IOleUIObjInfoW, IUnknown)
  1013. {
  1014. // *** IUnknown methods *** //
  1015. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  1016. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1017. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1018. // *** extra for General Properties *** //
  1019. STDMETHOD(GetObjectInfo) (THIS_ DWORD dwObject,
  1020. DWORD FAR* lpdwObjSize, LPWSTR FAR* lplpszLabel,
  1021. LPWSTR FAR* lplpszType, LPWSTR FAR* lplpszShortType,
  1022. LPWSTR FAR* lplpszLocation) PURE;
  1023. STDMETHOD(GetConvertInfo) (THIS_ DWORD dwObject,
  1024. CLSID FAR* lpClassID, WORD FAR* lpwFormat,
  1025. CLSID FAR* lpConvertDefaultClassID,
  1026. LPCLSID FAR* lplpClsidExclude, UINT FAR* lpcClsidExclude) PURE;
  1027. STDMETHOD(ConvertObject) (THIS_ DWORD dwObject, REFCLSID clsidNew) PURE;
  1028. // *** extra for View Properties *** //
  1029. STDMETHOD(GetViewInfo) (THIS_ DWORD dwObject,
  1030. HGLOBAL FAR* phMetaPict, DWORD* pdvAspect, int* pnCurrentScale) PURE;
  1031. STDMETHOD(SetViewInfo) (THIS_ DWORD dwObject,
  1032. HGLOBAL hMetaPict, DWORD dvAspect,
  1033. int nCurrentScale, BOOL bRelativeToOrig) PURE;
  1034. };
  1035. typedef IOleUIObjInfoW FAR* LPOLEUIOBJINFOW;
  1036. #undef INTERFACE
  1037. #define INTERFACE IOleUIObjInfoA
  1038. DECLARE_INTERFACE_(IOleUIObjInfoA, IUnknown)
  1039. {
  1040. // *** IUnknown methods *** //
  1041. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  1042. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1043. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1044. // *** extra for General Properties *** //
  1045. STDMETHOD(GetObjectInfo) (THIS_ DWORD dwObject,
  1046. DWORD FAR* lpdwObjSize, LPSTR FAR* lplpszLabel,
  1047. LPSTR FAR* lplpszType, LPSTR FAR* lplpszShortType,
  1048. LPSTR FAR* lplpszLocation) PURE;
  1049. STDMETHOD(GetConvertInfo) (THIS_ DWORD dwObject,
  1050. CLSID FAR* lpClassID, WORD FAR* lpwFormat,
  1051. CLSID FAR* lpConvertDefaultClassID,
  1052. LPCLSID FAR* lplpClsidExclude, UINT FAR* lpcClsidExclude) PURE;
  1053. STDMETHOD(ConvertObject) (THIS_ DWORD dwObject, REFCLSID clsidNew) PURE;
  1054. // *** extra for View Properties *** //
  1055. STDMETHOD(GetViewInfo) (THIS_ DWORD dwObject,
  1056. HGLOBAL FAR* phMetaPict, DWORD* pdvAspect, int* pnCurrentScale) PURE;
  1057. STDMETHOD(SetViewInfo) (THIS_ DWORD dwObject,
  1058. HGLOBAL hMetaPict, DWORD dvAspect,
  1059. int nCurrentScale, BOOL bRelativeToOrig) PURE;
  1060. };
  1061. typedef IOleUIObjInfoA FAR* LPOLEUIOBJINFOA;
  1062. #ifdef UNICODE
  1063. #define IOleUIObjInfo IOleUIObjInfoW
  1064. #define IOleUIObjInfoVtbl IOleUIObjInfoWVtbl
  1065. #define LPOLEUIOBJINFO LPOLEUIOBJINFOW
  1066. #else
  1067. #define IOleUIObjInfo IOleUIObjInfoA
  1068. #define IOleUIObjInfoVtbl IOleUIObjInfoAVtbl
  1069. #define LPOLEUIOBJINFO LPOLEUIOBJINFOA
  1070. #endif
  1071. #undef INTERFACE
  1072. #define INTERFACE IOleUILinkInfoW
  1073. DECLARE_INTERFACE_(IOleUILinkInfoW, IOleUILinkContainerW)
  1074. {
  1075. // *** IUnknown methods *** //
  1076. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  1077. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1078. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1079. // *** IOleUILinkContainer *** //
  1080. STDMETHOD_(DWORD,GetNextLink) (THIS_ DWORD dwLink) PURE;
  1081. STDMETHOD(SetLinkUpdateOptions) (THIS_ DWORD dwLink,
  1082. DWORD dwUpdateOpt) PURE;
  1083. STDMETHOD(GetLinkUpdateOptions) (THIS_ DWORD dwLink,
  1084. DWORD FAR* lpdwUpdateOpt) PURE;
  1085. STDMETHOD(SetLinkSource) (THIS_ DWORD dwLink, LPWSTR lpszDisplayName,
  1086. ULONG lenFileName, ULONG FAR* pchEaten, BOOL fValidateSource) PURE;
  1087. STDMETHOD(GetLinkSource) (THIS_ DWORD dwLink,
  1088. LPWSTR FAR* lplpszDisplayName, ULONG FAR* lplenFileName,
  1089. LPWSTR FAR* lplpszFullLinkType, LPWSTR FAR* lplpszShortLinkType,
  1090. BOOL FAR* lpfSourceAvailable, BOOL FAR* lpfIsSelected) PURE;
  1091. STDMETHOD(OpenLinkSource) (THIS_ DWORD dwLink) PURE;
  1092. STDMETHOD(UpdateLink) (THIS_ DWORD dwLink,
  1093. BOOL fErrorMessage, BOOL fReserved) PURE;
  1094. STDMETHOD(CancelLink) (THIS_ DWORD dwLink) PURE;
  1095. // *** extra for Link Properties *** //
  1096. STDMETHOD(GetLastUpdate) (THIS_ DWORD dwLink,
  1097. FILETIME FAR* lpLastUpdate) PURE;
  1098. };
  1099. typedef IOleUILinkInfoW FAR* LPOLEUILINKINFOW;
  1100. #undef INTERFACE
  1101. #define INTERFACE IOleUILinkInfoA
  1102. DECLARE_INTERFACE_(IOleUILinkInfoA, IOleUILinkContainerA)
  1103. {
  1104. // *** IUnknown methods *** //
  1105. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  1106. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1107. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1108. // *** IOleUILinkContainer *** //
  1109. STDMETHOD_(DWORD,GetNextLink) (THIS_ DWORD dwLink) PURE;
  1110. STDMETHOD(SetLinkUpdateOptions) (THIS_ DWORD dwLink,
  1111. DWORD dwUpdateOpt) PURE;
  1112. STDMETHOD(GetLinkUpdateOptions) (THIS_ DWORD dwLink,
  1113. DWORD FAR* lpdwUpdateOpt) PURE;
  1114. STDMETHOD(SetLinkSource) (THIS_ DWORD dwLink, LPSTR lpszDisplayName,
  1115. ULONG lenFileName, ULONG FAR* pchEaten, BOOL fValidateSource) PURE;
  1116. STDMETHOD(GetLinkSource) (THIS_ DWORD dwLink,
  1117. LPSTR FAR* lplpszDisplayName, ULONG FAR* lplenFileName,
  1118. LPSTR FAR* lplpszFullLinkType, LPSTR FAR* lplpszShortLinkType,
  1119. BOOL FAR* lpfSourceAvailable, BOOL FAR* lpfIsSelected) PURE;
  1120. STDMETHOD(OpenLinkSource) (THIS_ DWORD dwLink) PURE;
  1121. STDMETHOD(UpdateLink) (THIS_ DWORD dwLink,
  1122. BOOL fErrorMessage, BOOL fReserved) PURE;
  1123. STDMETHOD(CancelLink) (THIS_ DWORD dwLink) PURE;
  1124. // *** extra for Link Properties *** //
  1125. STDMETHOD(GetLastUpdate) (THIS_ DWORD dwLink,
  1126. FILETIME FAR* lpLastUpdate) PURE;
  1127. };
  1128. typedef IOleUILinkInfoA FAR* LPOLEUILINKINFOA;
  1129. #ifdef UNICODE
  1130. #define IOleUILinkInfo IOleUILinkInfoW
  1131. #define IOleUILinkInfoVtbl IOleUILinkInfoWVtbl
  1132. #define LPOLEUILINKINFO LPOLEUILINKINFOW
  1133. #else
  1134. #define IOleUILinkInfo IOleUILinkInfoA
  1135. #define IOleUILinkInfoVtbl IOleUILinkInfoAVtbl
  1136. #define LPOLEUILINKINFO LPOLEUILINKINFOA
  1137. #endif
  1138. struct tagOLEUIOBJECTPROPSW;
  1139. struct tagOLEUIOBJECTPROPSA;
  1140. typedef struct tagOLEUIGNRLPROPSW
  1141. {
  1142. // These IN fields are standard across all OLEUI property pages.
  1143. DWORD cbStruct; // Structure Size
  1144. DWORD dwFlags; // IN-OUT: flags specific to general page
  1145. DWORD dwReserved1[2];
  1146. LPFNOLEUIHOOK lpfnHook; // Hook callback
  1147. LPARAM lCustData; // Custom data to pass to hook
  1148. DWORD dwReserved2[3];
  1149. struct tagOLEUIOBJECTPROPSW* lpOP; // (used internally)
  1150. } OLEUIGNRLPROPSW, *POLEUIGNRLPROPSW, FAR* LPOLEUIGNRLPROPSW;
  1151. typedef struct tagOLEUIGNRLPROPSA
  1152. {
  1153. // These IN fields are standard across all OLEUI property pages.
  1154. DWORD cbStruct; // Structure Size
  1155. DWORD dwFlags; // IN-OUT: flags specific to general page
  1156. DWORD dwReserved1[2];
  1157. LPFNOLEUIHOOK lpfnHook; // Hook callback
  1158. LPARAM lCustData; // Custom data to pass to hook
  1159. DWORD dwReserved2[3];
  1160. struct tagOLEUIOBJECTPROPSA* lpOP; // (used internally)
  1161. } OLEUIGNRLPROPSA, *POLEUIGNRLPROPSA, FAR* LPOLEUIGNRLPROPSA;
  1162. #ifdef UNICODE
  1163. #define tagOLEUIGNRLPROPS tagOLEUIGNRLPROPSW
  1164. #define OLEUIGNRLPROPS OLEUIGNRLPROPSW
  1165. #define POLEUIGNRLPROPS POLEUIGNRLPROPSW
  1166. #define LPOLEUIGNRLPROPS LPOLEUIGNRLPROPSW
  1167. #else
  1168. #define tagOLEUIGNRLPROPS tagOLEUIGNRLPROPSA
  1169. #define OLEUIGNRLPROPS OLEUIGNRLPROPSA
  1170. #define POLEUIGNRLPROPS POLEUIGNRLPROPSA
  1171. #define LPOLEUIGNRLPROPS LPOLEUIGNRLPROPSA
  1172. #endif
  1173. typedef struct tagOLEUIVIEWPROPSW
  1174. {
  1175. // These IN fields are standard across all OLEUI property pages.
  1176. DWORD cbStruct; // Structure Size
  1177. DWORD dwFlags; // IN-OUT: flags specific to view page
  1178. DWORD dwReserved1[2];
  1179. LPFNOLEUIHOOK lpfnHook; // Hook callback (not used in this dialog)
  1180. LPARAM lCustData; // Custom data to pass to hook
  1181. DWORD dwReserved2[3];
  1182. struct tagOLEUIOBJECTPROPSW* lpOP; // (used internally)
  1183. int nScaleMin; // scale range
  1184. int nScaleMax;
  1185. } OLEUIVIEWPROPSW, *POLEUIVIEWPROPSW, FAR* LPOLEUIVIEWPROPSW;
  1186. typedef struct tagOLEUIVIEWPROPSA
  1187. {
  1188. // These IN fields are standard across all OLEUI property pages.
  1189. DWORD cbStruct; // Structure Size
  1190. DWORD dwFlags; // IN-OUT: flags specific to view page
  1191. DWORD dwReserved1[2];
  1192. LPFNOLEUIHOOK lpfnHook; // Hook callback (not used in this dialog)
  1193. LPARAM lCustData; // Custom data to pass to hook
  1194. DWORD dwReserved2[3];
  1195. struct tagOLEUIOBJECTPROPSA* lpOP; // (used internally)
  1196. int nScaleMin; // scale range
  1197. int nScaleMax;
  1198. } OLEUIVIEWPROPSA, *POLEUIVIEWPROPSA, FAR* LPOLEUIVIEWPROPSA;
  1199. #ifdef UNICODE
  1200. #define tagOLEUIVIEWPROPS tagOLEUIVIEWPROPSW
  1201. #define OLEUIVIEWPROPS OLEUIVIEWPROPSW
  1202. #define POLEUIVIEWPROPS POLEUIVIEWPROPSW
  1203. #define LPOLEUIVIEWPROPS LPOLEUIVIEWPROPSW
  1204. #else
  1205. #define tagOLEUIVIEWPROPS tagOLEUIVIEWPROPSA
  1206. #define OLEUIVIEWPROPS OLEUIVIEWPROPSA
  1207. #define POLEUIVIEWPROPS POLEUIVIEWPROPSA
  1208. #define LPOLEUIVIEWPROPS LPOLEUIVIEWPROPSA
  1209. #endif
  1210. // Flags for OLEUIVIEWPROPS
  1211. #define VPF_SELECTRELATIVE 0x00000001L // IN: relative to orig
  1212. #define VPF_DISABLERELATIVE 0x00000002L // IN: disable relative to orig
  1213. #define VPF_DISABLESCALE 0x00000004L // IN: disable scale option
  1214. typedef struct tagOLEUILINKPROPSW
  1215. {
  1216. // These IN fields are standard across all OLEUI property pages.
  1217. DWORD cbStruct; // Structure Size
  1218. DWORD dwFlags; // IN-OUT: flags specific to links page
  1219. DWORD dwReserved1[2];
  1220. LPFNOLEUIHOOK lpfnHook; // Hook callback (not used in this dialog)
  1221. LPARAM lCustData; // Custom data to pass to hook
  1222. DWORD dwReserved2[3];
  1223. struct tagOLEUIOBJECTPROPSW* lpOP; // (used internally)
  1224. } OLEUILINKPROPSW, *POLEUILINKPROPSW, FAR* LPOLEUILINKPROPSW;
  1225. typedef struct tagOLEUILINKPROPSA
  1226. {
  1227. // These IN fields are standard across all OLEUI property pages.
  1228. DWORD cbStruct; // Structure Size
  1229. DWORD dwFlags; // IN-OUT: flags specific to links page
  1230. DWORD dwReserved1[2];
  1231. LPFNOLEUIHOOK lpfnHook; // Hook callback (not used in this dialog)
  1232. LPARAM lCustData; // Custom data to pass to hook
  1233. DWORD dwReserved2[3];
  1234. struct tagOLEUIOBJECTPROPSA* lpOP; // (used internally)
  1235. } OLEUILINKPROPSA, *POLEUILINKPROPSA, FAR* LPOLEUILINKPROPSA;
  1236. #ifdef UNICODE
  1237. #define tagOLEUILINKPROPS tagOLEUILINKPROPSW
  1238. #define OLEUILINKPROPS OLEUILINKPROPSW
  1239. #define POLEUILINKPROPS POLEUILINKPROPSW
  1240. #define LPOLEUILINKPROPS LPOLEUILINKPROPSW
  1241. #else
  1242. #define tagOLEUILINKPROPS tagOLEUILINKPROPSA
  1243. #define OLEUILINKPROPS OLEUILINKPROPSA
  1244. #define POLEUILINKPROPS POLEUILINKPROPSA
  1245. #define LPOLEUILINKPROPS LPOLEUILINKPROPSA
  1246. #endif
  1247. #if (WINVER >= 0x400)
  1248. // Under Windows 95 prsht.h is NOT a part of the normal Windows
  1249. // environment, so we explicitly include it here to be safe.
  1250. #include <prsht.h>
  1251. #ifndef PSM_SETFINISHTEXTA
  1252. // We are building under Windows 95.
  1253. //
  1254. // Under Windows 95 there are no wide-character definitions
  1255. // for the property sheet code.
  1256. //
  1257. // Since the UNICODE version of our API is not implemented on Windows 95,
  1258. // this only creates a semantic problem. The entry points will still
  1259. // look the same and the code will still work the same if we define
  1260. // LPPROPSHEETHEADERW to be the narrow version of the structure.
  1261. typedef struct _PROPSHEETHEADER FAR* LPPROPSHEETHEADERW;
  1262. typedef struct _PROPSHEETHEADER FAR* LPPROPSHEETHEADERA;
  1263. #else
  1264. // We are building under Windows NT.
  1265. // Go ahead and define LPPROPSHEETHEADERW as it should be defined!
  1266. typedef struct _PROPSHEETHEADERW FAR* LPPROPSHEETHEADERW;
  1267. typedef struct _PROPSHEETHEADERA FAR* LPPROPSHEETHEADERA;
  1268. #ifdef UNICODE
  1269. #define LPPROPSHEETHEADER LPPROPSHEETHEADERW
  1270. #else
  1271. #define LPPROPSHEETHEADER LPPROPSHEETHEADERA
  1272. #endif
  1273. #endif // PSM_SETFINISHTEXTA
  1274. #else // WINVER
  1275. // If WINVER < 0x400, then PROPSHEETHEADER stuff isn't defined.
  1276. // The user won't be able to use the prop-sheet code, so we just define the
  1277. // necessary structures to be void pointers to enable to header file to
  1278. // at least compile correctly.
  1279. typedef void FAR* LPPROPSHEETHEADERW;
  1280. typedef void FAR* LPPROPSHEETHEADERA;
  1281. #ifdef UNICODE
  1282. #define LPPROPSHEETHEADER LPPROPSHEETHEADERW
  1283. #else
  1284. #define LPPROPSHEETHEADER LPPROPSHEETHEADERA
  1285. #endif
  1286. #endif // WINVER
  1287. typedef struct tagOLEUIOBJECTPROPSW
  1288. {
  1289. // These IN fields are standard across all OLEUI property sheets.
  1290. DWORD cbStruct; // Structure Size
  1291. DWORD dwFlags; // IN-OUT: global flags for the sheet
  1292. // Standard PROPSHEETHEADER used for extensibility
  1293. LPPROPSHEETHEADERW lpPS; // IN: property sheet header
  1294. // Data which allows manipulation of the object
  1295. DWORD dwObject; // IN: identifier for the object
  1296. LPOLEUIOBJINFOW lpObjInfo; // IN: interface to manipulate object
  1297. // Data which allows manipulation of the link
  1298. DWORD dwLink; // IN: identifier for the link
  1299. LPOLEUILINKINFOW lpLinkInfo; // IN: interface to manipulate link
  1300. // Data specfic to each page
  1301. LPOLEUIGNRLPROPSW lpGP; // IN: general page
  1302. LPOLEUIVIEWPROPSW lpVP; // IN: view page
  1303. LPOLEUILINKPROPSW lpLP; // IN: link page
  1304. } OLEUIOBJECTPROPSW, *POLEUIOBJECTPROPSW, FAR* LPOLEUIOBJECTPROPSW;
  1305. typedef struct tagOLEUIOBJECTPROPSA
  1306. {
  1307. // These IN fields are standard across all OLEUI property sheets.
  1308. DWORD cbStruct; // Structure Size
  1309. DWORD dwFlags; // IN-OUT: global flags for the sheet
  1310. // Standard PROPSHEETHEADER used for extensibility
  1311. LPPROPSHEETHEADERA lpPS; // IN: property sheet header
  1312. // Data which allows manipulation of the object
  1313. DWORD dwObject; // IN: identifier for the object
  1314. LPOLEUIOBJINFOA lpObjInfo; // IN: interface to manipulate object
  1315. // Data which allows manipulation of the link
  1316. DWORD dwLink; // IN: identifier for the link
  1317. LPOLEUILINKINFOA lpLinkInfo; // IN: interface to manipulate link
  1318. // Data specfic to each page
  1319. LPOLEUIGNRLPROPSA lpGP; // IN: general page
  1320. LPOLEUIVIEWPROPSA lpVP; // IN: view page
  1321. LPOLEUILINKPROPSA lpLP; // IN: link page
  1322. } OLEUIOBJECTPROPSA, *POLEUIOBJECTPROPSA, FAR* LPOLEUIOBJECTPROPSA;
  1323. STDAPI_(UINT) OleUIObjectPropertiesW(LPOLEUIOBJECTPROPSW);
  1324. STDAPI_(UINT) OleUIObjectPropertiesA(LPOLEUIOBJECTPROPSA);
  1325. #ifdef UNICODE
  1326. #define tagOLEUIOBJECTPROPS tagOLEUIOBJECTPROPSW
  1327. #define OLEUIOBJECTPROPS OLEUIOBJECTPROPSW
  1328. #define POLEUIOBJECTPROPS POLEUIOBJECTPROPSW
  1329. #define LPOLEUIOBJECTPROPS LPOLEUIOBJECTPROPSW
  1330. #define OleUIObjectProperties OleUIObjectPropertiesW
  1331. #else
  1332. #define tagOLEUIOBJECTPROPS tagOLEUIOBJECTPROPSA
  1333. #define OLEUIOBJECTPROPS OLEUIOBJECTPROPSA
  1334. #define POLEUIOBJECTPROPS POLEUIOBJECTPROPSA
  1335. #define LPOLEUIOBJECTPROPS LPOLEUIOBJECTPROPSA
  1336. #define OleUIObjectProperties OleUIObjectPropertiesA
  1337. #endif
  1338. // Flags for OLEUIOBJECTPROPS
  1339. #define OPF_OBJECTISLINK 0x00000001L
  1340. #define OPF_NOFILLDEFAULT 0x00000002L
  1341. #define OPF_SHOWHELP 0x00000004L
  1342. #define OPF_DISABLECONVERT 0x00000008L
  1343. // Errors for OleUIObjectProperties
  1344. #define OLEUI_OPERR_SUBPROPNULL (OLEUI_ERR_STANDARDMAX+0)
  1345. #define OLEUI_OPERR_SUBPROPINVALID (OLEUI_ERR_STANDARDMAX+1)
  1346. #define OLEUI_OPERR_PROPSHEETNULL (OLEUI_ERR_STANDARDMAX+2)
  1347. #define OLEUI_OPERR_PROPSHEETINVALID (OLEUI_ERR_STANDARDMAX+3)
  1348. #define OLEUI_OPERR_SUPPROP (OLEUI_ERR_STANDARDMAX+4)
  1349. #define OLEUI_OPERR_PROPSINVALID (OLEUI_ERR_STANDARDMAX+5)
  1350. #define OLEUI_OPERR_PAGESINCORRECT (OLEUI_ERR_STANDARDMAX+6)
  1351. #define OLEUI_OPERR_INVALIDPAGES (OLEUI_ERR_STANDARDMAX+7)
  1352. #define OLEUI_OPERR_NOTSUPPORTED (OLEUI_ERR_STANDARDMAX+8)
  1353. #define OLEUI_OPERR_DLGPROCNOTNULL (OLEUI_ERR_STANDARDMAX+9)
  1354. #define OLEUI_OPERR_LPARAMNOTZERO (OLEUI_ERR_STANDARDMAX+10)
  1355. #define OLEUI_GPERR_STRINGINVALID (OLEUI_ERR_STANDARDMAX+11)
  1356. #define OLEUI_GPERR_CLASSIDINVALID (OLEUI_ERR_STANDARDMAX+12)
  1357. #define OLEUI_GPERR_LPCLSIDEXCLUDEINVALID (OLEUI_ERR_STANDARDMAX+13)
  1358. #define OLEUI_GPERR_CBFORMATINVALID (OLEUI_ERR_STANDARDMAX+14)
  1359. #define OLEUI_VPERR_METAPICTINVALID (OLEUI_ERR_STANDARDMAX+15)
  1360. #define OLEUI_VPERR_DVASPECTINVALID (OLEUI_ERR_STANDARDMAX+16)
  1361. #define OLEUI_LPERR_LINKCNTRNULL (OLEUI_ERR_STANDARDMAX+17)
  1362. #define OLEUI_LPERR_LINKCNTRINVALID (OLEUI_ERR_STANDARDMAX+18)
  1363. #define OLEUI_OPERR_PROPERTYSHEET (OLEUI_ERR_STANDARDMAX+19)
  1364. #define OLEUI_OPERR_OBJINFOINVALID (OLEUI_ERR_STANDARDMAX+20)
  1365. #define OLEUI_OPERR_LINKINFOINVALID (OLEUI_ERR_STANDARDMAX+21)
  1366. // wParam used by PSM_QUERYSIBLINGS
  1367. #define OLEUI_QUERY_GETCLASSID 0xFF00 // override class id for icon
  1368. #define OLEUI_QUERY_LINKBROKEN 0xFF01 // after link broken
  1369. /////////////////////////////////////////////////////////////////////////////
  1370. // PROMPT USER DIALOGS
  1371. int __cdecl OleUIPromptUserW(int nTemplate, HWND hwndParent, ...);
  1372. int __cdecl OleUIPromptUserA(int nTemplate, HWND hwndParent, ...);
  1373. #ifdef UNICODE
  1374. #define OleUIPromptUser OleUIPromptUserW
  1375. #else
  1376. #define OleUIPromptUser OleUIPromptUserA
  1377. #endif
  1378. STDAPI_(BOOL) OleUIUpdateLinksW(LPOLEUILINKCONTAINERW lpOleUILinkCntr,
  1379. HWND hwndParent, LPWSTR lpszTitle, int cLinks);
  1380. STDAPI_(BOOL) OleUIUpdateLinksA(LPOLEUILINKCONTAINERA lpOleUILinkCntr,
  1381. HWND hwndParent, LPSTR lpszTitle, int cLinks);
  1382. #ifdef UNICODE
  1383. #define OleUIUpdateLinks OleUIUpdateLinksW
  1384. #else
  1385. #define OleUIUpdateLinks OleUIUpdateLinksA
  1386. #endif
  1387. /////////////////////////////////////////////////////////////////////////////
  1388. #pragma pack(pop)
  1389. #ifdef __cplusplus
  1390. }
  1391. #endif
  1392. #endif // RC_INVOKED
  1393. #endif //_OLEDLG_H_
  1394. /////////////////////////////////////////////////////////////////////////////