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.

4076 lines
164 KiB

  1. /*++
  2. Copyright (c) 1990-1995 Microsoft Corporation
  3. Module Name:
  4. compstui.h
  5. Abstract:
  6. This module contains global header definition for the COMMON DRIVER UI
  7. Author:
  8. 19-Jun-1995 Mon 11:52:01 created -by- Daniel Chou (danielc)
  9. 17-Aug-1995 Thu 14:59:28 updated -by- Daniel Chou (danielc)
  10. Updated for the first draft.
  11. 23-Aug-1995 Wed 15:13:27 updated -by- Daniel Chou (danielc)
  12. Updated for second draft
  13. 29-Aug-1995 Tue 11:33:24 updated -by- Daniel Chou (danielc)
  14. Adding ExtChkBox for some TVOT_xxx type
  15. 31-Aug-1995 Thu 04:04:23 updated -by- Daniel Chou (danielc)
  16. Making UNICODE type
  17. 01-Sep-1995 Fri 17:29:18 updated -by- Daniel Chou (danielc)
  18. Change the API interface type, so that it can be dynamically called
  19. and generate the property pages to be merge with the shell
  20. 05-Sep-1995 Tue 11:52:43 updated -by- Daniel Chou (danielc)
  21. Rename to compspui.h and update the API entry structure
  22. 07-Sep-1995 Thu 14:46:55 updated -by- Daniel Chou (danielc)
  23. rename to compstui.h and update comments
  24. 07-Sep-1995 Thu 16:07:31 updated -by- Daniel Chou (danielc)
  25. Adding UNION type for pSel/Sel, pOldSel/OldSel
  26. 08-Sep-1995 Fri 09:23:38 updated -by- Daniel Chou (danielc)
  27. Remove TypeIdx from OPTITEM and use pOptType, and remove all
  28. pOptType passed in the CPSUICBPARAM and COMPROPSHEETUI structures
  29. 25-Sep-1995 Mon 19:39:45 updated -by- Daniel Chou (danielc)
  30. add other related stuff.
  31. 26-Sep-1995 Tue 11:02:26 updated -by- Daniel Chou (danielc)
  32. Add error codes for GETLASTERROR
  33. 27-Sep-1995 Wed 16:32:37 updated -by- Daniel Chou (danielc)
  34. Move hWndParent, pTitle, hInst and TitleIconID out from
  35. COMPROPSHEETUI to COMPROPSHEETUIHEADER.
  36. 28-Sep-1995 Thu 17:06:46 updated -by- Daniel Chou (danielc)
  37. Add hInstCaller to COMPROPSHEETUI and add _COMPSTUI_ and cplusplus
  38. stuff
  39. 28-Sep-1995 Thu 23:16:34 updated -by- Daniel Chou (danielc)
  40. change tick count for trackbar/scrollbar to multiply factor. and
  41. add the push button flag which can overwrite the update permission so
  42. it can let user view the current setting from push button's dialog
  43. display
  44. 07-Feb-1996 Wed 17:45:31 updated -by- Daniel Chou (danielc)
  45. Change the API CommonPropSheetUI to CommonPropertySheetUI so that it
  46. not using stack but message base, this way any caller can add/delete
  47. pages as they want without worry about how many pages been added from
  48. its children.
  49. 7:15 AM 2/14/2001 updated -by- Lazar Ivanov (LazarI)
  50. Making compstui fusion aware. Attaching a fusion activation context
  51. to the compstui handles and adding a new message for setting it called
  52. CPSFUNC_SET_FUSION_CONTEXT. when a page is about to be created/inserted and
  53. it doesn't specify an activation context in its PROPSHEETPAGE structure it
  54. will be created into the parent's page activation context. if the parent's
  55. activation context is not set then we look up the next parent and so on until
  56. the top level parent is reached or until we find a parent with an activation
  57. context properly set. if none of the parents have an activation context set,
  58. then we force the default (NULL) activation context prior creating the page.
  59. [Environment:]
  60. NT Windows - Common Property Sheet UI DLL.
  61. [Notes:]
  62. Revision History:
  63. --*/
  64. #ifndef _COMPSTUI_
  65. #define _COMPSTUI_
  66. #ifdef __cplusplus
  67. extern "C" {
  68. #endif
  69. #if (!defined(RC_INVOKED))
  70. //
  71. // For compilers that don't support nameless unions
  72. //
  73. #ifndef DUMMYUNIONNAME
  74. #ifdef NONAMELESSUNION
  75. #define DUMMYUNIONNAME u
  76. #define DUMMYUNIONNAME2 u2
  77. #define DUMMYUNIONNAME3 u3
  78. #define DUMMYUNIONNAME4 u4
  79. #else
  80. #define DUMMYUNIONNAME
  81. #define DUMMYUNIONNAME2
  82. #define DUMMYUNIONNAME3
  83. #define DUMMYUNIONNAME4
  84. #endif
  85. #endif
  86. //
  87. // Predefined ID for the TreeView Option Type
  88. //
  89. //
  90. #define TVOT_2STATES 0
  91. #define TVOT_3STATES 1
  92. #define TVOT_UDARROW 2
  93. #define TVOT_TRACKBAR 3
  94. #define TVOT_SCROLLBAR 4
  95. #define TVOT_LISTBOX 5
  96. #define TVOT_COMBOBOX 6
  97. #define TVOT_EDITBOX 7
  98. #define TVOT_PUSHBUTTON 8
  99. #define TVOT_CHKBOX 9
  100. #define TVOT_LAST TVOT_CHKBOX
  101. #define TVOT_NONE (TVOT_LAST + 1)
  102. //
  103. // Predefined ID for the TreeView Option Type
  104. //
  105. //
  106. // TVOT_2STATES:
  107. // Count = 2
  108. // pOptParam[0]=pointer to the State 1 OPTPARAM
  109. // pOptParam[1]=pointer to the State 2 OPTPARAM
  110. //
  111. // BegCtrlID = 2 States Group Box ID
  112. // BegCtrlID+1= 2 States static Text
  113. // BegCtrlID+2= state 1 Radio button ID
  114. // BegCtrlID+3= state 1 icon control ID
  115. // BegCtrlID+4= state 2 Radio button ID
  116. // BegCtrlID+5= state 2 icon control ID
  117. // BegCtrlID+6= Extended Check Box/Push Button control ID
  118. // BegCtrlID+7= Extended Check Box/Push Button Icon control ID
  119. //
  120. // * For TVOT_3STATES, TVOT_3STATES, each of OPTPARAM consisted
  121. //
  122. // Style =Ignored
  123. // pData =Pointer to the string to describe the state
  124. // IconID=Icons resource ID, or common UI standard icon ID
  125. // lParam=Ignored
  126. //
  127. // * OPTITEM's 'Sel' is the selection index range from 0 to 1
  128. // * On the non-treeview page, this must be a auto radio button
  129. //
  130. //
  131. // TVOT_3STATES:
  132. // Count = 3
  133. // pOptParam[0]=pointer to the State 1 OPTPARAM
  134. // pOptParam[1]=pointer to the State 2 OPTPARAM
  135. // pOptParam[2]=pointer to the State 3 OPTPARAM
  136. //
  137. // BegCtrlID = 3 States Group Box ID
  138. // BegCtrlID+1= 3 States static Text
  139. // BegCtrlID+2= state 1 Radio button ID
  140. // BegCtrlID+3= state 1 icon control ID
  141. // BegCtrlID+4= state 2 Radio button ID
  142. // BegCtrlID+5= state 2 icon control ID
  143. // BegCtrlID+6= state 3 Radio button ID
  144. // BegCtrlID+7= state 3 icon control ID
  145. // BegCtrlID+8= Extended Check Box/Push Button control ID
  146. // BegCtrlID+9= Extended Check Box/Push Button Icon control ID
  147. //
  148. // * For TVOT_2STATES, TVOT_3STATES, each of OPTPARAM consisted
  149. //
  150. // Style =Ignored
  151. // pData =Pointer to the string to describe the state
  152. // IconID=Icons resource ID, or common UI standard icon ID
  153. // lParam=Ignored
  154. //
  155. // * OPTITEM's 'Sel' is the selection index range from 0 to 1
  156. // * On the non-treeview page, this must be a auto radio button
  157. //
  158. // ** For TVOT_2STATES, TVOT_3STSATES the 'Sel' field in the OPTITEM has
  159. // following definitions
  160. //
  161. // State 1, Sel = 0
  162. // State 2, Sel = 1
  163. // State 3, Sel = 2
  164. //
  165. // for any selection which based on false/true, no/yes, off/ontrue/false,
  166. // none/select then state 1 (sel=0) must always be the NO, FALSE, OFF or
  167. // NONE type.
  168. //
  169. //
  170. // TVOT_UDARROW:
  171. // Count = 2
  172. // pOptParam[0]=Pointer to the text of postfix and ICONS
  173. // pOptParam[1]=Pointer to the help line text above the control and
  174. // IconID = (SHORT)Low range of the up-down control
  175. // lParam = (SHORT)High range of the up-down control
  176. //
  177. // * Low/High must in range of a 16-bit sign integer
  178. //
  179. // if pData pointed to no help text then common UI automatically
  180. // set the (# - #) as help line
  181. //
  182. // BegCtrlID = udarrow Group Box ID
  183. // BegCtrlID+1= udarrow title static title ID
  184. // BegCtrlID+2= udarrow's editbox ID
  185. // BegCtrlID+3= udarrow icon control ID
  186. // BegCtrlID+4= udarrow postfix static text ID
  187. // BegCtrlID+5= udarrow help static text ID
  188. // BegCtrlID+6= udarrow arrow ID
  189. // BegCtrlID+7= Extended Check Box/Push Button control ID
  190. // BegCtrlID+8= Extended Check Box/Push Button Icon control ID
  191. //
  192. // * OPTITEM's 'Sel' is the selection index between Low/High range
  193. // * Style field in the OPTPARAM is ignored
  194. //
  195. //
  196. // TVOT_TRACKBAR:
  197. // Count = 3
  198. // pOptParam[0]=Pointer to the text for the selection postfix and ICONS
  199. // pOptParam[1]=Pointer to the <Low Range Text> and
  200. // IconID = (SHORT)Low range of the trackbar control
  201. // lParam = (SHORT)High range of the trackbar control
  202. //
  203. // * Low/High must in range of a 16-bit sign integer
  204. //
  205. // pOptParam[2]=Pointer to the <High Range Text> and
  206. // IconID = 'Sel' multiply factor for display
  207. // lParam = Page Size (increment)
  208. //
  209. // if pData pointed to NULLt then common UI automatically
  210. // set the Low/High range.
  211. //
  212. // BegCtrlID = trackbar Group Box ID
  213. // BegCtrlID+1= trackbar static title ID
  214. // BegCtrlID+2= trackbar(horizontal) ID (static FRAME to define size)
  215. // BegCtrlID+3= trackbar icon control ID
  216. // BegCtrlID+4= trackbar low range text control ID
  217. // BegCtrlID+5= trackbar high range text control ID
  218. // BegCtrlID+6= trackbar postfix ID
  219. // BegCtrlID+7= Extended Check Box/Push Button control ID
  220. // BegCtrlID+8= Extended Check Box/Push Button Icon control ID
  221. //
  222. // * OPTITEM's 'Sel' is the selection index between Low/High range
  223. // * The multiply factor is used to multiply the current select with
  224. // this factor and display it. typically this is one
  225. // * the tick frequency is automatically to set to PageSize increment
  226. // * Style field in the OPTPARAM is ignored
  227. //
  228. //
  229. // TVOT_SCROLLBAR:
  230. // Count = 3
  231. // pOptParam[0]=Pointer to the text for the selection postfix and ICONS
  232. // pOptParam[1]=Pointer to the <Low Range Text> and
  233. // IconID = (SHORT)Low range of the scrollbar control
  234. // lParam = (SHORT)High range of the scroll control
  235. //
  236. // * Low/High must in range of a 16-bit sign integer
  237. //
  238. // pOptParam[2]=Pointer to the <High Range Text> and
  239. // IconID = 'Sel' multiply factor for display
  240. // lParam = Page Size (increment)
  241. //
  242. // if pData pointed to NULLt then common UI automatically
  243. // set the Low/High range.
  244. //
  245. //
  246. // BegCtrlID = scrollbar(horizontal) group box ID
  247. // BegCtrlID+1= scrollbar(horizontal) static text ID
  248. // BegCtrlID+2= scrollbar(horizontal) ID
  249. // BegCtrlID+3= scrollbar icon control ID
  250. // BegCtrlID+4= scrollbar low range text control ID
  251. // BegCtrlID+5= scrollbar high range text control ID
  252. // BegCtrlID+6= scrollbar postfix control ID
  253. // BegCtrlID+7= Extended Check Box/Push Button control ID
  254. // BegCtrlID+8= Extended Check Box/Push Button Icon control ID
  255. //
  256. // * OPTITEM's 'Sel' is the selection index between Low/High range
  257. // * The multiply factor is used to multiply the current select with
  258. // this factor and display it. typically this is one
  259. // * Style field in the OPTPARAM is ignored
  260. //
  261. //
  262. //
  263. // TVOT_LISTBOX:
  264. // TVOT_COMBOBOX:
  265. // Count = N
  266. // pOptParam[0]=pointer to the first OPTPARAM (pData=string pointer)
  267. // pOptParam[1]=pointer to the second OPTPARAM (pData=string pointer)
  268. // .
  269. // .
  270. // pOptParam[N-1]=pointer to the N item string
  271. //
  272. // BegCtrlID = Listbox/ComboBox group box ID
  273. // BegCtrlID+1= Listbox/ComboBox static title ID
  274. // BegCtrlID+2= Listbox/Combobox ID
  275. // BegCtrlID+3= Listbox/Combobox icon control ID
  276. // BegCtrlID+4= Extended Check Box/Push Button control ID
  277. // BegCtrlID+5= Extended Check Box/Push Button Icon control ID
  278. //
  279. // * for TVOT_LISTBOX, TVOT_COMBOBOX, the field used as
  280. //
  281. // Style =Ignored by the common UI
  282. // pData =Pointer to the name of item
  283. // IconID=Icon resource ID for the item
  284. // lParam=ignored by the common UI
  285. //
  286. // * Only SINGLE selection is supported, to do a multiple selction use
  287. // multiple OPTITEM and create a header for it
  288. //
  289. // * an OTLBCBS_SORT style can be specified in the OPTTYPE's LBCBStyle
  290. // field, and the listbox or combobox will be sorted according to the
  291. // item's string.
  292. //
  293. // * OPTITEM's 'Sel' is the selection index between Low/High range
  294. //
  295. // * for TVOT_LISTBOX, TVOT_COMBOBOX, when it get received the keyboard
  296. // focus then common UI will call callback function (only if
  297. // OPTIF_CALLBACK bit set) with reason of CPSUICB_REASON_LBCB_ACTIVE,
  298. // this give caller a chance to modify following structure flags/pdata
  299. // which associate with the current OPTITEM. The caller's callback
  300. // function can ONLY modify the flags/data specified here.
  301. //
  302. // OPTTYPE pointed by the pOptType from OPTITEM
  303. //
  304. // Style: OTS_LBCB_SORT
  305. // OTS_LBCB_INCL_ITEM_NONE
  306. //
  307. // OPTPARAMs pointed by the pOptParam from the OPTTYPE
  308. //
  309. // Flags: OPTPF_HIDE
  310. // OPTPF_DISABLED
  311. //
  312. // pData: change string name
  313. //
  314. //
  315. // * The TVOT_COMBOBOX typically only used in the tree-view if there is
  316. // only one selection available for that item, when there is only one
  317. // item then dropdown list will not enabled by the common UI
  318. //
  319. //
  320. //
  321. // TVOT_EDITBOX:
  322. // Count = 2
  323. // pOptParam[0]=Pointer to the text of postfix and ICONS
  324. // pOptParam[1]=Pointer to the help line text above the control and
  325. // IconID = Edit buffer sie in character pointed by pSel
  326. // this is including the NULL terminator.
  327. // lParam = ignored.
  328. //
  329. // BegCtrlID = editBox group Box ID
  330. // BegCtrlID+1= editBox static title ID
  331. // BegCtrlID+2= editbox ID
  332. // BegCtrlID+3= editbox icon control ID
  333. // BegCtrlID+4= editbox postfix ID
  334. // BegCtrlID+5= editbox help ID
  335. // BegCtrlID+6= Extended Check Box/Push Button control ID
  336. // BegCtrlID+7= Extended Check Box/Push Button Icon control ID
  337. //
  338. // * Style field is ignored
  339. //
  340. // * pSel in the OPTITEM is the pointer to the editing string, the pSel
  341. // must pointed to a buffer eqaul or larger than the count of the buffer
  342. // (pOptParam[1]->IconID) size
  343. //
  344. //
  345. // TVOT_PUSHBUTTON:
  346. // Count = 1
  347. //
  348. // BegCtrlID = push button group box ID
  349. // BegCtrlID+1= push button static text ID (Not used by common UI)
  350. // BegCtrlID+2= push button ID
  351. // BegCtrlID+3= push button icon control ID
  352. // BegCtrlID+4= Extended Check Box/Push Button control ID
  353. // BegCtrlID+5= Extended Check Box/Push Button Icon control ID
  354. //
  355. //
  356. // PUSHBUTTON_TYPE_xxx specified the action and content of pData in the
  357. // pOptParam[0] as describe in the following
  358. //
  359. // PUSHBUTTON_TYPE_DLGPROC
  360. //
  361. // This push button is designed to bring up caller's dialog box
  362. //
  363. // pOptParam[0].pData = Caller's DLGPROC
  364. // pOptParam[0].Style = PUSHBUTTON_TYPE_DLGPROC
  365. // pOptParam[0].IconID = Icon resource ID
  366. // pOptParam[0].lParam = Caller's DIALOG resource template ID
  367. // or handle to the DLGTEMPLATE depends
  368. // on the OPTPF_USE_HDLGTEMPLATE flag
  369. //
  370. //
  371. // The 'lParam' passed to the DLGPROC's WM_INITDIALOG is the
  372. // CPSUICBPARAM structure pointer, and the reason field is set
  373. // to CPSUICB_REASON_DLGPROC.
  374. //
  375. //
  376. // PUSHBUTTON_TYPE_CALLBACK
  377. //
  378. // This push button is designed to have caller process the item
  379. // which cannot accomplished with the dialog box along.
  380. //
  381. // pOptParam[0].pData = CPSUICALLBACK function pointer
  382. // pOptParam[0].Style = PUSHBUTTON_TYPE_CALLBACK
  383. // pOptParam[0].IconID = Icon resource ID
  384. // pOptParam[0].lParam = Not Used;
  385. //
  386. // Durning the callback the Reason field in CPSUICBPARAM will
  387. // set to CPSUICB_REASON_PUSHBUTTON.
  388. //
  389. // ** If pOptParam[0].pData callback function is NULL then common
  390. // UI will call the pfnCallBack pointer set in the
  391. // COMPROPSHEETUI structure if it is not NULL
  392. //
  393. // ** The callback function should put the result of the callback
  394. // in the pSel/Sel of OPTITEM associate with the push button
  395. //
  396. // PUSHBUTTON_TYPE_HTCLRADJ
  397. //
  398. // This push button is designed to bring up halftone color
  399. // adjustment dialog box.
  400. //
  401. // pOptParam[0].pData = pointer to COLORADJUSTMENT structure
  402. // pOptParam[0].Style = PUSHBUTTON_TYPE_HTCLRADJ
  403. // pOptParam[0].IconID = Icon resource ID
  404. // pOptParam[0].lParam = Not Used;
  405. //
  406. //
  407. // PUSHBUTTON_TYPE_HTSETUP
  408. //
  409. // This push button is designed to bring up device halftone
  410. // setup dialog box.
  411. //
  412. // pOptParam[0].pData = pointer to DEVHTADJDATA structure
  413. // pOptParam[0].Style = PUSHBUTTON_TYPE_HTSETUP
  414. // pOptParam[0].IconID = Icon resource ID
  415. // pOptParam[0].lParam = Not Used;
  416. //
  417. //
  418. // * 'Sel' field in the OPTITEM for the PUSHBUTTON is the last returned
  419. // LONG result from the called dialog box or funcitons. The result
  420. // only valid if OPTIF_CHANGEONCE flag is set. The common UI will set
  421. // OPTIF_CHANGEONCE if push button ever pushed.
  422. //
  423. // * Since common UI donot know the meaning of the return value and
  424. // content of the called parameter, it is up to the caller to use
  425. // callback function to determine the returned result.
  426. //
  427. // * When returned from the push button except push botton type
  428. // PUSHBUTTON_TYPE_CALLBACK common ui will call the callback function
  429. // if the OPTIF_CALLBACK flat is set. The callback reason is set to
  430. // CPSUICB_REASON_SEL_CHANGED.
  431. //
  432. // * If the passed in CPSUIF_UPDATE_PERMISSION Flags in the COMPROPSHEETUI
  433. // is clear then the callback function must ONLY display the dialog box
  434. // and not changed any OPTITEM data if OTS_PUSH_ENABLE_ALWAYS
  435. // flag is set in the OPTTYPE
  436. //
  437. //
  438. // TVOT_CHKBOX:
  439. // Count = 1
  440. //
  441. // pOptparam[0].Style = CHKBOXS_FALSE_TRUE False/True
  442. // CHKBOXS_NO_YES, No/YES
  443. // CHKBOXS_OFF_ON, Off/ON
  444. // CHKBOXS_FALSEPDATA False/pData
  445. // CHKBOXS_NO_PDATA No/pData
  446. // CHKBOXS_OFF_PDATA Off/pData
  447. // CHKBOXS_NONE_PDATA None/pData
  448. // pOptParam[0].pData = Only used if Style is CHKBOXS_NONE_PDATA
  449. // pOptParam[0].IconID = Icon resource ID
  450. // pOptParam[0].lParam = Ignored
  451. //
  452. //
  453. // BegCtrlID = check box group ID
  454. // BegCtrlID+1= Check Box static text (not used by common UI)
  455. // BegCtrlID+2= check box button ID
  456. // BegCtrlID+3= check box icon control ID
  457. // BegCtrlID+4= Extended Check Box/Push Button control ID
  458. // BegCtrlID+5= Extended Check Box/Push Button Icon control ID
  459. //
  460. //
  461. // * BegCtrlID only used if the OPTITEM/OPTTYPE is belong to the the DLGPAGE
  462. // which has non-common UI dialog box template (DlgTemplateID in the DLGPAGE
  463. // is not standard DP_STD_xxx common ui dialog box template). The common
  464. // UI used this ID to managed caller's dialog boxes item's selections and
  465. // initialization.
  466. //
  467. // * for each item, it has group box ID (BegCtrlID) and static text ctronl ID
  468. // (BegCtrlID + 1). The common UI will set the text in one of these two
  469. // control ID in followng seauence.
  470. //
  471. // 1) If group box control ID's window (BegCtrlID) is exist and the
  472. // OPTITEM's flag OPTIF_NO_GROUPBOX_NAME is not set then common UI will
  473. // set the pName from OPTITEM to the group box.
  474. //
  475. // 2) If the group box name is not set and static control ID's window
  476. // (BegCtrlID + 1) is exist then common UI will set the pName from
  477. // OPTITEM to the static text control.
  478. //
  479. // * for TVOT_TRACKBAR and TVOT_SCROLLBAR, if pName in the OPTITEM is set to
  480. // either group box or static text control then common UI will also append
  481. // the current selection position of trackbar or scroll bar to the pName.
  482. //
  483. // * If multiple OPTITEMs using the same POPTPARAM and need different
  484. // BegCtrlID for each control then then a separate OPTTYPE structure should
  485. // be generated but POPTPARAM pointed to the same OPTPARAM[]
  486. //
  487. // * If a BegCtrlID+N is not used then skip that ID in your dialog box
  488. // template
  489. //
  490. //
  491. #define CHKBOXS_FALSE_TRUE 0
  492. #define CHKBOXS_NO_YES 1
  493. #define CHKBOXS_OFF_ON 2
  494. #define CHKBOXS_FALSE_PDATA 3
  495. #define CHKBOXS_NO_PDATA 4
  496. #define CHKBOXS_OFF_PDATA 5
  497. #define CHKBOXS_NONE_PDATA 6
  498. #define PUSHBUTTON_TYPE_DLGPROC 0
  499. #define PUSHBUTTON_TYPE_CALLBACK 1
  500. #define PUSHBUTTON_TYPE_HTCLRADJ 2
  501. #define PUSHBUTTON_TYPE_HTSETUP 3
  502. #define MAX_RES_STR_CHARS 160
  503. //
  504. // Common Printer UI's LPTSTR
  505. //
  506. // All string pointer in common printer UI structures can be either a real
  507. // memory pointer or a string resource ID. These are applied to LPTSTR type.
  508. //
  509. // The LPTSTR is defined to identify that the pointer can be a real string
  510. // pointer or a resource ID (either common printer UI provided ID or caller's
  511. // own resource ID). common UI using following logic to get the final string.
  512. //
  513. // LPTSTR pData;
  514. //
  515. // if ((pData & ~(ULONG_PTR)0xFFFF) != 0) then pData is a NULL terminated
  516. // string pointer
  517. //
  518. // ELSE
  519. //
  520. // (pData & (ULONG_PTR)0xFFFF) = Resource ID
  521. //
  522. // if (Resource ID is within the common UI string resource ID range)
  523. // then it load the string from common UI DLL
  524. //
  525. // ELSE
  526. //
  527. // it load string from caller's resource
  528. //
  529. //
  530. // * You can use MAKEINTRESOURCE(StrResID) to set this field
  531. //
  532. // * The MAX characters loaded by the common UI from the resource is defined
  533. // as MAX_RES_STR_CHARS
  534. //
  535. // * You cannot use LPTSTR as resource ID for the TVOT_EDITBOX style's
  536. // pSel in the OPTITEM, this pointer must be a real buffer pointer
  537. //
  538. //
  539. //
  540. // ICONs
  541. //
  542. // Common UI using two types of Icons, One is 32x32 and the other is 16x16
  543. // plus if any monochrome icon with 32x32 and 16x16 sizes.
  544. //
  545. // The 16x16 icon when displayed on the screen is using 16x17 pixel space,
  546. // this is ensure that downware adjacent icon is not crowded together.
  547. //
  548. // In common UI, if you need to passed a ICON ID, it can either passed a
  549. // common UI's predefined ID or caller's own ICON resource ID.
  550. //
  551. //
  552. // * You can use to imagedit or any other Window icon editor to create the
  553. // icon, each icon file should have one unique icon resource ID which is
  554. // not overlay with the standard common UI IDI_CPSUI_xxx identifier. For
  555. // each icon file, its should have both 32x32 and 16x16 size icon on
  556. // different display. (ie. monochrome).
  557. //
  558. // Common UI will try to load the correct size of icon from the icon
  559. // resource, but it will stretch them if the size is not found.
  560. //
  561. //
  562. //
  563. // Flags for the OPTTYPE
  564. //
  565. //
  566. #define OPTPF_HIDE 0x01
  567. #define OPTPF_DISABLED 0x02
  568. #define OPTPF_ICONID_AS_HICON 0x04
  569. #define OPTPF_OVERLAY_WARNING_ICON 0x08
  570. #define OPTPF_OVERLAY_STOP_ICON 0x10
  571. #define OPTPF_OVERLAY_NO_ICON 0x20
  572. #define OPTPF_USE_HDLGTEMPLATE 0x40
  573. typedef struct _OPTPARAM {
  574. WORD cbSize; // size of this structure
  575. BYTE Flags; // OPTPF_xxxx flags
  576. BYTE Style; // style use in this structure
  577. LPTSTR pData; // pointer to the data
  578. ULONG_PTR IconID; // iconID;
  579. LPARAM lParam; // parameter used
  580. ULONG_PTR dwReserved[2]; // reserved dword, must be 0
  581. } OPTPARAM, *POPTPARAM;
  582. //
  583. // OPTPARAM
  584. //
  585. // The OPTPARAM structure is used to describe each slectable item in the
  586. // common UI such as 'letter', 'legal' in the form slection list box
  587. //
  588. // cbSize - size of this structure
  589. //
  590. // Flags - defined as OPTPF_xxxx
  591. //
  592. // OPTPF_HIDE
  593. //
  594. // Specified hide this listed selection item and not
  595. // availabe for user to select. This only available to
  596. // following TVOT_xxx types
  597. //
  598. // TVOT_3STATES
  599. // TVOT_LISTBOX
  600. // TVOT_COMBOBOX
  601. //
  602. // If all the seclection items are OPTPF_HIDE then the
  603. // OPTITEM is automatically hided by the common UI, if
  604. // TVOT_3STATES has 2 states hide then an error is
  605. // returned
  606. //
  607. //
  608. // OPTPF_DISABLED
  609. //
  610. // Specified this listed selection item is disabled and
  611. // not availabe for user to select. This only available
  612. // to following TVOT_xxx types
  613. //
  614. // TVOT_2STATES
  615. // TVOT_3STATES
  616. // TVOT_LISTBOX
  617. // TVOT_COMBOBOX
  618. //
  619. //
  620. // OPTPF_ICONID_AS_HICON
  621. //
  622. // If this flag is set then IconID DWORD field is treated
  623. // as a handle to the icon rather then the resource ID
  624. //
  625. //
  626. // OPTPF_OVERLAY_WARNING_ICON
  627. //
  628. // If this bit is set then this OPTPARAM item's icon will
  629. // be overlaied by a common UI's IDI_CPSUI_WARNING icon.
  630. //
  631. //
  632. // OPTPF_OVERLAY_STOP_ICON
  633. //
  634. // If this bit is set then this OPTPARAM item's icon will
  635. // be overlaied by a common UI's IDI_CPSUI_STOP icon.
  636. //
  637. //
  638. // OPTPF_OVERLAY_NO_ICON
  639. //
  640. // If this bit is set then this OPTPARAM item's icon will
  641. // be overlaied by a common UI's IDI_CPSUI_NO icon.
  642. //
  643. //
  644. // Style - Style for the OPTPARAM, it depends on the TVOT_xxx type as
  645. // describe below
  646. //
  647. // TVOT_PUSBUTTON
  648. //
  649. // it can be one of PUSHBUTTON_TYPE_xxxx.
  650. //
  651. // other TVOT_xxxx
  652. //
  653. // this fields is not used.
  654. //
  655. //
  656. // pData - Is either a pointer to the item name (string) or it is
  657. // used to describe other data.
  658. //
  659. // * If the pData in the OPTPARAM is supposed to be a static
  660. // pointer to a string and the string is a common UI
  661. // standard resource ID then common UI will check if pData
  662. // is equal to IDS_CPSUI_NOTINSTALLED, if true then
  663. // common UI will overaly a not installed icon on top of
  664. // the OPTPARAM's Icon. This will not applied to the
  665. // TVOT_EDITBOX type since the pData is not a static text
  666. // pointer or a string resource ID.
  667. //
  668. // ** See LPTSTR description above
  669. //
  670. // IconID - This is the icon identifier, which can be a common strandard
  671. // IDI_CPSUI_xxx icon ID, caller's own icon resource ID, or a
  672. // handle to the caller defined icon if OPTPF_ICONID_AS_HICON
  673. // flag is set, in any case if the IconID is zero then it
  674. // indicated no icon.
  675. //
  676. // lParam - Extra data used by the OPTPARAM, it depends on the TVOT_xxx
  677. // type.
  678. //
  679. // dwReserved[]- Reserved DWORDs, must be 0
  680. //
  681. //
  682. #define OPTTF_TYPE_DISABLED 0x01
  683. #define OPTTF_NOSPACE_BEFORE_POSTFIX 0x02
  684. #define OTS_LBCB_SORT 0x0001
  685. #define OTS_LBCB_PROPPAGE_LBUSECB 0x0002
  686. #define OTS_LBCB_PROPPAGE_CBUSELB 0x0004
  687. #define OTS_LBCB_INCL_ITEM_NONE 0x0008
  688. #define OTS_LBCB_NO_ICON16_IN_ITEM 0x0010
  689. #define OTS_PUSH_INCL_SETUP_TITLE 0x0020
  690. #define OTS_PUSH_NO_DOT_DOT_DOT 0x0040
  691. #define OTS_PUSH_ENABLE_ALWAYS 0x0080
  692. typedef struct _OPTTYPE {
  693. WORD cbSize;
  694. BYTE Type; // TVOT_xxxx type of OPTIONS
  695. BYTE Flags; // OPTTF_xxx flags
  696. WORD Count; // Count of pOptParam passed
  697. WORD BegCtrlID; // start of item's group window ID
  698. POPTPARAM pOptParam; // pointer to the OPTPARAM
  699. WORD Style; // option type style as OTS_xxxx
  700. WORD wReserved[3]; // wReserved, must be 0
  701. ULONG_PTR dwReserved[3]; // DWORD reserved field (must be 0)
  702. } OPTTYPE, *POPTTYPE;
  703. //
  704. // OPTTYPE
  705. //
  706. // The OPTTYPE structure is used to describe a set of selection and its
  707. // select method, such as Form/Tray assignment. It has a pointer to a set
  708. // of selection item (OPTPARAM)
  709. //
  710. //
  711. // cbSize - size of this structure
  712. //
  713. // Type - Specified the option type using predefined ID as TVOT_xxxx
  714. //
  715. // Flags - currently only one flag is defined
  716. //
  717. //
  718. // OPTTF_TYPE_DISABLED
  719. //
  720. // The whole OPTTYPE's OPTPARAMs are disabled, and non of
  721. // the selection in the OPTTYPE can be selected
  722. //
  723. //
  724. // OPTTF_NOSPACE_BEFORE_POSTFIX
  725. //
  726. // This bit only valid if the OPTTYPE's pOptParam item
  727. // specified a postfix string as describe in the above
  728. // section. If this flag is set then it asked common UI
  729. // do not add a space character before the postfix string
  730. // when it combine the pName in the OPTITEM and postfix
  731. // string. Typeically this bit is not set for the
  732. // postfix string, but sometime it may be required not to
  733. // add a space character in front of it, such as '%'
  734. // postfix string.
  735. //
  736. //
  737. // Count - Count of item pointed by pOptParam. Some predefined number
  738. // must be set according to the TVOT_XXX description.
  739. //
  740. // BegCtrlID - Only used if the OPTITEM/OPTTYPE is belong to the the DLGPAGE
  741. // which has non-common UI dialog box template (DlgTemplateID
  742. // in the DLGPAGE is not standard DP_STD_xxx common ui dialog
  743. // box template). The common UI used this ID to managed
  744. // caller's dialog boxes item's selections and initialization.
  745. //
  746. // Each OPTITEM has predefined number of window ID which
  747. // associated with that item, the BegCtrlID specified the start
  748. // control window ID. Each control window ID in the OPTITEM
  749. // must have the control ID sequence as describe in the TVOT_xxx
  750. // above.
  751. //
  752. // pOptParam - Pointer to array of OPTPARAM to describe each selectable item
  753. //
  754. // Style - Specified the style of type of control box, certain style
  755. // only apply to centain type of TVOT_xxxx.
  756. //
  757. // OTS_LBCB_xxx only applied to TVOT_LISTBOX, TVOT_COMBOBOX
  758. // OTS_PUSH_xxx only applied to TVOT_PUSHBUTTON
  759. //
  760. //
  761. // OTS_LBCB_SORT
  762. //
  763. // Specified that the listbox or combobox item is sorted
  764. // in ascending order based on the pData string
  765. //
  766. //
  767. // OTS_LBCB_PROPAGE_LBUSECB
  768. //
  769. // Used when Type is TVOT_LISTBOX, if it specified and
  770. // this OPTTYPE also on the non-treeview user defined
  771. // property sheet page dialog then common UI assume
  772. // control is comobobox instead of listbox on the non-
  773. // treeview page
  774. //
  775. //
  776. // OTS_LBCB_PROPAGE_CBUSELB
  777. //
  778. // Used when Type is TVOT_COMBOBOX, if it specified and
  779. // this OPTTYPE also on the non-treeview user defined
  780. // property sheet page dialog then common UI assume
  781. // control is listbox instead of combobox on the non-
  782. // treeview page
  783. //
  784. //
  785. // OTS_LBCB_INCL_ITEM_NONE
  786. //
  787. // when this flag is specified, the common ui will
  788. // automatically add a 'None' selection to the listbox or
  789. // combobox. The 'Sel' will set to -1 if 'none' is
  790. // selection is selected by the user. It will also
  791. // validate the 'Sel' durning the initialization, any
  792. // out of range value will be set to -1 (None).
  793. //
  794. //
  795. // OTS_LBCB_NO_ICON16_IN_ITEM
  796. //
  797. // By default, each listbox, combox will have a small
  798. // icon (16x16) in front of item text. by specified this
  799. // bit, the listbox/combobox will not includes icons
  800. // in the listbox/combobox.
  801. //
  802. // If clear then it specified that in the listbox/combobox
  803. // to have 16x16 Icon added to the front of each item
  804. //
  805. //
  806. // OTS_PUSH_INCL_SETUP_TITLE
  807. //
  808. // If specified for the push button then it automatically
  809. // add the 'Setup' to the end of push botton text.
  810. //
  811. //
  812. // OTS_PUSH_NO_DOT_DOT_DOT
  813. //
  814. // If specified then common UI will not add '...' to the
  815. // end of the pName in the OPTITEM and push button name
  816. //
  817. //
  818. // OTS_PUSH_ENABLE_ALWAYS
  819. //
  820. // This flag specified that even update permissio is not
  821. // allowed, it still let user push the push button, if
  822. // this flag is set then callback function or dialog box
  823. // proc must disable all the control which let user
  824. // modified the content, but just let user view the
  825. // current setting.
  826. //
  827. //
  828. // wReserved[] - Reserved fields, must be 0
  829. //
  830. // dwReserved[]- Reserved fields, must be 0
  831. //
  832. //
  833. //
  834. // Following are flags for the EXTPUSH
  835. //
  836. #define EPF_PUSH_TYPE_DLGPROC 0x0001
  837. #define EPF_INCL_SETUP_TITLE 0x0002
  838. #define EPF_NO_DOT_DOT_DOT 0x0004
  839. #define EPF_ICONID_AS_HICON 0x0008
  840. #define EPF_OVERLAY_WARNING_ICON 0x0010
  841. #define EPF_OVERLAY_STOP_ICON 0x0020
  842. #define EPF_OVERLAY_NO_ICON 0x0040
  843. #define EPF_USE_HDLGTEMPLATE 0x0080
  844. typedef struct _EXTPUSH {
  845. WORD cbSize; // size of the structure
  846. WORD Flags; // EPCBF_xxx flags
  847. LPTSTR pTitle; // extended push botton title
  848. union {
  849. DLGPROC DlgProc; // pointer to the dialog box proc
  850. FARPROC pfnCallBack; // callback function pointer
  851. } DUMMYUNIONNAME;
  852. ULONG_PTR IconID; // icon to be used
  853. union {
  854. WORD DlgTemplateID; // dialog box template ID
  855. HANDLE hDlgTemplate; // handle to the dialog template
  856. } DUMMYUNIONNAME;
  857. ULONG_PTR dwReserved[3]; // reserved field, must be 0
  858. } EXTPUSH, *PEXTPUSH;
  859. //
  860. // EXTPUSH structure is used to describe the extened push button available
  861. // on OPTITEM/OPTITEM, each OPTTYPE can optional have either one extended check
  862. // box or one extended push button callback.
  863. //
  864. //
  865. // cbSize - size of this structure
  866. //
  867. // Flags - flags for the EXTPUSH as EPF_xxxx
  868. //
  869. // EPF_PUSH_TYPE_DLGPROC
  870. //
  871. // If this bit is set then it specified the extended
  872. // push button is type of DLGPROC and DlgProc and
  873. // DlgTemplateID is valid for common UI to call.
  874. //
  875. // If this bit is clear then it specfied the extended
  876. // push button is the callback style and pfnCallBack
  877. // should be called by the common UI
  878. //
  879. //
  880. // EPF_INCL_SETUP_TITLE
  881. //
  882. // If specified for the extended push button then it
  883. // automatically add the 'Setup' to the end of
  884. // extended push button's title
  885. //
  886. //
  887. // EPF_NO_DOT_DOT_DOT
  888. //
  889. // If specified then common UI will not add '...' to
  890. // the end of the pTitle in the EXTPUSH.
  891. //
  892. //
  893. // EPF_ICONID_AS_HICON
  894. //
  895. // If this flag is set then IconID DWORD field is
  896. // treated as a handle to the icon rather then the
  897. // resource ID.
  898. //
  899. //
  900. // EPF_OVERLAY_WARNING_ICON
  901. //
  902. // If this bit is set then this EXTPUSH's icon will be
  903. // overlaied by a common UI's IDI_CPSUI_WARNING icon.
  904. //
  905. //
  906. // EPF_OVERLAY_STOP_ICON
  907. //
  908. // If this bit is set then this EXTPUSH's icon will be
  909. // overlaied by a common UI's IDI_CPSUI_STOP icon.
  910. //
  911. //
  912. // EPF_OVERLAY_NO_ICON
  913. //
  914. // If this bit is set then this EXTPUSH's icon will be
  915. // overlaied by a common UI's IDI_CPSUI_NO icon.
  916. //
  917. //
  918. // pTitle - Pointed to extended push botton title
  919. //
  920. // ** See LPTSTR description above
  921. //
  922. // DlgProc - Pointer to the DLGPROC function supplied by the caller.
  923. // When user push the button the common UI will call
  924. // DialogBoxParam() with this fucction pointer and passed
  925. // CPSUICBPARAM structure pointer to the WM_INITDIALOG with
  926. // the Reason set to CPSUICB_REASON_EXTPUSH. If this
  927. // filed is NULL then common UI assumed that EXTPUSH is
  928. // disabled (OPTIF_EXT_DISABLED | OPTIF_EXT_HIDE), this
  929. // fields only used if EPF_PUSH_TYPE_DLGPROC flag is set
  930. //
  931. // pfnCallBack - Pointer to CPSUICALLBACK function, this only used if
  932. // EPF_PUSH_TYPE_DLGPROC bit is clear, duringing callback
  933. // it passed the CPSUICBPARAM pointer as parameter
  934. //
  935. // IconID - This is the icon identifier, which can be a common
  936. // strandard IDI_CPSUI_xxx icon ID, caller's own icon
  937. // resource ID, or a handle to the caller defined icon if
  938. // EPF_ICONID_AS_HICON flag is set, in any case if the
  939. // IconID is zero then it indicated no icon.
  940. //
  941. // DlgTemplateID - Specified the ressource ID for the dilaog box. If the
  942. // DlgTemplateID = 0 then common UI will call the DlgProc
  943. // with following parameter.
  944. //
  945. // DlgProc(hDlg, WM_USER, NULL, (LPARAM)pCPSUICBPaam);
  946. //
  947. // hDlgTemplate - Handle to the DLGTEMPLATE which will be use for pop up
  948. // dialog box
  949. //
  950. // wReserved[] - WORD reserved field, must be 0
  951. //
  952. // dwReserved[] - DWORD reserved field, must be 0
  953. //
  954. //
  955. //
  956. //
  957. // Following are flags for the EXTCHKBOX
  958. //
  959. #define ECBF_CHECKNAME_AT_FRONT 0x0001
  960. #define ECBF_CHECKNAME_ONLY_ENABLED 0x0002
  961. #define ECBF_ICONID_AS_HICON 0x0004
  962. #define ECBF_OVERLAY_WARNING_ICON 0x0008
  963. #define ECBF_OVERLAY_ECBICON_IF_CHECKED 0x0010
  964. #define ECBF_OVERLAY_STOP_ICON 0x0020
  965. #define ECBF_OVERLAY_NO_ICON 0x0040
  966. #define ECBF_CHECKNAME_ONLY 0x0080
  967. typedef struct _EXTCHKBOX {
  968. WORD cbSize; // size of the structure
  969. WORD Flags; // ECBF_xxx flags
  970. LPTSTR pTitle; // extended checkbox title
  971. LPTSTR pSeparator; // pointer to separator string for treeview
  972. LPTSTR pCheckedName; // string to be displayed when checked
  973. ULONG_PTR IconID; // icon to be used
  974. WORD wReserved[4]; // reserved word, must be 0
  975. ULONG_PTR dwReserved[2]; // reserved field, must be 0
  976. } EXTCHKBOX, *PEXTCHKBOX;
  977. //
  978. // EXTCHKBOX structure is used to describe the extened check box available on
  979. // OPTITEM/OPTITEM, each OPTTYPE can optional have one extended check box.
  980. // When using EXTCHKBOX the selection item can be checked or not checked
  981. // based on user input.
  982. //
  983. //
  984. // cbSize - size of this structure
  985. //
  986. // Flags - flags for the EXTCHKBOX as ECBF_xxxx
  987. //
  988. // ECBF_CHECKNAME_AT_FRONT
  989. //
  990. // This flag specified how to display item's name and its
  991. // checked name in the treeview display. If this flag is
  992. // set then the checked name is display in front of
  993. // separator name, otherwise the checked name is displayed
  994. // after the separator. For Example.
  995. //
  996. // Flag Set: pCheckedName pSeparator SelectName
  997. // Flag Clear: SelectName pSeparator pCheckedName
  998. //
  999. //
  1000. // ECBF_CHECKNAME_ONLY_ENABLED
  1001. //
  1002. // If set then it specified that in the treeview display,
  1003. // it will only show the pCheckedName if this extended
  1004. // check box is visible and enabled. Some items may not
  1005. // desired to display the pCheckedName if the extended
  1006. // check box is disabled, such as Copy/Collate checkbox.
  1007. //
  1008. //
  1009. // ECBF_ICONID_AS_HICON
  1010. //
  1011. // If this flag is set then IconID DWORD field is treated
  1012. // as a handle to the icon rather then the resource ID
  1013. //
  1014. //
  1015. // ECBF_OVERLAY_WARNING_ICON
  1016. //
  1017. // If this bit is set then this EXTCHKBOX's icon will
  1018. // be overlaied by a common UI's IDI_CPSUI_WARNING icon.
  1019. //
  1020. //
  1021. // ECBF_OVERLAY_ECBICON_IF_CHECKED
  1022. //
  1023. // This bit specified to overlay the ExtChkBox's Icon to
  1024. // the OPTITEM's icon (or OPTPARAM) if the the extended
  1025. // checked box is checked
  1026. //
  1027. //
  1028. // ECBF_OVERLAY_STOP_ICON
  1029. //
  1030. // If this bit is set then this EXTCHKBOX's icon will
  1031. // be overlaied by a common UI's IDI_CPSUI_STOP icon.
  1032. //
  1033. //
  1034. // ECBF_OVERLAY_NO_ICON
  1035. //
  1036. // If this bit is set then this EXTCHKBOX's icon will
  1037. // be overlaied by a common UI's IDI_CPSUI_NO icon.
  1038. //
  1039. //
  1040. // pTitle - Pointed to extended check box title
  1041. //
  1042. // ** See LPTSTR description above
  1043. //
  1044. // pSeparator - Pointer to the separator to be used in the treeview
  1045. // display or the static title control in the non-treeview
  1046. // page,
  1047. //
  1048. // pCheckedName- Pointed to the name to be displayed in the treeview if item
  1049. // is checked. pCheckedName is added according to the
  1050. // pSeparator and the ECBF_CHECKNAME_AT_FRONT flags.
  1051. //
  1052. // * If the pCheckedName is equal to IDS_CPSUI_NOTINSTALLED
  1053. // then common UI will automatically overaly a not installed
  1054. // icon on top of the extended check box Icon.
  1055. //
  1056. // ** See LPTSTR description above
  1057. //
  1058. // IconID - This is the icon identifier, which can be a common strandard
  1059. // IDI_CPSUI_xxx icon ID, caller's own icon resource ID, or a
  1060. // handle to the caller defined icon if ECBF_ICONID_AS_HICON
  1061. // flag is set, in any case if the IconID is zero then it
  1062. // indicated no icon.
  1063. //
  1064. // wReserved[] - WORD reserved field, must be 0
  1065. //
  1066. // dwReserved[]- DWORD reserved field, must be 0
  1067. //
  1068. //
  1069. // Following the the Flags for the OPTITEM
  1070. //
  1071. #define OPTIF_COLLAPSE 0x00000001L
  1072. #define OPTIF_HIDE 0x00000002L
  1073. #define OPTIF_CALLBACK 0x00000004L
  1074. #define OPTIF_CHANGED 0x00000008L
  1075. #define OPTIF_CHANGEONCE 0x00000010L
  1076. #define OPTIF_DISABLED 0x00000020L
  1077. #define OPTIF_ECB_CHECKED 0x00000040L
  1078. #define OPTIF_EXT_HIDE 0x00000080L
  1079. #define OPTIF_EXT_DISABLED 0x00000100L
  1080. #define OPTIF_SEL_AS_HICON 0x00000200L
  1081. #define OPTIF_EXT_IS_EXTPUSH 0x00000400L
  1082. #define OPTIF_NO_GROUPBOX_NAME 0x00000800L
  1083. #define OPTIF_OVERLAY_WARNING_ICON 0x00001000L
  1084. #define OPTIF_OVERLAY_STOP_ICON 0x00002000L
  1085. #define OPTIF_OVERLAY_NO_ICON 0x00004000L
  1086. #define OPTIF_INITIAL_TVITEM 0x00008000L
  1087. #define OPTIF_HAS_POIEXT 0x00010000L
  1088. #define OPTIF_MASK 0x0001ffffL
  1089. #define DMPUB_NONE 0
  1090. #define DMPUB_FIRST 1
  1091. #define DMPUB_ORIENTATION 1
  1092. #define DMPUB_SCALE 2
  1093. #define DMPUB_COPIES_COLLATE 3
  1094. #define DMPUB_DEFSOURCE 4
  1095. #define DMPUB_PRINTQUALITY 5
  1096. #define DMPUB_COLOR 6
  1097. #define DMPUB_DUPLEX 7
  1098. #define DMPUB_TTOPTION 8
  1099. #define DMPUB_FORMNAME 9
  1100. #define DMPUB_ICMMETHOD 10
  1101. #define DMPUB_ICMINTENT 11
  1102. #define DMPUB_MEDIATYPE 12
  1103. #define DMPUB_DITHERTYPE 13
  1104. #define DMPUB_OUTPUTBIN 14
  1105. #define DMPUB_QUALITY 15
  1106. #define DMPUB_NUP 16
  1107. #define DMPUB_PAGEORDER 17
  1108. #define DMPUB_LAST 17
  1109. #define DMPUB_OEM_PAPER_ITEM 97
  1110. #define DMPUB_OEM_GRAPHIC_ITEM 98
  1111. #define DMPUB_OEM_ROOT_ITEM 99
  1112. #define DMPUB_USER 100
  1113. #define MAKE_DMPUB_HIDEBIT(DMPub) (DWORD)(((DWORD)0x01 << ((DMPub) - 1)))
  1114. #define IS_DMPUB_HIDDEN(dw, DMPub) (BOOL)((DWORD)(dw) & \
  1115. MAKE_DMPUB_HIDEBIT(DMPub))
  1116. //
  1117. // DMPUB_xxxx is used in OPTITEM to identify if the item is a DEVMODE public
  1118. // field. Following it identify which field correspond to the DMPUB_xxxx
  1119. //
  1120. //
  1121. // DMPUB_ORIENTATION - dmOrientation
  1122. //
  1123. // DMPUB_SCALE - dmScale
  1124. //
  1125. // DMPUB_COPIES_COLLATE- dmCopies/dmCollate
  1126. //
  1127. // DMPUB_DEFSOURCE - dmDefSource (Should only used form by caller)
  1128. //
  1129. // DMPUB_PRINTQUALITY - dmPrintQuality
  1130. //
  1131. // DMPUB_COLOR - dmColor
  1132. //
  1133. // DMPUB_DUPLEX - dmDuplex
  1134. //
  1135. // DMPUB_TTOPTION - dmTTOption
  1136. //
  1137. // DMPUB_FORMNAME - dmFormName
  1138. //
  1139. // DMPUB_ICMMETHOD - dmICMMethod
  1140. //
  1141. // DMPUB_ICMINTENT - dmICMIntent
  1142. //
  1143. // DMPUB_MEDIATYPE - dmMediaType
  1144. //
  1145. // DMPUB_DITHERTYPE - dmDitherType
  1146. //
  1147. // DMPUB_USER - Anything greater than or equal to DMPUB_USER can be
  1148. // used by the caller.
  1149. //
  1150. // DMPUB_OUTPUTBIN - Private
  1151. //
  1152. // DMPUB_QUALITY - Private
  1153. //
  1154. // DMPUB_NUP - Private
  1155. //
  1156. // DMPUB_PAGEORDER - Private
  1157. //
  1158. // When common UI is called for the 'Document Properties' (DEVMODE), it will
  1159. // group some of public items together simillar to the following in the
  1160. // treeview. How it group is common UI version dependent and caller should not
  1161. // concern its placement
  1162. //
  1163. // Paper/Output (Add in by the common UI)
  1164. // Document Form (DMPUB_FORMNAME)
  1165. // Output Bin (DMPUB_OUTPUTBIN)
  1166. // Orientation (DMPUB_ORIENTATION)
  1167. // Source (DMPUB_DEFSOURCE)
  1168. // Media (DMPUB_MEDIATYPE)
  1169. // Number of Copies (DMPUB_COPIES_COLLATE)
  1170. // Page Order (DMPUB_PAGEORDER)
  1171. // Page Per Sheet (DMPUB_NUP)
  1172. // Duplex (DMPUB_DUPLEX)
  1173. //
  1174. // Graphic (Add in by the common UI)
  1175. // Print Quality (DMPUB_PRINTQUALITY)
  1176. // Quality Settings (DMPUB_QUALITY)
  1177. // Color (DMPUB_COLOR)
  1178. // Image Color Matching (Add in by the common UI)
  1179. // ICM Method (DMPUB_ICMMETHOD)
  1180. // ICM Intent (DMPUB_ICMINTENT)
  1181. // Scaling (DMPUB_SCALE)
  1182. // Dithering (DMPUB_DITHERTYPE)
  1183. // TrueType Option (DMPUB_TTOPTION)
  1184. //
  1185. // Options
  1186. // Halftone Color Adjustment...
  1187. // ALL Other Caller's Document sticky options
  1188. //
  1189. //
  1190. // For 'Document Properties' the standard page 1 (user friendly page) will
  1191. // consist following items if it appear in the OPTITEM array passed by the
  1192. // caller. These items must have following predefined TVOT_xxx type
  1193. // defined here and specified in the OPTTYPE's Type field.
  1194. //
  1195. // All DMPUB_xxx (except >= DMPUB_USER) public ID must have following
  1196. // TVOT_xxxx type specified, else a CPDU_INVALID_DMPUB_TVOT error is returned
  1197. //
  1198. // DMPUB_ORIENTATION - TVOT_2STATES/TVOT_3STATES
  1199. // DMPUB_SCALE - TVOT_UDARROW
  1200. // DMPUB_COPIES_COLLATE - TVOT_UDARROW + EXTCHKBOX (Collate)
  1201. // DMPUB_DEFSOURCE - TVOT_LISTBOX
  1202. // DMPUB_PRINTQUALITY - TVOT_LISTBOX
  1203. // DMPUB_COLOR - TVOT_2STATES
  1204. // DMPUB_DUPLEX - TVOT_2STATES/TVOT_3STATES
  1205. // DMPUB_TTOPTION - TVOT_LISTBOX
  1206. // DMPUB_FORMNAME - TVOT_LISTBOX
  1207. // DMPUB_ICMMETHOD - TVOT_2STATES/TVOT_3STATES
  1208. // DMPUB_ICMINTENT - TVOT_2STATES/TVOT_3STATES
  1209. // DMPUB_MEDIATYPE - TVOT_LISTBOX
  1210. // DMPUB_DITHERTYPE - TVOT_LISTBOX
  1211. //
  1212. //
  1213. #define OIEXTF_ANSI_STRING 0x0001
  1214. typedef struct _OIEXT {
  1215. WORD cbSize;
  1216. WORD Flags;
  1217. HINSTANCE hInstCaller;
  1218. LPTSTR pHelpFile;
  1219. ULONG_PTR dwReserved[4];
  1220. } OIEXT, *POIEXT;
  1221. //
  1222. // OIEXT is a data structure used as extension to the OPTITEM data structure
  1223. //
  1224. //
  1225. // cbSize - sizeof this structure
  1226. //
  1227. // Flags - One or more of OIEXTF_xxxx may be specified.
  1228. //
  1229. // OIEXTF_ANSI_STRING
  1230. //
  1231. // Specified that LPTSTR in this data structure is a ansi
  1232. // string (not UNICODE). This bit only checked if the
  1233. // LPTSTR is not the resource string ID
  1234. //
  1235. // hInstCaller - DLL instance handle, when this hInst is not NULL then all
  1236. // resource string and icon loading for this OPTITEM and its
  1237. // OPTTYPE, OPTPARAM are loaded from this hInstCaller Handle.
  1238. // If this filed is NULL then it will use the hInstCaller handle
  1239. // specified in the COMPROPSHEETUI data structure
  1240. //
  1241. // pHelpFile - Resource string ID or pointer to the help file for this
  1242. // OPTITEM. If this pointer is NULL then help file for the
  1243. // help index is assume specified in the pHelpFile field in the
  1244. // COMPROPSHEETUI data structure.
  1245. //
  1246. // dwReserved - These fields are not used now, and must 0
  1247. //
  1248. typedef struct _OPTITEM {
  1249. WORD cbSize; // size of this structure
  1250. BYTE Level; // level in the tree view
  1251. BYTE DlgPageIdx; // Index to the pDlgPage
  1252. DWORD Flags; // OPTIF_xxxx flags
  1253. ULONG_PTR UserData; // caller's own data
  1254. LPTSTR pName; // name of the item
  1255. union {
  1256. LONG Sel; // current selection (index)
  1257. LPTSTR pSel; // current selection (pStr)
  1258. } DUMMYUNIONNAME;
  1259. union {
  1260. PEXTCHKBOX pExtChkBox; // Pointer to EXTCHKBOX structure
  1261. PEXTPUSH pExtPush; // Pointer to EXTPUSH
  1262. } DUMMYUNIONNAME2;
  1263. POPTTYPE pOptType; // pointer to OPTTYPE structure
  1264. DWORD HelpIndex; // Help file index
  1265. BYTE DMPubID; // Devmode public filed ID
  1266. BYTE UserItemID; // caller's own item ID
  1267. WORD wReserved; // reserved WORD field, must be 0
  1268. POIEXT pOIExt; // Optitem extension pointer
  1269. ULONG_PTR dwReserved[3]; // reserved DWORD fields (must be 0)
  1270. } OPTITEM, *POPTITEM;
  1271. //
  1272. // OPTITEM is to describe each treeview item's name, selection type and
  1273. // possible selection
  1274. //
  1275. // cbSize - sizeof this structure
  1276. //
  1277. // Level - The level in the treeview, the root should have lowest
  1278. // number and number should start with level 0. the maximum
  1279. // number of levels are 256.
  1280. //
  1281. // DlgPageIdx - Zero-based index to the DLGPAGE araay pointee by
  1282. // pDlgPage. The Maximum index is MAX_DLGPPAGE_COUNT, if
  1283. // pDlgPage is a standard CPSUI_PDLGPAGE_xxxx then this
  1284. // field is automatically set the common UI
  1285. //
  1286. // Flags - OPTIF_xxxx flags as describe above
  1287. //
  1288. // OPTIF_COLLAPSE
  1289. //
  1290. // Collaspe treeview item and its children so it is
  1291. // not expanded initially.
  1292. //
  1293. //
  1294. // OPTIF_HIDE
  1295. //
  1296. // Hide this item from the treeview
  1297. //
  1298. //
  1299. // OPTIF_CALLBACK
  1300. //
  1301. // Callback to the caller when user making some
  1302. // changes a pointer (pfnCallBack) must provided and
  1303. // process as defined by the common UI.
  1304. //
  1305. //
  1306. // OPTIF_CHANGED
  1307. //
  1308. // This item was changed and need to re-display. this
  1309. // flag only used when caller returned from callback
  1310. // funciton.
  1311. //
  1312. //
  1313. // OPTIF_CHANGEONCE
  1314. //
  1315. // This item has been changed at least once.
  1316. //
  1317. //
  1318. // OPTIF_DISABLED
  1319. //
  1320. // Disable this item so it become not selectable.
  1321. //
  1322. //
  1323. // OPTIF_ECB_CHECKED
  1324. //
  1325. // Specified the associated extended check box is
  1326. // in checked state.
  1327. //
  1328. //
  1329. // OPTIF_EXT_HIDE
  1330. //
  1331. // Hide the extended check box/extended push botton.
  1332. //
  1333. //
  1334. // OPTIF_EXT_DISABLED
  1335. //
  1336. // The Extended check box/push botton is disabled and
  1337. // not selectable
  1338. //
  1339. //
  1340. // OPTIF_SEL_AS_HICON
  1341. //
  1342. // This flag only used if this item has no type,
  1343. // pOptType=NULL that is, when pOptType is NULL then
  1344. // 'Sel' field is the IconID. if flag is set then it
  1345. // indicate 'pSel' is the Icon handle rather
  1346. // than the icon resource ID specified in Sel.
  1347. //
  1348. //
  1349. // OPTIF_EXT_IS_EXTPUSH
  1350. //
  1351. // Specified that pExtPush should be used when this
  1352. // pointer is not NULL, if this pointer is not NULL
  1353. // and this flag is clear then pExtChkBox is assumed.
  1354. //
  1355. //
  1356. // OPTIF_NO_GROUPBOX_NAME
  1357. //
  1358. // Specified that do not overwrite the group box title
  1359. // text, if group box ID is defined. See the TVOT_xx
  1360. // description above.
  1361. //
  1362. //
  1363. // OPTIF_OVERLAY_WARNING_ICON
  1364. //
  1365. // If this bit is set then this header OPTITEM's icon
  1366. // will be overlaied by a common UI's
  1367. // IDI_CPSUI_WARNING icon. This bit only used if this
  1368. // item has no type, pOptType is NULL that is.
  1369. //
  1370. //
  1371. // OPTIF_OVERLAY_STOP_ICON
  1372. //
  1373. // If this bit is set then this header OPTITEM's icon
  1374. // will be overlaied by a common UI's IDI_CPSUI_STOP
  1375. // icon. This bit only used if this item has no type,
  1376. // pOptType is NULL that is.
  1377. //
  1378. //
  1379. // OPTIF_OVERLAY_NO_ICON
  1380. //
  1381. // If this bit is set then this header OPTITEM's icon
  1382. // will be overlaied by a common UI's IDI_CPSUI_NO
  1383. // icon. This bit only used if this item has no type,
  1384. // pOptType is NULL that is.
  1385. //
  1386. //
  1387. // OPTIF_INITIAL_TVITEM
  1388. //
  1389. // Specified that this item will be the initial item
  1390. // to be selected and display on the treeview page.
  1391. // If the selected item is currently a child or
  1392. // collapse then common UI will expand the selection
  1393. // then scroll it into view.
  1394. //
  1395. // If this flag is clear or the set item is in hide
  1396. // status common UI will pick the initial item to
  1397. // display.
  1398. //
  1399. // OPTIF_HAS_POIEXT
  1400. //
  1401. // Specified that pOIExt field is a valid pointer that
  1402. // points to OIEXT data structure. The pOIExt only
  1403. // used by the common UI if this bit is set.
  1404. //
  1405. //
  1406. // UserData - a 32-bit number used by the caller and common UI will not
  1407. // modify it.
  1408. //
  1409. // pName - Pointer to the item's name, such as 'Upper Tray',
  1410. // 'Memory' or it is used as data as describe in
  1411. // OPTPARAM/OPTTYPE structure
  1412. //
  1413. // ** See LPTSTR description above
  1414. //
  1415. // pSel
  1416. // Sel - Current selection for this item. This is a union field
  1417. // which can be a pointer to a string or a LONG index
  1418. // selection.
  1419. //
  1420. // ** If pOptType field is NULL then 'Sel' is the icon ID
  1421. // to be used for the header.
  1422. //
  1423. // pExtPush
  1424. // pExtChkBox - Pointer to either EXTPUSH or EXTCHKBOX data structure,
  1425. // if this pointer is NULL then this item does not have
  1426. // ectended check box/push botton associate with it.
  1427. //
  1428. // When an extended check box is associate with the
  1429. // OPTTYPE, the OPTIF_EXT_IS_EXTPUSH must not set, the
  1430. // OPTIF_ECB_CHECKED flag specified if the extended check
  1431. // box is checked or not checked.
  1432. //
  1433. // When an Extended push botton is associated with the
  1434. // OPTTYPE, the OPTIF_EXT_IS_EXTPUSH flag must set.
  1435. //
  1436. // The following flags are used in both EXTCHKBOX or
  1437. // EXTPUSH
  1438. //
  1439. // OPTIF_EXT_HIDE,
  1440. // OPTIF_EXT_DISABLED
  1441. // OPTIF_EXT_CHANGEONCE
  1442. //
  1443. //
  1444. // pOptType - Pointer to the OPTTYPE structure to describe the display
  1445. // and selections of the item. If this pointer is NULL
  1446. // then this this item does not have any selection. and it
  1447. // is used as sub-items' header.
  1448. //
  1449. // * When pOptType is NULL then the 'Sel' is the Icon ID.
  1450. //
  1451. //
  1452. // HelpIndex - a index to the help file for context sensitive help
  1453. // if HelpInex=0 then there is no help for this item
  1454. //
  1455. // DMPubID - specified if this item is one of the public fields in the
  1456. // DEVMODE structure and supported by the common UI.
  1457. //
  1458. // DMPUB_NONE - Not DEVMODE public fields
  1459. // DMPUB_ORIENTATION - dmOrientation
  1460. // DMPUB_SCALE - dmScale
  1461. // DMPUB_COPIES_COLLATE - dmCopies/dmCollate
  1462. // DMPUB_DEFSOURCE - dmDefSource
  1463. // DMPUB_PRINTQUALITY - dmPrintQuality
  1464. // DMPUB_COLOR - dmColor
  1465. // DMPUB_DUPLEX - dmDuplex
  1466. // DMPUB_TTOPTION - dmTTOption
  1467. // DMPUB_FORMNAME - dmFormName
  1468. // DMPUB_ICMMETHOD - dmICMMethod
  1469. // DMPUB_ICMINTENT - dmICMIntent
  1470. // DMPUB_MEDIATYPE - dmMediaType
  1471. // DMPUB_DITHERTYPE - dmDitherType
  1472. //
  1473. // ** for most of DMPUB_FIRST to DMPUB_LAST each OPTITEM's
  1474. // pName is automatically set to the standard
  1475. // IDS_CPSUI_xxx for the consistancy reason, the
  1476. // standard pName is set according to following table.
  1477. //
  1478. // DMPUB_ORIENTATION - IDS_CPSUI_ORIENTATION
  1479. // DMPUB_SCALE - IDS_CPSUI_SCALING
  1480. // DMPUB_COPIES_COLLATE - IDS_CPSUI_COPIES
  1481. // DMPUB_DEFSOURCE - IDS_CPSUI_SOURCE
  1482. // DMPUB_PRINTQUALITY - IDS_CPSUI_PRINTQUALITY
  1483. // IDS_CPSUI_RESOLUTION
  1484. // DMPUB_COLOR - IDS_CPSUI_COLOR_APPERANCE
  1485. // DMPUB_DUPLEX - IDS_CPSUI_DUPLEX
  1486. // DMPUB_TTOPTION - IDS_CPSUI_TTOPTION
  1487. // DMPUB_FORMNAME - IDS_CPSUI_FORMNAME
  1488. // DMPUB_ICMMETHOD - IDS_CPSUI_ICMMETHOD
  1489. // DMPUB_ICMINTENT - IDS_CPSUI_ICMINTENT
  1490. // DMPUB_MEDIATYPE - IDS_CPSUI_MEDIA
  1491. // DMPUB_DITHERTYPE - IDS_CPSUI_DITHERING
  1492. //
  1493. // for DMPUB_PRINTQUALITY, if the pName is not one of
  1494. // IDS_CPSUI_PRINTQUALITY or IDS_CPSUI_RESOLUTION then
  1495. // common UI will automatically default the pName to
  1496. // IDS_CPSUI_RESOLUTION.
  1497. //
  1498. // Each pData (OPTPARAM) selection in OPTPARAM which
  1499. // OPTITEM's pOptType pointed to should use as much
  1500. // as IDS_CPSUI_xxx standard name as possible.
  1501. //
  1502. //
  1503. // ** for DMPUB_COPIES_COLLATE the common UI automatically
  1504. // doing the following before the callback
  1505. //
  1506. // 1) Enable/Disable the collate extended check box if
  1507. // OPTIF_EXT_HIDE is not specified and pExtChkBox
  1508. // is not NULL in the OPTITEM.
  1509. //
  1510. // 2) Automatically change the postfix for this item
  1511. // to be 'Copy' if selection is one, and 'Copies'
  1512. // if selection is greater than one in the treeview
  1513. // page, and it will also set the postfix in
  1514. // standard document property page if the postfix
  1515. // ID is provided (BegCtrlID + 4)
  1516. //
  1517. //
  1518. // ** for DMPUB_COLOR the common UI automatically doing
  1519. // the following before the callback, the gray
  1520. // selection must be Sel=0 and Color slection must be
  1521. // Sel=1
  1522. //
  1523. // 1) Calling halftone color adjustment with current
  1524. // color/mono selection
  1525. //
  1526. // 2) Disable ICM when color is not selected
  1527. //
  1528. //
  1529. // ** Please see above DMPUB_xx description for details.
  1530. //
  1531. // UserItemID - This is a byte ID intented to be used by the caller to
  1532. // identify the item
  1533. //
  1534. // wReserved - WORD reserved. Must be zero
  1535. //
  1536. // pOIExt - Pointer to the OIEXT data structure to specified that
  1537. // it has a OPTITEM extenstion structure.
  1538. //
  1539. // dwReserved[] - DWORD reserved and must be 0
  1540. //
  1541. //
  1542. //
  1543. // predefined ID for call back reason
  1544. //
  1545. #define CPSUICB_REASON_SEL_CHANGED 0
  1546. #define CPSUICB_REASON_PUSHBUTTON 1
  1547. #define CPSUICB_REASON_ECB_CHANGED 2
  1548. #define CPSUICB_REASON_DLGPROC 3
  1549. #define CPSUICB_REASON_UNDO_CHANGES 4
  1550. #define CPSUICB_REASON_EXTPUSH 5
  1551. #define CPSUICB_REASON_APPLYNOW 6
  1552. #define CPSUICB_REASON_OPTITEM_SETFOCUS 7
  1553. #define CPSUICB_REASON_ITEMS_REVERTED 8
  1554. #define CPSUICB_REASON_ABOUT 9
  1555. #define CPSUICB_REASON_SETACTIVE 10
  1556. #define CPSUICB_REASON_KILLACTIVE 11
  1557. //
  1558. // predefined ID for call back action
  1559. //
  1560. #define CPSUICB_ACTION_NONE 0
  1561. #define CPSUICB_ACTION_OPTIF_CHANGED 1
  1562. #define CPSUICB_ACTION_REINIT_ITEMS 2
  1563. #define CPSUICB_ACTION_NO_APPLY_EXIT 3
  1564. #define CPSUICB_ACTION_ITEMS_APPLIED 4
  1565. typedef struct _CPSUICBPARAM {
  1566. WORD cbSize; // size of this structure
  1567. WORD Reason; // CPSUICB_REASON_XXXXX callback reason
  1568. HWND hDlg; // handle of the dialog box
  1569. POPTITEM pOptItem; // pOptItem field from COMPROPSHEETUI
  1570. WORD cOptItem; // cOptItem field from COMPROPSHEETUI
  1571. WORD Flags; // flags field from COMPROPSHEETUI
  1572. POPTITEM pCurItem; // current selected item of callback
  1573. union {
  1574. LONG OldSel; // Last selection (index)
  1575. LPTSTR pOldSel; // Last selection (pStr)
  1576. } DUMMYUNIONNAME;
  1577. ULONG_PTR UserData; // UserData in the COMPROPSHEETUI struct.
  1578. ULONG_PTR Result; // OUT parameter for the APPLYNOW
  1579. } CPSUICBPARAM, *PCPSUICBPARAM;
  1580. typedef LONG (APIENTRY *_CPSUICALLBACK)(PCPSUICBPARAM pCPSUICBParam);
  1581. #define CPSUICALLBACK LONG APIENTRY
  1582. //
  1583. // CPSUICBPARAM is used when commom UI callback to the caller, this structure
  1584. // describe the nature of callback and passed all necessary parameter for the
  1585. // caller to make changes in the pOptItem and passed an action back to the
  1586. // commom UI to redisplay the tree or page 1 data
  1587. //
  1588. //
  1589. // cbSize - must be CPSUICBPARAM
  1590. //
  1591. // Reason - defined the nature of the callback
  1592. //
  1593. // CPSUICB_REASON_SEL_CHANGED
  1594. //
  1595. // User make change to the pCurItem. if the item is
  1596. // DMPUB_COPIES_COLLATE then common UI automatically
  1597. // change the collate extended check box without callback
  1598. // to the caller of the extended check box changes
  1599. //
  1600. //
  1601. // CPSUICB_REASON_PUSHBUTTON
  1602. //
  1603. // User push the push button and push button item is set
  1604. // to PUSHBUTTON_TYPE_CALLBACK.
  1605. //
  1606. //
  1607. // CPSUICB_REASON_ECB_CHANGED
  1608. //
  1609. // User make change to the extended checked box (i.e. it
  1610. // eiterh checked or not checked) EXTCHKBOX in the
  1611. // pCurItem passed in the call back parameter.
  1612. //
  1613. //
  1614. // CPSUICB_REASON_DLGPROC
  1615. //
  1616. // The callback reason is PUSHBUTTON_TYPE_DLGPROC
  1617. //
  1618. //
  1619. // CPSUICB_REASON_UNDO_CHANGES
  1620. //
  1621. // This callback currently is not implmented.
  1622. //
  1623. //
  1624. // CPSUICB_REASON_EXTPUSH
  1625. //
  1626. // The callback is result of user push the extend push
  1627. // button.
  1628. //
  1629. //
  1630. // CPSUICB_REASON_APPLYNOW
  1631. //
  1632. // The user press the apply now button. Durning callback
  1633. // the pCurItem is set to equal to pOptItem in this
  1634. // structure and 'OldSel' is set to the active DlgPageIdx
  1635. // (compare to the OPTITEM's DlgPageIdx) which the page
  1636. // user hitting the apply now button if the page is
  1637. // non-treeview page, otherwise the 'OldSel' is set to -1
  1638. // (for treeview page) to indicate all valid item should
  1639. // be apply now, if the callback return
  1640. // CPSUICB_ACTION_NONE then the common UI will exit the
  1641. // property sheet and returned CPSUI_OK back to the
  1642. // caller, and if the callback function returned
  1643. // CPSUICB_ACTION_NO_APPLY_EXIT then common UI will not
  1644. // exit the property sheet and callback function must
  1645. // pop-up messages dialog box to tell user why it cannot
  1646. // exist the property sheet until certain action is take
  1647. // by the user.
  1648. //
  1649. //
  1650. // CPSUICB_REASON_OPTITEM_SETFOCUS
  1651. //
  1652. // This callback reason is used when an OPTITEM is getting
  1653. // the keyboard focus. and give the callback function a
  1654. // chance to examine the item.
  1655. //
  1656. //
  1657. // CPSUICB_REASON_ITEMS_REVERTED
  1658. //
  1659. // This callback reason is used when user changed items
  1660. // and decided to revert changes from the parent item in
  1661. // the treeview. The callback funciton is called after
  1662. // all revertable items are reverted to its original.
  1663. //
  1664. // The CPSUICBPARAM's pCurItem is same as pOptItem and
  1665. // 'OldSel' field is same as cOptItem field. for each of
  1666. // reverted item, the OPTIF_CHANGED bit will be set in the
  1667. // OPTITEM by the common UI to indicate the item is revert
  1668. // by the common UI. The callback function MUST NOT
  1669. // reset this bit if it is set.
  1670. //
  1671. //
  1672. // CPSUICB_REASON_ABOUT
  1673. //
  1674. // This callback reason is used when user hit 'About...'
  1675. // push button in the treeview page, and the flag
  1676. // CPSUIF_ABOUT_CALLBACK is set. The pCurItem is set to
  1677. // same as pOptItem and 'pOldSel' is a pointer pointed to
  1678. // original copy of COMPROPSHEETUI data structure which
  1679. // passed to the common UI.
  1680. //
  1681. //
  1682. // CPSUICB_REASON_SETACTIVE
  1683. // CPSUICB_REASON_KILLACTIVE
  1684. //
  1685. // The current property sheet is gaining or loosing focus,
  1686. // the pCurItem is set to equal to pOptItem in this
  1687. // structure and 'OldSel' is set to the current active
  1688. // DlgPageIdx (compare to the OPTITEM's DlgPageIdx).
  1689. // if the page is non-treeview page, otherwise the
  1690. // 'OldSel' is set to -1 (for treeview page).
  1691. //
  1692. // hDlg - The handle to the dialog box (Properties page TAB) current
  1693. // active for the callback.
  1694. //
  1695. // Durning the callback the caller must not change the
  1696. // DWLP_USERDATA on hDlg, otherwise the common UI will be crash.
  1697. // If callback function need to get/set DWLP_USERDATA it should
  1698. // call common UI's SetCPSUIUserData() and GetCPSUIUserData()
  1699. // functions instead.
  1700. //
  1701. // pCurItem - Pointed to POPTITEM which the callback is generated for.
  1702. //
  1703. // pOldSel
  1704. // OldSel - The last OPTITEM's pSel/Sel field before the change was made
  1705. // by the user. The pOldSel/OldSel only valid if the callback
  1706. // reason is CPSUICB_REASON_SEL_CHANGED, this give the callback
  1707. // function a chance to check against the previous item
  1708. // selection. This is a union field which can be a pointer to
  1709. // a string or a LONG index selection.
  1710. //
  1711. // UserData - a 32-bit user defined data in the COMPROPSHEETUI structure,
  1712. // commom UI will not changed it.
  1713. //
  1714. // Result - When the reason is CPSUICB_REASON_APPLYNOW, the callback
  1715. // function MUST set the requested result for the caller into
  1716. // 'Result' field when it returned a value other than the
  1717. // CPSUICB_ACTION_NO_APPLY_EXIT and common UI will send the
  1718. // 'Result' field value to this page's parent.
  1719. //
  1720. // The called function should save the current result of
  1721. // pOptItem. The default 'Result' is set to CPSUI_OK (1) from
  1722. // common UI. This function can alter this result before it
  1723. // return back to to the common UI.
  1724. //
  1725. //
  1726. // Return Values:
  1727. //
  1728. // CPSUICB_ACTION_NONE - No action need to be take by the
  1729. // common UI.
  1730. //
  1731. // CPSUICB_ACTION_OPTIF_CHANGED - Ask the common UI to examine the
  1732. // OPTIF_CHANGED flag in the OPTITEM
  1733. // data structure. if the flag is set
  1734. // then that item is assume need to be
  1735. // re-display because of OPTITEM's Flags
  1736. // field changed or item's selection
  1737. // changed. This is different from
  1738. // CPSUICB_ACTION_REINIT_ITEMS which
  1739. // it assume OPTTYPE or OPTPARAM data
  1740. // also changed.
  1741. //
  1742. //
  1743. // CPSUICB_ACTION_REINIT_ITEMS - Ask the common UI to examine the
  1744. // OPTIF_CHANGED flag in the OPTITEM
  1745. // data structure. if the flag is set
  1746. // then that item is assume need to be
  1747. // re-initialized in the dilaog box
  1748. // control. This happened if item's
  1749. // OPTTYPE or OPTPARAMs flag/pdata
  1750. // changed.
  1751. //
  1752. //
  1753. // CPSUICB_ACTION_NO_APPLY_EXIT - This return value only valid durning
  1754. // CPSUICB_REASON_APPLYNOW callback
  1755. // reason, it tell common UI it has
  1756. // some constraints in its OPTITEM which
  1757. // must correct or confirm by the user
  1758. // before exit. The callback function
  1759. // must display and/or have user taking
  1760. // some actions before return this
  1761. // action to the common UI
  1762. //
  1763. // CPSUICB_ACTION_ITEMS_APPLIED - When responsed to the
  1764. // CPSUICB_REASON_APPLYNOW, if the
  1765. // returned action is
  1766. // CPSUICB_ACTION_ITEMS_APPLIED then
  1767. // common UI will reset OPTIF_CHANGEONCE
  1768. // bit and save the new default for the
  1769. // future undo operations.
  1770. //
  1771. //
  1772. #define DP_STD_TREEVIEWPAGE 0xFFFF
  1773. #define DP_STD_DOCPROPPAGE2 0xFFFE
  1774. #define DP_STD_DOCPROPPAGE1 0XFFFD
  1775. #define DP_STD_RESERVED_START 0xFFF0
  1776. #define MAX_DLGPAGE_COUNT 64
  1777. #define DPF_ICONID_AS_HICON 0x0001
  1778. #define DPF_USE_HDLGTEMPLATE 0x0002
  1779. typedef struct _DLGPAGE {
  1780. WORD cbSize; // size of this structure
  1781. WORD Flags; // DPF_xxxx flags
  1782. DLGPROC DlgProc; // caller's dialog box subclass procedue
  1783. LPTSTR pTabName; // pointer to the tab name
  1784. ULONG_PTR IconID; // icon to be used
  1785. union {
  1786. WORD DlgTemplateID; // dialog box template ID
  1787. HANDLE hDlgTemplate; // handle to the dialog template
  1788. } DUMMYUNIONNAME;
  1789. } DLGPAGE, *PDLGPAGE;
  1790. //
  1791. // DLGPAGE structure describe non-treeview page characteristics
  1792. //
  1793. //
  1794. // cbSize - size of this structure
  1795. //
  1796. // Flags - DPF_xxxx flags
  1797. //
  1798. // DPF_ICONID_AS_HICON
  1799. //
  1800. // If this flag is set then IconID DWORD field is
  1801. // treated as a handle to the icon rather then the
  1802. // resource ID
  1803. //
  1804. //
  1805. // DlgProc - caller's supplied DLGPROC for sub-class the page
  1806. // dialog box processing,
  1807. //
  1808. // if DlgProc is not NULL then common UI do the following
  1809. // according the the message received except for the
  1810. // DP_STD_xxx pages
  1811. //
  1812. //
  1813. // WM_INITDIALOG
  1814. //
  1815. // Common UI initialize the dialog box and then call
  1816. // DlgProc(WM_INITDIALOG) the DlgProc should return
  1817. // exactly the behavior for the WM_INITDIALOG
  1818. //
  1819. // The lParam in the WM_INITDIALOG data structure is
  1820. // a pointer to the PROPSHEETPAGE data structure.
  1821. //
  1822. // the lParam field in the PROPSHEETPAGE (lParam
  1823. // passed to the WM_INITDIALOG) is the UserData
  1824. // defined in COMPROPSHEETUI data structure
  1825. //
  1826. // To access to the PSPINFO data structure which
  1827. // associate with this page, use the common UI macro
  1828. // PPSPINFO_FROM_WM_INITDIALOG_LPARAM(lParam) where
  1829. // lParam is the parameter passed to the
  1830. // WM_INITDIALOG message.
  1831. //
  1832. // The subclass function should save these pointers
  1833. // for its later use, but it MUST NOT modified the
  1834. // content of the PSPINFO data structure or system
  1835. // may crashed.
  1836. //
  1837. //
  1838. // OTHER DIALOG MESSAGES
  1839. //
  1840. // Iit call DlgProc() and if it returned the value is
  1841. // non-zero then common UI assume DlgProc() processed
  1842. // the message and will not process this message.
  1843. //
  1844. // If the returned vlaue from DlgProc() is zero then
  1845. // common UI will process this message.
  1846. //
  1847. //
  1848. // * Durning the DlgProc the caller must not change the
  1849. // DWLP_USERDATA on hDlg, otherwise the common UI will
  1850. // be crash. If caller need to get/set DWLP_USERDATA it
  1851. // should call common UI's SetCPSUIUserData() and
  1852. // GetCPSUIUserData() instead.
  1853. //
  1854. // pTabName - Pointer to a string to describe the TAB title
  1855. //
  1856. // IconID - This is the icon identifier, which can be a common
  1857. // strandard IDI_CPSUI_xxx icon ID, caller's own icon
  1858. // resource ID, or a handle to the caller defined icon if
  1859. // DPF_ICONID_AS_HICON flag is set, in any case if the
  1860. // IconID is zero then it indicated no icon.
  1861. //
  1862. // DlgTemplateID - The template id to be use for the ProPage, it can be
  1863. // one of DP_STD_xxxx, the DP_STD_xxx has 240 x 240 dialog
  1864. // box units.
  1865. //
  1866. //
  1867. // DP_STD_TREEVIEWPAGE
  1868. //
  1869. // Specified that this page is a standard treeview
  1870. // page provided by the common ui. The treeview page
  1871. // is a page using treeview display all valid OPTITEM
  1872. // passed to the common UI. User can modify every
  1873. // valid selectable OPTITEM from the treeview page.
  1874. //
  1875. // DP_STD_DOCPROPPAGE
  1876. //
  1877. // Specified that this page is a standard document
  1878. // property page provided by the common UI
  1879. //
  1880. // hDlgTemplate - Handle to the DLGTEMPLATE which will be use for pop up
  1881. // dialog box
  1882. //
  1883. //
  1884. // wReserved[]
  1885. // dwReserved[] - Reserved fields, must be 0
  1886. //
  1887. //
  1888. // ** Tips of designing the dialog box controls
  1889. //
  1890. // When designing the dialog box controls, each OPTITEM is correspoonds
  1891. // to one input control plus one extended check box or extended push
  1892. // button. Since common UI will automatically disable and remove
  1893. // OPTIF_HIDE items item from the property sheet and dynamically move
  1894. // other controls, the following tips of designing the dialog box controls
  1895. // should follow.
  1896. //
  1897. // * Each item should have one input control plus optional of extended
  1898. // check box/push botton, one icon control and other static controls
  1899. //
  1900. // * Each item should occupied whole horizontal spaces of the property
  1901. // sheet, items must not overlay in vertical direction.
  1902. //
  1903. // * for TVOT_2STATES, TVOT_3STATES, if it araange radio buttons from
  1904. // left to right in state order (ie. from first state's OPTPARAM to
  1905. // last state's OPTPARAM) then the radio buttons and icons should
  1906. // aligned in the Y coordinate. If it arrange radio buttons from top
  1907. // to bottom (ie. from first state's OPTPARAM to last state's OPTPARAM)
  1908. // then the radio buttons and icons should aligned in the X coordinate.
  1909. //
  1910. // common UI will automatically hide/move the radio buttons to compact
  1911. // the dialog box controls. If radio buttons/icons are arranged in
  1912. // top/down order and there is other controls obscure in Y direction
  1913. // then radio buttons will only be re-arranged but not remove any white
  1914. // spaces in Y direction.
  1915. //
  1916. // * If multiple items shared one group box, then the group box must
  1917. // belongs to the first item (topmost in the dialog box group) in the
  1918. // group, the group box must large enough to cover all the items in
  1919. // side the group box.
  1920. //
  1921. //
  1922. #define CPSUIF_UPDATE_PERMISSION 0x0001
  1923. #define CPSUIF_ICONID_AS_HICON 0x0002
  1924. #define CPSUIF_ABOUT_CALLBACK 0x0004
  1925. #define CPSUI_PDLGPAGE_DOCPROP (PDLGPAGE)1
  1926. #define CPSUI_PDLGPAGE_ADVDOCPROP (PDLGPAGE)2
  1927. #define CPSUI_PDLGPAGE_PRINTERPROP (PDLGPAGE)3
  1928. #define CPSUI_PDLGPAGE_TREEVIEWONLY (PDLGPAGE)4
  1929. //
  1930. // For compatible misspelling #define
  1931. //
  1932. #define CPSUI_PDLGPAGE_TREEVIWONLY CPSUI_PDLGPAGE_TREEVIEWONLY
  1933. typedef struct _COMPROPSHEETUI {
  1934. WORD cbSize; // size of this structure
  1935. WORD Flags; // CPSUIF_xxxx flags
  1936. HINSTANCE hInstCaller; // caller's hInstance
  1937. LPTSTR pCallerName; // pointer to the caller's name
  1938. ULONG_PTR UserData; // caller's own data
  1939. LPTSTR pHelpFile; // pointer to the help file
  1940. _CPSUICALLBACK pfnCallBack; // callback function pointer
  1941. POPTITEM pOptItem; // pointer to POPTITEM array
  1942. PDLGPAGE pDlgPage; // pointer to the DLGPAGE array
  1943. WORD cOptItem; // count of pOptItem array
  1944. WORD cDlgPage; // count of pDlgPage array
  1945. ULONG_PTR IconID; // icon to be used
  1946. LPTSTR pOptItemName; // pointer to the optitem's data name
  1947. WORD CallerVersion; // version for the caller apps
  1948. WORD OptItemVersion; // version for the optitem name
  1949. ULONG_PTR dwReserved[4]; // reserved, must be 0
  1950. } COMPROPSHEETUI, *PCOMPROPSHEETUI;
  1951. //
  1952. // COMPROPSHEETUI data structure is used when calling common UI to display dialog
  1953. // box of properties pages.
  1954. //
  1955. //
  1956. // Size - Must be sizeof (COMPROPSHEETUI)
  1957. //
  1958. // Flags - can be one or more of following
  1959. //
  1960. // CPSUIF_UPDATE_PERMISSION
  1961. //
  1962. // Specified the any valid pOptItem items are
  1963. // changeable by the user.
  1964. //
  1965. //
  1966. // CPSUIF_ICONID_AS_HICON
  1967. //
  1968. // If this flag is set then IconID DWORD field is
  1969. // treated as a handle to the icon rather then the
  1970. // resource ID
  1971. //
  1972. //
  1973. // CPSUIF_ABOUT_CALLBACK
  1974. //
  1975. // If this flag bit is set, then when user hit
  1976. // 'About...' button in the treeview tab, it will
  1977. // call the callback function with a reason of
  1978. // CPSUICB_REASON_ABOUT, and callback MUST handle
  1979. // the about which pop-up dialog box to show user
  1980. // the information about the caller and OPTITEMs.
  1981. //
  1982. // If this bit is not set then common UI will call
  1983. // the ShellAbout() with formatted caller Name and
  1984. // pOptItemName with version numbers.
  1985. //
  1986. //
  1987. // hInstCaller - the caller's handle to its instance. Commom UI use
  1988. // this handle to load caller's icon and other resources.
  1989. //
  1990. // pCallerName - Pointer to the caller's NULL terminated caller's
  1991. // name, most time this is driver's name,
  1992. // such as 'Postscript Driver'
  1993. //
  1994. // UserData - a 32-bit number used by the caller and common UI will
  1995. // not modify it. this 32-bit number is passed back to
  1996. // the caller durning the callback function
  1997. //
  1998. // pHelpFile - specified a standard microsoft help file (path/file)
  1999. // for using in the common UI. in OPTITEM specified
  2000. // HelpIndex for help in each item.
  2001. //
  2002. // pfnCallBack - Pointer to _CPSUICALLBACK callback function. Common
  2003. // UI only callback to the caller if an OPTIF_CALLBACK
  2004. // is set OPTITEM data structure's flag fields and the
  2005. // item selection is changed by the user.
  2006. //
  2007. // pOptItem - Pointer to array of OPTITEM structure to be displayed
  2008. // by the common UI
  2009. //
  2010. // pDlgPage - Pointer to array of DLGPAGE structure to describe
  2011. // each property sheet page infomation, the following
  2012. // are the standard common ui DLGPAGEs. When specified
  2013. // CPSUI_PDLGPAGE_xxxx, the common UI will automatically
  2014. // modify DlgPageIdx field in the OPTITEM, caller must
  2015. // set the iStartPage correctly.
  2016. //
  2017. // CPSUI_PDLGPAGE_DOCPROP
  2018. //
  2019. // specified this a common ui standard document
  2020. // property sheets. This includes two property
  2021. // sheets, 1) Page Setup 2) Advance (TreeView)
  2022. //
  2023. //
  2024. // CPSUI_PDLGPAGE_ADVDOCPROP
  2025. //
  2026. // Specified this is a treeview page only UI
  2027. // provided by the common UI, this only has one
  2028. // treeview page with tab of 'Advance'
  2029. //
  2030. //
  2031. // CPSUI_PDLGPAGE_PRINTERPROP
  2032. //
  2033. // Specified this is a common UI standard printer
  2034. // property sheet. This only has one treeview
  2035. // page with tab of 'Device Options'
  2036. //
  2037. //
  2038. // CPSUI_PDLGPAGE_TREEVIEWONLY
  2039. //
  2040. // Specified this is a treeview page only UI
  2041. // provided by the common UI, this only has one
  2042. // treeview page
  2043. //
  2044. //
  2045. //
  2046. // cOptItem - Count of OPTITEM pointed by the pOptItem above
  2047. //
  2048. // cDlgPage - Count of DLGPAGE pointed by the pDlgPage. If
  2049. // pDlgPage is one of the CPSUI_PDLGPAGE_xxxx then this
  2050. // field is ignored by the common UI.
  2051. //
  2052. // IconID - This is the icon identifier, which can be a common
  2053. // strandard IDI_CPSUI_xxx icon ID, caller's own icon
  2054. // resource ID, or a handle to the caller defined icon
  2055. // if CPSUIF_ICONID_AS_HICON flag is set, in any case
  2056. // if the IconID is zero then it indicated no icon.
  2057. //
  2058. // pOptItemName - Pointer to the pOptItem data NULL terminated name,
  2059. // most time this is device name, such as 'HP 4si'
  2060. //
  2061. // CallerVersion - Version for the caller, the HIBYTE(CallerVersion) is
  2062. // the major version, and LOBYTE(CallerVersion) is the
  2063. // minor version, such as 0x310 display as 3.16, 0x3ff
  2064. // display as 3.255 and 0x30a display as 3.10
  2065. //
  2066. // OptItemVersion - Version for the OPTITEM's data, the
  2067. // HIBYTE(OptItemVersion) is the major version, and
  2068. // LOBYTE(OptItemVersion) is the minor version, such as
  2069. // 0x310 display as 3.16, 0x3ff display as 3.255 and
  2070. // 0x30a display as 3.10.
  2071. //
  2072. // dwReserved[4] - reserved fields, must be 0
  2073. //
  2074. //
  2075. // ** pTitlee and TitleBarIcon only used if CommonPrinterPropSheetUI()
  2076. // is the last one the Property sheet UI chain and call the PropertySheet()
  2077. //
  2078. //
  2079. #define CPSFUNC_ADD_HPROPSHEETPAGE 0
  2080. #define CPSFUNC_ADD_PROPSHEETPAGEW 1
  2081. #define CPSFUNC_ADD_PCOMPROPSHEETUIA 2
  2082. #define CPSFUNC_ADD_PCOMPROPSHEETUIW 3
  2083. #define CPSFUNC_ADD_PFNPROPSHEETUIA 4
  2084. #define CPSFUNC_ADD_PFNPROPSHEETUIW 5
  2085. #define CPSFUNC_DELETE_HCOMPROPSHEET 6
  2086. #define CPSFUNC_SET_HSTARTPAGE 7
  2087. #define CPSFUNC_GET_PAGECOUNT 8
  2088. #define CPSFUNC_SET_RESULT 9
  2089. #define CPSFUNC_GET_HPSUIPAGES 10
  2090. #define CPSFUNC_LOAD_CPSUI_STRINGA 11
  2091. #define CPSFUNC_LOAD_CPSUI_STRINGW 12
  2092. #define CPSFUNC_LOAD_CPSUI_ICON 13
  2093. #define CPSFUNC_GET_PFNPROPSHEETUI_ICON 14
  2094. #define CPSFUNC_ADD_PROPSHEETPAGEA 15
  2095. #define CPSFUNC_INSERT_PSUIPAGEA 16
  2096. #define CPSFUNC_INSERT_PSUIPAGEW 17
  2097. #define CPSFUNC_SET_PSUIPAGE_TITLEA 18
  2098. #define CPSFUNC_SET_PSUIPAGE_TITLEW 19
  2099. #define CPSFUNC_SET_PSUIPAGE_ICON 20
  2100. #define CPSFUNC_SET_DATABLOCK 21
  2101. #define CPSFUNC_QUERY_DATABLOCK 22
  2102. #define CPSFUNC_SET_DMPUB_HIDEBITS 23
  2103. #define CPSFUNC_IGNORE_CPSUI_PSN_APPLY 24
  2104. #define CPSFUNC_DO_APPLY_CPSUI 25
  2105. #define CPSFUNC_SET_FUSION_CONTEXT 26
  2106. #define MAX_CPSFUNC_INDEX 26
  2107. #ifdef UNICODE
  2108. #define CPSFUNC_ADD_PCOMPROPSHEETUI CPSFUNC_ADD_PCOMPROPSHEETUIW
  2109. #define CPSFUNC_ADD_PFNPROPSHEETUI CPSFUNC_ADD_PFNPROPSHEETUIW
  2110. #define CPSFUNC_LOAD_CPSUI_STRING CPSFUNC_LOAD_CPSUI_STRINGW
  2111. #define CPSFUNC_ADD_PROPSHEETPAGE CPSFUNC_ADD_PROPSHEETPAGEW
  2112. #define CPSFUNC_INSERT_PSUIPAGE CPSFUNC_INSERT_PSUIPAGEW
  2113. #define CPSFUNC_SET_PSUIPAGE_TITLE CPSFUNC_SET_PSUIPAGE_TITLEW
  2114. #else
  2115. #define CPSFUNC_ADD_PCOMPROPSHEETUI CPSFUNC_ADD_PCOMPROPSHEETUIA
  2116. #define CPSFUNC_ADD_PFNPROPSHEETUI CPSFUNC_ADD_PFNPROPSHEETUIA
  2117. #define CPSFUNC_LOAD_CPSUI_STRING CPSFUNC_LOAD_CPSUI_STRINGA
  2118. #define CPSFUNC_ADD_PROPSHEETPAGE CPSFUNC_ADD_PROPSHEETPAGEA
  2119. #define CPSFUNC_INSERT_PSUIPAGE CPSFUNC_INSERT_PSUIPAGEA
  2120. #define CPSFUNC_SET_PSUIPAGE_TITLE CPSFUNC_SET_PSUIPAGE_TITLEA
  2121. #endif
  2122. //
  2123. // for the CPSFUNC_SET_RESULT
  2124. //
  2125. #define SR_OWNER 0
  2126. #define SR_OWNER_PARENT 1
  2127. typedef struct _SETRESULT_INFO {
  2128. WORD cbSize;
  2129. WORD wReserved;
  2130. HANDLE hSetResult;
  2131. LRESULT Result;
  2132. } SETRESULT_INFO, *PSETRESULT_INFO;
  2133. //
  2134. // This is for CPSFUNC_INSERT_PSUIPAGE
  2135. //
  2136. #define HINSPSUIPAGE_FIRST (HANDLE)0xFFFFFFFE
  2137. #define HINSPSUIPAGE_LAST (HANDLE)0xFFFFFFFF
  2138. #define HINSPSUIPAGE_INDEX(i) (HANDLE)MAKELONG(i, 0);
  2139. #define PSUIPAGEINSERT_GROUP_PARENT 0
  2140. #define PSUIPAGEINSERT_PCOMPROPSHEETUI 1
  2141. #define PSUIPAGEINSERT_PFNPROPSHEETUI 2
  2142. #define PSUIPAGEINSERT_PROPSHEETPAGE 3
  2143. #define PSUIPAGEINSERT_HPROPSHEETPAGE 4
  2144. #define PSUIPAGEINSERT_DLL 5
  2145. #define MAX_PSUIPAGEINSERT_INDEX 5
  2146. #define INSPSUIPAGE_MODE_BEFORE 0
  2147. #define INSPSUIPAGE_MODE_AFTER 1
  2148. #define INSPSUIPAGE_MODE_FIRST_CHILD 2
  2149. #define INSPSUIPAGE_MODE_LAST_CHILD 3
  2150. #define INSPSUIPAGE_MODE_INDEX 4
  2151. typedef struct _INSERTPSUIPAGE_INFO {
  2152. WORD cbSize;
  2153. BYTE Type;
  2154. BYTE Mode;
  2155. ULONG_PTR dwData1;
  2156. ULONG_PTR dwData2;
  2157. ULONG_PTR dwData3;
  2158. } INSERTPSUIPAGE_INFO, *PINSERTPSUIPAGE_INFO;
  2159. //
  2160. // for the CPSFUNC_SET_HSTARTPAGE
  2161. //
  2162. #define SSP_TVPAGE 10000
  2163. #define SSP_STDPAGE1 10001
  2164. #define SSP_STDPAGE2 10002
  2165. typedef LONG_PTR (CALLBACK *PFNCOMPROPSHEET)(HANDLE hComPropSheet,
  2166. UINT Function,
  2167. LPARAM lParam1,
  2168. LPARAM lParam2);
  2169. typedef struct _PSPINFO {
  2170. WORD cbSize;
  2171. WORD wReserved;
  2172. HANDLE hComPropSheet;
  2173. HANDLE hCPSUIPage;
  2174. PFNCOMPROPSHEET pfnComPropSheet;
  2175. } PSPINFO, *PPSPINFO;
  2176. //
  2177. // PPSPINFO_FROM_WM_INITDIALOG_LPARAM(lParam) macro retrieve a pointer to the
  2178. // PSPINFO data structure. the lParam must be the lParam passed to the
  2179. // WM_INITDIALOG, otherwise the system can failed
  2180. //
  2181. #define PPSPINFO_FROM_WM_INITDIALOG_LPARAM(lParam) \
  2182. (PPSPINFO)((LPBYTE)lParam + ((LPPROPSHEETPAGE)lParam)->dwSize)
  2183. //
  2184. // PSPINFO
  2185. //
  2186. // This structure is used durning property sheet page's WM_INITDIALOG message.
  2187. // At WM_INITDIALOG, the lParam is a pointer to the PROPSHEETPAGE, and
  2188. // lParam field in the PROPSHEETPAGE is a pointer to the PSPINFO. the
  2189. // original lParam in the PROPSHEETPAGE is saved in the lParam field in the
  2190. // PSPINFO data structure.
  2191. //
  2192. // When process WM_INITDIALOG message, it should save the lParam (PSPINFO
  2193. // structure pointer) for later to call common UI callback functions.
  2194. //
  2195. //
  2196. // cbSize - Size of this structure in bytes
  2197. //
  2198. // wReserved - Reserved, must be set to zero
  2199. //
  2200. // hComPropSheet - Handle to the parent page which is the hComPropSheet
  2201. // passed to the CPSFUNC_ADD_PROPSHEETPAGE
  2202. //
  2203. // hCPSUIPage - Handle to the this added common UI property sheet page.
  2204. //
  2205. // pfnComPropSheet - Pointer to the common UI callback function, using this
  2206. // function pointer to do CPSFUNC_xxxx
  2207. //
  2208. //
  2209. typedef struct _CPSUIDATABLOCK {
  2210. DWORD cbData;
  2211. LPBYTE pbData;
  2212. } CPSUIDATABLOCK, *PCPSUIDATABLOCK;
  2213. #define APPLYCPSUI_NO_NEWDEF 0x00000001
  2214. #define APPLYCPSUI_OK_CANCEL_BUTTON 0x00000002
  2215. //
  2216. // PFNCOMPROPSHEET function descriptions
  2217. //
  2218. // For each function index, it passed a handle, a Function Index and two (2)
  2219. // long parameters, the 'hComPropSheet' handle passed must be the handle passed
  2220. // from common UI when common UI called the caller supplied function
  2221. //
  2222. // pfnPropSheetUI(pPropSheetUIData);
  2223. //
  2224. // Following are the description of each function index
  2225. //
  2226. //
  2227. // -------------------------------------------------------------------------
  2228. // Function = CPSFUNC_ADD_HPROPSHEETPAGE
  2229. //
  2230. // This function add a page to the hComPropSheet using handle to the
  2231. // PROPSHEETPAGE
  2232. //
  2233. //
  2234. // Parameters:
  2235. //
  2236. // lParam1 - is a handle to the PROPSHEETPAGE that created by the caller
  2237. // using CreatePropertySheetPage()
  2238. //
  2239. // lParam2 - Not used, must be 0
  2240. //
  2241. //
  2242. // Return Value:
  2243. //
  2244. // The return value is the handle of newly added common property sheet
  2245. // page, if return value is NULL then function failed.
  2246. //
  2247. //
  2248. // -------------------------------------------------------------------------
  2249. // Function = CPSFUNC_ADD_PROPSHEETPAGE
  2250. //
  2251. // This function add a page to the hComPropSheet using PROPSHEETPAGE
  2252. // data structure.
  2253. //
  2254. //
  2255. // Parameters:
  2256. //
  2257. // lParam1 - is a pointer to PROPSHEETPAGE data structure
  2258. //
  2259. // lParam2 - Not used.
  2260. //
  2261. //
  2262. // Return Value:
  2263. //
  2264. // The return value is the handle of newly added common property sheet
  2265. // page, if return value is NULL then function failed.
  2266. //
  2267. //
  2268. // -------------------------------------------------------------------------
  2269. // Function = CPSFUNC_ADD_PCOMPROPSHEETUI
  2270. //
  2271. // This function add propety page(s) to the hComPropSheet handle using
  2272. // COMPROPSHEETUI data structure.
  2273. //
  2274. //
  2275. // Parameters:
  2276. //
  2277. // lParam1 - is a pointer to COMPROPSHEETUI data structure
  2278. //
  2279. // lParam2 - pointer to a 32-bit location that received the total pages
  2280. // added by the COMPROPSHEETUI data structure if sucessful else
  2281. // it contains the ERR_CPSUI_xxx error codes.
  2282. //
  2283. //
  2284. // Return Value:
  2285. //
  2286. // The return value is the handle of newly added common property sheet
  2287. // page(s), if return value is NULL then function failed.
  2288. //
  2289. //
  2290. // -------------------------------------------------------------------------
  2291. // Function = CPSFUNC_ADD_PFNPROPSHEETUI
  2292. //
  2293. // This function add property page(s) to the hChild handle using
  2294. // lParam1 as PFNPROPSHEETUI function pointer and lParam2 as the function
  2295. // parameter. The common UI call supplied function as following
  2296. //
  2297. // PROPSHEETUI_INFO PSUIInfo;
  2298. //
  2299. // PSUIInfo.cbSize = sizeof(PROPSHEETUI_INFO);
  2300. // PSUIInfo.Version = PROPSHEETUI_INFO_VERSION;
  2301. // PSUIInfo.Flags = (Ansi) ? 0: PSUIINFO_UNICODE;
  2302. // PSUIInfo.Reason = PROPSHEETUI_REASON_INIT;
  2303. // PSUIInfo.hComPropSheet = hComPropSheet;
  2304. // PSUIInfo.pfnComPropSheet = ComPropSheetUICallBack;
  2305. // PSUIInfo.lParamInit = lParam2;
  2306. // PSUIInfo.UserData = 0;
  2307. // PSUIInfo.Result = 0;
  2308. //
  2309. // ((PFNPROPSHEETUI)lParam1)(&PSUIInfo, lParam2);
  2310. //
  2311. //
  2312. // If the pfnPropSheetUI() need to add/delete any common UI pages then
  2313. // it must use hComPropSheet as its handle when calling the
  2314. // ComPropSheetUICallBack().
  2315. //
  2316. //
  2317. // Parameters:
  2318. //
  2319. // lParam1 - a PFNPROPSHEETUI function pointer.
  2320. //
  2321. // lParam2 - a 32-bit data that will be used as lParam when calling
  2322. // PFNPROPSHEETUI function pointer.
  2323. //
  2324. //
  2325. // Return Value:
  2326. //
  2327. // The return value is the newly added property pages function handle, if
  2328. // return value is NULL then function failed or no page is added.
  2329. //
  2330. //
  2331. //
  2332. // -------------------------------------------------------------------------
  2333. // Function = CPSFUNC_DELETE_HCOMPROPSHEET
  2334. //
  2335. // This function delete child property page(s) from hComPropSheet parent
  2336. // using the child handle passed.
  2337. //
  2338. //
  2339. // Parameters:
  2340. //
  2341. // lParam1 - the handle of common property sheet pages that to be deleted.
  2342. // This handle must be the handle returned from CPSFUNC_ADD_xxx
  2343. // functions.
  2344. //
  2345. // lParam2 - not used, must be 0
  2346. //
  2347. // Return Value:
  2348. //
  2349. // The return value is greater than zero if function sucessful, and less
  2350. // or equal to zero if the function failed.
  2351. //
  2352. // -------------------------------------------------------------------------
  2353. // Function = CPSFUNC_GET_PAGECOUNT
  2354. //
  2355. // This function return total property sheet pages belongs to a common
  2356. // UI property sheet page handle hComPropSheet
  2357. //
  2358. //
  2359. // Parameters:
  2360. //
  2361. // lParam1 - not used, must be 0
  2362. //
  2363. // lParam2 - not used, must be 0.
  2364. //
  2365. //
  2366. // Return Value:
  2367. //
  2368. // The return value is total page count if function sucessful or zero if
  2369. // function failed.
  2370. //
  2371. //
  2372. // -------------------------------------------------------------------------
  2373. // Function = CPSFUNC_SET_RESULT
  2374. //
  2375. // This function set the result of property sheet page to its owner that
  2376. // added this page by CPSFUNC_ADD_xxx function indices
  2377. //
  2378. // Parameters:
  2379. //
  2380. // lParam1 - Handle to the common UI property sheet page that setting the
  2381. // result. If this handle is NULL then it is treated as
  2382. // equal to the hComPropSheet.
  2383. //
  2384. // lParam2 - a 32-bit DWORD result to be set.
  2385. //
  2386. //
  2387. // Return Value:
  2388. //
  2389. // > 0: Successful, return value is total count of parents set the result
  2390. // = 0: There is no owner or parent for the lParam1 handle.
  2391. // < 0: function failed because of invalid lParam1 handle.
  2392. //
  2393. //
  2394. // -------------------------------------------------------------------------
  2395. // Function = CPSFUNC_SET_HSTARTPAGE
  2396. //
  2397. //
  2398. // Parameters:
  2399. //
  2400. // lParam1 - the handle of common property sheet pages that to be set
  2401. // as initial page that appear when the property sheet dialog
  2402. // boxes is created. This handle must be the handle returned
  2403. // from CPSFUNC_ADD_xxx functions.
  2404. //
  2405. // If lParam1 is NULL then lParam2 is a string pointer to the
  2406. // page name (tab) that to be set for the start page
  2407. //
  2408. // lParam2 - a LONG number to specified the children index. if lParam1
  2409. // handle is a parent then lParam2 specified zero base children
  2410. // index for using as start page.
  2411. //
  2412. // It also can be one of following special index
  2413. //
  2414. // SSP_TVPAGE
  2415. //
  2416. // set to the treeview page, this only valid if lParam1
  2417. // handle was added by the CPSFUNC_ADD_PCOMPROPSHEETUI.
  2418. //
  2419. // SSP_STDPAGE
  2420. //
  2421. // Set to the standard document property sheet page
  2422. // (Page 1 user friendly page). this only valid if
  2423. // lParam1 handle was added by the
  2424. // CPSFUNC_ADD_PCOMPROPSHEETUI.
  2425. //
  2426. //
  2427. // Return Value:
  2428. //
  2429. // The return value is greater than zero if function sucessful, and less
  2430. // or equal to zero if the function failed. This function can only be
  2431. // called when the property sheet is not display yet so the place to
  2432. // call is during the PROPSHEETUI_REASON_GET_INFO_HEADER callback.
  2433. //
  2434. // -------------------------------------------------------------------------
  2435. // Function = CPSFUNC_GET_HPSUIPAGES
  2436. //
  2437. // This function return array of children HPROPSHEETPAGE belongs to
  2438. // the parent hComPropSheet UI property sheet page handle hComPropSheet
  2439. //
  2440. //
  2441. // Parameters:
  2442. //
  2443. // lParam1 - Pointer to an array of HPROPSHEETPAGE that to be stored
  2444. // the handle upon return.
  2445. //
  2446. // lParam2 - Count of HPROPSHEETPAGE array pointed by the lParam1
  2447. //
  2448. //
  2449. // Return Value:
  2450. //
  2451. // The return value is total HPROPSHEETPAGE stored in the array pointed
  2452. // by the lParam1. To get all hPropSheetPage for any common property
  2453. // sheet handle's (hCPSUIPage) children, it can use following sequence.
  2454. //
  2455. // if ((cPage = pfnComPropSheet(hComPropSheet,
  2456. // CPSFUNC_GET_PAGECOUNT,
  2457. // (LPARAM)hCPSUIPage,
  2458. // 0L)) &&
  2459. // (phPage = ALLOCMEM(cPage * sizeof(HANDLE)))) {
  2460. //
  2461. // pfnComPropSheet(hCPSUIPage,
  2462. // CPSFUNC_GET_HPSUIPAGES,
  2463. // (LPARAM)phPage,
  2464. // (LPARAM)cPage);
  2465. // }
  2466. //
  2467. // -------------------------------------------------------------------------
  2468. // Function = CPSFUNC_LOAD_CPSUI_STRING
  2469. //
  2470. // This function load the common property sheet UI resource string
  2471. //
  2472. // Parameters:
  2473. //
  2474. // lParam1 - Pointer to LPTSTR string which will stored the loaded
  2475. // resource string from the common property sheet UI DLL.
  2476. //
  2477. // lParam2 - LOWORD(lParam2) = Count of characters (includes null
  2478. // terminator) which pointed by the lParam1
  2479. //
  2480. // HIWORD(lParam2) = Common property sheet UI predefined string
  2481. // resource ID as IDS_CPSUI_xxxx
  2482. //
  2483. //
  2484. // Return Value:
  2485. //
  2486. // > 0: Total characters stored in the string pointed by the lParam1, this
  2487. // is not includes the null terminator
  2488. // = 0: Invalid IDS_CPSUI_xxx passed from HIWORD(lParam)
  2489. // < 0: Either lParam1 is NULL or count of character is 0 from
  2490. // LOWORD(lParam2)
  2491. //
  2492. //
  2493. // -------------------------------------------------------------------------
  2494. // Function = CPSFUNC_LOAD_CPSUI_ICON
  2495. //
  2496. // This function load the common property sheet UI resource icon.
  2497. //
  2498. // Parameters:
  2499. //
  2500. // lParam1 - Common property sheet UI predefined icon resource ID as
  2501. // IDI_CPSUI_xxxx.
  2502. //
  2503. // lParam2 - LOWORD(lParam2) = cx icon size in pixel. If zero then
  2504. // SM_CXICON is used
  2505. // HIWORD(lParam2) = cy icon size in pixel. If zero then
  2506. // SM_CYICON is used
  2507. //
  2508. //
  2509. // Return Value:
  2510. //
  2511. // Return value is the handle to the hIcon if function succeed, a NULL
  2512. // if function failed. The caller must call DestroyIcon() when it no
  2513. // longer need to use the hIcon returned
  2514. //
  2515. //
  2516. // -------------------------------------------------------------------------
  2517. // Function = CPSFUNC_GET_PFNPROPSHEETUI_ICON
  2518. //
  2519. // This function let the caller return hIcon of its children pages that
  2520. // was added by CPSFUNC_ADD_PFNPROPSHEETUI
  2521. //
  2522. // Parameters:
  2523. //
  2524. // lParam1 - Handle of common property sheet pages that the hIcon will be
  2525. // queried. This handle must be the handle returned from
  2526. // CPSFUNC_ADD_PFNPROPSHEETUI function.
  2527. //
  2528. // lParam2 - LOWORD(lParam2) = cx icon size in pixel. If zero then
  2529. // SM_CXICON is used
  2530. // HIWORD(lParam2) = cy icon size in pixel. If zero then
  2531. // SM_CYICON is used
  2532. //
  2533. //
  2534. // Return Value:
  2535. //
  2536. // Return value is the handle to the hIcon if function succeed, a NULL
  2537. // if function failed. The caller must call DestroyIcon() when it no
  2538. // longer need to use the hIcon returned
  2539. //
  2540. //
  2541. // -------------------------------------------------------------------------
  2542. // Function = CPSFUNC_INSERT_PSUIPAGE
  2543. //
  2544. // This function let the caller insert common property sheet pages at
  2545. // set position. The hComPropSheet must be the parent handle.
  2546. //
  2547. // Parameters:
  2548. //
  2549. // lParam1 - Handle of common property sheet pages that the page position
  2550. // will be inserted. This handle must be the handle returned
  2551. // from previous CPSFUNC_ADD_xxx or CPSFUNC_INSERT_PSUIPAGE that
  2552. // added or inserted using the hComPropSheet if the Mode field
  2553. // in INSPSUIPAGE_INFO data structure is one of the follwing
  2554. //
  2555. // INSPSUIPAGE_MODE_BEFORE
  2556. // INSPSUIPAGE_MODE_AFTER - Common UI page handle
  2557. //
  2558. // INSPSUIPAGE_MODE_INDEX - the lParam1 is an zero based
  2559. // child index.
  2560. //
  2561. // INSPSUIPAGE_MODE_FIRST_CHILD
  2562. // INSPSUIPAGE_MODE_LAST_CHILD - The lParam1 is ignonred.
  2563. //
  2564. //
  2565. // If lParam1 is a valid common property sheet page handle then
  2566. // it is the child page handle of hComPropSheet that added by
  2567. // CPSFUNC_ADD_xxx or inserted by CPSFUNC_INSERT_PSUIPAGE.
  2568. //
  2569. // lParam2 - A pointer that points to INSERTPSUIPAGE_INFO data structure.
  2570. // Fields must set according to the following.
  2571. //
  2572. // cbSize - size of this structure
  2573. //
  2574. // Type - Type of page(s) to be inserted. It can be one
  2575. // of the following
  2576. //
  2577. // PSUIPAGEINSERT_GROUP_PARENT
  2578. //
  2579. // Insert a group parent that can be used to insert
  2580. // new pages under it. This is typically used when
  2581. // a set of common UI pages must be group together and
  2582. // can be deleted later using a single group parent
  2583. // handle without individual deleting each page.
  2584. //
  2585. // This handle can be nested. After this function
  2586. // returned the group parent handle, it can be used
  2587. // as hComPropSheet handle (first parameter in the
  2588. // common UI callback) as parent handle so insertion
  2589. // will be inserted at level below returned group
  2590. // parent handle.
  2591. //
  2592. //
  2593. // PSUIPAGEINSERT_PCOMPROPSHEETUI
  2594. //
  2595. // Insert pages using COMPROPSHEETUI data structure,
  2596. // dwData1 is a pointer to the COMPROPSHEETUI data
  2597. // structure.
  2598. //
  2599. //
  2600. // PSUIPAGEINSERT_PFNPROPSHEETUI
  2601. //
  2602. // Insert pages using PFNPROPSHEETUI function pointer.
  2603. // The dwData1 is a PFNPROPSHEETUI function pointer.
  2604. // The common UI will call this pfnPropSheetUI()
  2605. // function pointer with PROPSHEETUI_REASON_INIT to
  2606. // have it add pages.
  2607. //
  2608. // When common UI call pfnPropSheetUI() (dwData1) it
  2609. // also passed a 32-bit parameter from the dwData2
  2610. // field in INSERTPSUIPAGE_INFO data structure.
  2611. //
  2612. //
  2613. // PSUIPAGEINSERT_PROPSHEETPAGE
  2614. //
  2615. // Insert pages using PROPSHEETPAGE data structure.
  2616. // The dwData1 is a pointer to the PROPSHEETPAGE
  2617. // data structure.
  2618. //
  2619. //
  2620. // PSUIPAGEINSERT_HPROPSHEETPAGE
  2621. //
  2622. // Insert pages using HPROPSHEETPAGE handle. The
  2623. // dwData1 is a PROPSHEETPAGE handle which was
  2624. // created by CreatePropertySheetPage().
  2625. //
  2626. //
  2627. // PSUIPAGEINSERT_DLL
  2628. //
  2629. // Insert pages from a dynnmaic link library. The
  2630. // dwData1 is a pointer to a null terminated string
  2631. // that specified the dynamic link library file name.
  2632. //
  2633. // The dwData2 is a pointer to a null terminated ASCII
  2634. // string that specified the pfnPropSheetUI function
  2635. // name. (MUST BE ASCII STRING)
  2636. //
  2637. // Common UI will do a LoadLibrary((LPTSTR)dwData1),
  2638. // pfnPropSheetUI = GetProcAddress((LPTSTR)dwData2)
  2639. // then call the pfnPropSheetUI with a lParam from
  2640. // dwData3. The called reason from common UI is
  2641. // set to PROPSHEETUI_REASON_INIT.
  2642. //
  2643. // Using this method insert pages will guaranteed that
  2644. // library will be unload correctly.
  2645. //
  2646. //
  2647. // Mode - Insert Mode, it can be one of the following
  2648. //
  2649. //
  2650. // INSPSUIPAGE_MODE_BEFORE
  2651. //
  2652. // Insert pages before the common property sheet page
  2653. // handle specified by lParam1
  2654. //
  2655. //
  2656. // INSPSUIPAGE_MODE_AFTER
  2657. //
  2658. // Insert pages after the common property sheet page
  2659. // handle specified by lParam1
  2660. //
  2661. //
  2662. // INSPSUIPAGE_MODE_FIRST_CHILD
  2663. //
  2664. // Insert pages as the first child of hComPropSheet
  2665. // parent handle, the lParam1 is ignored
  2666. //
  2667. //
  2668. // INSPSUIPAGE_MODE_LAST_CHILD
  2669. //
  2670. // Insert pages as the last child of hComPropSheet
  2671. // parent handle, the lParam1 is ignored
  2672. //
  2673. //
  2674. // INSPSUIPAGE_MODE_INDEX
  2675. //
  2676. // Insert pages as a zero base child index of its
  2677. // parent handle specified by hComPropSheet.
  2678. //
  2679. // The lParam1 is the zero based index special handle
  2680. // that must generated by HINSPSUIPAGE_INDEX(Index)
  2681. // macro. If the index is greater than or equal to
  2682. // the total count of children then it will treat the
  2683. // mode same as INSPSUIPAGE_MODE_LAST_CHILD
  2684. //
  2685. //
  2686. // dwData1
  2687. // dwData2
  2688. // dwData3 - 32-bit data associate with the 'Type' field
  2689. // as following
  2690. //
  2691. //
  2692. // PSUIPAGEINSERT_GROUP_PARENT
  2693. //
  2694. // dwData1 = Not used, must be 0
  2695. // dwData2 = Not used, must be 0
  2696. // dwData3 = Not used, must be 0
  2697. //
  2698. //
  2699. // PSUIPAGEINSERT_PCOMPROPSHEETUI
  2700. //
  2701. // dwData1 = pointer to COMPORPSHEETUI data structure.
  2702. // dwData2 = at return if sucessful, it contains total
  2703. // page added. If failed, it contains the
  2704. // ERR_CPSUI_xxx codes
  2705. // dwData3 = Not used, must be 0
  2706. //
  2707. //
  2708. // PSUIPAGEINSERT_PFNPROPSHEETUI
  2709. //
  2710. // dwData1 = PFNPROPSHEETUI function pointer
  2711. // dwData2 = 32-bit parameter passed to pfnPropSheetUI
  2712. // dwData3 = Not used, must be 0
  2713. //
  2714. //
  2715. // PSUIPAGEINSERT_PROPSHEETPAGE
  2716. //
  2717. // dwData1 = Pointer to PROPSHEETPAGE data structure.
  2718. // dwData2 = not used, must be 0
  2719. // dwData3 = not used, must be 0
  2720. //
  2721. //
  2722. // PSUIPAGEINSERT_HPROPSHEETPAGE
  2723. //
  2724. // dwData1 = Is the HPROPSHEETPAGE handle that created
  2725. // by a call to CreatePropertySheetPage().
  2726. // dwData2 = not used, must be 0
  2727. // dwData3 = not used, must be 0
  2728. //
  2729. //
  2730. // PSUIPAGEINSERT_DLL
  2731. //
  2732. // dwData1 = Pointer to a null terminated dynamic link
  2733. // library filename.
  2734. // dwData2 = Pointer to a null terminated function
  2735. // name (PFNPROPSHEETUI) in the dynamin link
  2736. // library.
  2737. // dwData3 = 32-bit parameter passed to pfnPropSheetUI
  2738. // (PFNPROPSHEETUI) function from dwData2
  2739. //
  2740. //
  2741. // Return Value:
  2742. //
  2743. // The return value is the handle of newly added common property sheet
  2744. // page(s), if return value is NULL then function failed.
  2745. //
  2746. //
  2747. // -------------------------------------------------------------------------
  2748. // Function = CPSFUNC_SET_PSUIPAGE_TITLE
  2749. //
  2750. // This function let the caller set a new title for a particular common
  2751. // UI page title (on the property sheet page tab)
  2752. //
  2753. // Parameters:
  2754. //
  2755. // lParam1 - the handle of common property sheet pages that title to be
  2756. // set. This handle must be the handle returned from following
  2757. //
  2758. // CPSFUNC_ADD_PROPSHEETPAGE
  2759. // CPSFUNC_ADD_HPROPSHEETPAGE
  2760. // CPSFUNC_INSERT_PSUIPAGE with type of
  2761. // PSUIPAGEINSERT_PROPSHEETPAGE or
  2762. // PSUIPAGEINSERT_HPROPSHEETPAGE
  2763. //
  2764. // lParam2 - Pointer to a null terminated string for the new title
  2765. //
  2766. //
  2767. // Return Value:
  2768. //
  2769. // The return value is greater than zero if function sucessful, and less
  2770. // or equal to zero if the function failed.
  2771. //
  2772. // This function will returned 0 if the property sheet pages is not
  2773. // currently displayed.
  2774. //
  2775. //
  2776. // -------------------------------------------------------------------------
  2777. // Function = CPSFUNC_SET_PSUIPAGE_ICON
  2778. //
  2779. // This function let the caller set a new icon for a particular common
  2780. // UI page icon (on the property sheet page tab)
  2781. //
  2782. // Parameters:
  2783. //
  2784. // lParam1 - the handle of common property sheet pages that icon to be
  2785. // set. This handle must be the handle returned from following
  2786. //
  2787. // CPSFUNC_ADD_PROPSHEETPAGE
  2788. // CPSFUNC_ADD_HPROPSHEETPAGE
  2789. // CPSFUNC_INSERT_PSUIPAGE with type of
  2790. // PSUIPAGEINSERT_PROPSHEETPAGE or
  2791. // PSUIPAGEINSERT_HPROPSHEETPAGE
  2792. //
  2793. // lParam2 - Handle to Icon, this icon is best as 16x16 icon otherwise it
  2794. // will be stretch to 16x16 (pixel).
  2795. //
  2796. //
  2797. // Return Value:
  2798. //
  2799. // The return value is greater than zero if function sucessful, and less
  2800. // or equal to zero if the function failed.
  2801. //
  2802. // This function will returned 0 if the property sheet pages is not
  2803. // currently displayed.
  2804. //
  2805. // After this function is successful set the icon, the caller can destroy
  2806. // the hIcon using DestroyIcon() if the hIcon is created by CreateIcon().
  2807. // If the hIcon (lParam2) passed is using LoadIcon() then it does not need
  2808. // to destroy the icon.
  2809. //
  2810. // -------------------------------------------------------------------------
  2811. //
  2812. // Function = CPSFUNC_SET_DATABLOCK
  2813. //
  2814. // This function let the caller register a new data block so it can be
  2815. // later query by other pages in the property sheet, this function should
  2816. // call durning PSN_KILLACTIVE message
  2817. //
  2818. // Parameters:
  2819. //
  2820. // lParam1 - pointer CPSUIDATABLOCK structure which speicifed the buffer
  2821. // and size for queried datablock identify by lParam2 to be set.
  2822. //
  2823. // lParam2 - DWORD Identifier of data block to be set
  2824. //
  2825. //
  2826. // Return Value:
  2827. //
  2828. // The return value is greater than zero if function sucessful which
  2829. // indicate total bytes of data block registered. If return value is less
  2830. // or equal to zero then function failed and data block is not registered.
  2831. //
  2832. // If lParam1 is NULL, (lParam1)->cbData or (lParam1)->pbbData is NULL
  2833. // it return a -1 to indicate an error parameter passed.
  2834. //
  2835. // -------------------------------------------------------------------------
  2836. //
  2837. // Function = CPSFUNC_QUERY_DATABLOCK
  2838. //
  2839. // This function let the caller query a registered data block so it can
  2840. // used this data block to communicate between property sheet pages.
  2841. // This function should call durning PSN_SETACTIVE message
  2842. //
  2843. // Parameters:
  2844. //
  2845. // lParam1 - pointer CPSUIDATABLOCK structure which speicifed the buffer
  2846. // and size for queried datablock identify by lParam2
  2847. //
  2848. // lParam2 - DWORD Identifier of data block to be queried
  2849. //
  2850. //
  2851. // Return Value:
  2852. //
  2853. // The return value is greater than zero if function sucessful which
  2854. // indicate total bytes of data block copied into the pointer pointed by
  2855. // the lParam1. If return value is less or equal to zero then function
  2856. // failed and data block is not copied to diciate the spcified datablock
  2857. // Identifier (lParam2) is not found.
  2858. //
  2859. // If CPSUIDATABLOCK pointer (lParam1) is NULL, (lParam1)->cbData or
  2860. // (lParam1)->pbData is NULL then return value is the total bytes required
  2861. // to copy the specified datablock identifier, if return value is less or
  2862. // equal to zero then it indicate the spcified datablock identifier is
  2863. // not found.
  2864. //
  2865. // -------------------------------------------------------------------------
  2866. //
  2867. // Function = CPSFUNC_SET_DMPUB_HIDEBITS
  2868. //
  2869. // This function let the caller hide a set of predefined OPTITEMS in the
  2870. // pages that was created using PSUIPAGEINSERT_PCOMPROPSHEETUI or
  2871. // CPSFUNC_ADD_PCOMPROPSHEETUI with pDlgPage equal to
  2872. // CPSUI_PDLGPAGE_DOCPROP or CPSUI_PDLGPAGE_ADVDOCPROP.
  2873. //
  2874. // This function MUST called BEFORE the DOCPROP or ADVDOCPROP property
  2875. // sheet pages are added using PSUIPAGEINSERT_PCOMPROPSHEETUI or
  2876. // CPSFUNC_ADD_PCOMPROPSHEETUI.
  2877. //
  2878. // Parameters:
  2879. //
  2880. // lParam1 - prdefined bit array masks to specified which DOCPROP item to
  2881. // be hidden. Each DMPUB item bit can be generate using macro
  2882. // MAKE_DMPUB_HIDEBIT() and all items can be OR together.
  2883. //
  2884. // lParam2 - Not used, MUST be 0
  2885. //
  2886. //
  2887. // Return Value:
  2888. //
  2889. // The return value is equal to lParam1 if this function is called before
  2890. // DOCPROP or ADVDOCPROP pages are added. Return value is zero if these
  2891. // pages already added which means failure.
  2892. //
  2893. // -------------------------------------------------------------------------
  2894. //
  2895. // Function = CPSFUNC_IGNORE_CPSUI_PSN_APPLY
  2896. //
  2897. // This function let caller control how CPSUI process PSN_APPLY messages
  2898. // for pages added through CPSFUNC_ADD_PCOMPROPSHEETUI or
  2899. // CPSFUNC_INSERT_PSUIPAGE with type of PSUIPAGEINSERT_PROPSHEETPAGE.
  2900. //
  2901. // If this function never called, the Default CPSUI behavior is to process
  2902. // PSN_APPLY messages.
  2903. //
  2904. // Parameters:
  2905. //
  2906. // lParam1 - Handle to the page returned from pages added by using
  2907. // CPSFUNC_ADD_PCOMPROPSHEETUI or CPSFUNC_INSERT_PSUIPAGE with
  2908. // type of PSUIPAGEINSERT_PROPSHEETPAGE.
  2909. //
  2910. // lParam2 - A non-zero value indicate to IGNORE the PSN_APPLY messages
  2911. // for pages handle of lParam1.
  2912. //
  2913. // A zero value to have CPSUI nomally process (not ignored) the
  2914. // PSN_APPLY messages for pages handle of lParam1.
  2915. //
  2916. // WARNING: if a PSN_APPLY messages are ignored, the caller must
  2917. // simulate a PSN_APPLY using CPSFUNC_DO_APPLY_CPSUI
  2918. // function or all changes WILL NOT applied, this is
  2919. // true even user hit 'OK' button.
  2920. //
  2921. // Return Value:
  2922. //
  2923. // the return value is zero if function failed, or non-zero to indicate
  2924. // the function is successful.
  2925. //
  2926. // -------------------------------------------------------------------------
  2927. //
  2928. // Function = CPSFUNC_DO_APPLY_CPSUI
  2929. //
  2930. // This function let caller simulate an apply (PSN_APPLY) to the pages
  2931. // which added through CPSFUNC_ADD_PCOMPROPSHEETUI or
  2932. // CPSFUNC_INSERT_PSUIPAGE with type of PSUIPAGEINSERT_PROPSHEETPAGE.
  2933. //
  2934. // Parameters:
  2935. //
  2936. // lParam1 - Handle to the page returned from pages added by using
  2937. // CPSFUNC_ADD_PCOMPROPSHEETUI or CPSFUNC_INSERT_PSUIPAGE with
  2938. // type of PSUIPAGEINSERT_PROPSHEETPAGE.
  2939. //
  2940. // lParam2 - 32-bit flag to indicate how to do apply, currently only
  2941. //
  2942. // APPLYCPSUI_NO_NEWDEF
  2943. //
  2944. // The APPLYCPSUI_NO_NEWDEF bit specified that after the
  2945. // apply is done the undo buffer for all OPTITEMs still
  2946. // remain unchanged, this make next undo still possible.
  2947. //
  2948. // If APPLYCPSUI_NO_NEWDEF bit is clear then undo buffers
  2949. // are re-initialized after apply is done, the current
  2950. // changes for all OPTITEMs become the new undo default.
  2951. //
  2952. //
  2953. // APPLYCPSUI_OK_CANCEL_BUTTON
  2954. //
  2955. // If bit is set then it specified the apply is simulate
  2956. // a user hit 'Ok' or 'Cancel' button, if this bit is
  2957. // clear then it simulate a user hit 'Close' or 'Apply'
  2958. // button. If caller getting a PSN_APPLY message, it can
  2959. // simulated using passed PSHNOTIFY (passed as lParam in
  2960. // WM_NOTIFY message) structure to determine how to set
  2961. // this bit as follow.
  2962. //
  2963. // if PSHNOTIFY.lParam == 0, then clear this bit
  2964. // otherwise set this bit.
  2965. //
  2966. //
  2967. // Return Value:
  2968. //
  2969. // the return value is less or equal to zero if it encounter an error and
  2970. // apply failed (the active page will be switch to these pages).
  2971. //
  2972. // If return value is greater than zero then changes were applied and
  2973. // function sucessful.
  2974. //
  2975. // -------------------------------------------------------------------------
  2976. //
  2977. // Function = CPSFUNC_SET_FUSION_CONTEXT
  2978. //
  2979. // This function is used to set a fusion activation context for
  2980. // the specified page.
  2981. //
  2982. // Parameters:
  2983. //
  2984. // lParam1 - handle to fusion context. compstui duplicates the handle
  2985. // prior attaching it to its internal structures, so the caller
  2986. // is not bound to keep the handle around. we release the
  2987. // passed in context handle when the compstui handle is deleted.
  2988. //
  2989. // lParam2 - not used
  2990. //
  2991. // Return Value:
  2992. //
  2993. // the return value is less or equal to zero if it encounter an error and/or
  2994. // something failed (look up the last error for details).
  2995. //
  2996. // If return value is greater than zero then the call was sucessful.
  2997. //
  2998. // -------------------------------------------------------------------------
  2999. //
  3000. #define PROPSHEETUI_REASON_INIT 0
  3001. #define PROPSHEETUI_REASON_GET_INFO_HEADER 1
  3002. #define PROPSHEETUI_REASON_DESTROY 2
  3003. #define PROPSHEETUI_REASON_SET_RESULT 3
  3004. #define PROPSHEETUI_REASON_GET_ICON 4
  3005. #define MAX_PROPSHEETUI_REASON_INDEX 4
  3006. #define PROPSHEETUI_INFO_VERSION 0x0100
  3007. #define PSUIINFO_UNICODE 0x0001
  3008. typedef struct _PROPSHEETUI_INFO {
  3009. WORD cbSize;
  3010. WORD Version;
  3011. WORD Flags;
  3012. WORD Reason;
  3013. HANDLE hComPropSheet;
  3014. PFNCOMPROPSHEET pfnComPropSheet;
  3015. LPARAM lParamInit;
  3016. ULONG_PTR UserData;
  3017. ULONG_PTR Result;
  3018. } PROPSHEETUI_INFO, *PPROPSHEETUI_INFO;
  3019. //
  3020. // For the PROPSHEETUI_REASON_GET_ICON call which lParam is a pointer to
  3021. // PROPSHEETUI_GETICON_INFO
  3022. //
  3023. typedef struct _PROPSHEETUI_GETICON_INFO {
  3024. WORD cbSize;
  3025. WORD Flags;
  3026. WORD cxIcon;
  3027. WORD cyIcon;
  3028. HICON hIcon;
  3029. } PROPSHEETUI_GETICON_INFO, *PPROPSHEETUI_GETICON_INFO;
  3030. typedef LONG (FAR *PFNPROPSHEETUI)(PPROPSHEETUI_INFO pPSUIInfo,
  3031. LPARAM lParam);
  3032. //
  3033. // PFNPROPSHEETUI
  3034. //
  3035. // This function is user defined function which will be called by the common
  3036. // UI when a caller wish to include the executable property sheets.
  3037. //
  3038. // pPSUIInfo - Pointer to PROPSHEETUI_INFO below for description of
  3039. // PROPSHEETUI_INFO.
  3040. //
  3041. // If this pointer is NULL then this function is not called from
  3042. // common UI, and lParam should be used to determined the
  3043. // action and outcome of this funciton.
  3044. //
  3045. // lParam - A LPARAM intented for this funciton depends on the reason.
  3046. // If pPSUIInfo is NULL then this function is not called from
  3047. // common UI, the lParam is the parameter which agreed with
  3048. // the caller.
  3049. //
  3050. // if pPSUIInfo is not NULL then this function assume the call
  3051. // is from the common UI. lParam has following meanion depends
  3052. // on the reason field.
  3053. //
  3054. // PROPSHEETUI_REASON_INIT
  3055. //
  3056. // The lParam is either passed from CPSFUNC_ADD_PFNPROPSHEETUI
  3057. // callback function's second parameter (lParam2) or it is
  3058. // from CommonPropertySheetUI()'s lParam (seccond parameter)
  3059. // without any modification.
  3060. //
  3061. // The lParam MUST NOT be a variable or a pointer to memory
  3062. // block which resides on the caller function's stack, since
  3063. // after this function exit, the lParam will become invalid
  3064. // and can cause fatal system error.
  3065. //
  3066. // The lParam parameter is copied to the lParamInit field in
  3067. // PROPSHEETUI_INFO data structure. The lParamInit field
  3068. // will be passed to all subsequent pfnPropSheetUI() calls
  3069. // without any modification.
  3070. //
  3071. //
  3072. // PROPSHEETUI_REASON_GET_INFO_HEADER:
  3073. //
  3074. // lParam is a pointer to the PROPSHEETUI_INFO_HEADER data
  3075. // structure. this function must correctly fill this structure
  3076. // fields before it returned.
  3077. //
  3078. //
  3079. // PROPSHEETUI_REASON_DESTROY
  3080. //
  3081. // lParam is zero to indicate the destroy is cause either by a
  3082. // caller calling CPSFUNC_DELETE_HCOMPROPSHEET or failed
  3083. // in caller's CPSFUNC_ADD_xxxx.
  3084. //
  3085. // lParam is non zero to indicate the destroy is cause by
  3086. // exiting from the property sheet user interface.
  3087. //
  3088. //
  3089. // PROPSHEETUI_REASON_SET_RESULT
  3090. //
  3091. // lParam is a pointer to SETRESULT_INFO data structure.
  3092. // Fields in SETRESULT_INFO data structure is set to following
  3093. //
  3094. // hSetResult: Handle to the common UI property sheet
  3095. // pages which added by the CPSFUNC_ADD_xxx
  3096. // callback function indices.
  3097. //
  3098. // Result: The result from the hSetResult to be set.
  3099. // When return greater than zero then Result
  3100. // in this field is set to its parent.
  3101. //
  3102. //
  3103. // PROPSHEETUI_REASON_GET_ICON
  3104. //
  3105. // lParam is a pointer to PROPSHEETUI_GETICON_INFO data
  3106. // structure. Fields in PROPSHEETUI_GETICON_INFO data
  3107. // structure are set to following
  3108. //
  3109. // cxIcon = cx Icon size in pixel
  3110. // cyIcon = cy Icon size in pixel
  3111. // hIcon = Initial to NULL, and this function must put
  3112. // the created icon handle in this field before
  3113. // returned.
  3114. //
  3115. //
  3116. // PROPSHEETUI_INFO
  3117. //
  3118. // This structure is used when common UI calling the caller passed function
  3119. // entry point PFNPROPSHEETUI, the pfnPropSheetUI() return a LONG to
  3120. // indicate result of this function.
  3121. //
  3122. // When the pfnPropSheetUI() returned, it must also put the required result
  3123. // in the Result field, each PROPSHEETUI_REASON_xxx has different required
  3124. // result as describe below.
  3125. //
  3126. //
  3127. //
  3128. // cbSize - sizeof this structure (PROPSHEETUI_INFO)
  3129. //
  3130. // Version - the PROPSHEETUI_INFO data structure version. Current
  3131. // version is set to PROPSHEETUI_INFO_VERSION
  3132. //
  3133. // Flags - One or more following is may be defined
  3134. //
  3135. // PSUIINFO_UNICODE
  3136. //
  3137. // The caller's executable was original compiled was
  3138. // intented using unicode.
  3139. //
  3140. //
  3141. // Reason - Following reasons are defined.
  3142. //
  3143. // PROPSHEETUI_REASON_INIT
  3144. //
  3145. // When first time the pfnPropSheetUI() called, this
  3146. // reason is used to have the function initialize
  3147. // itself and use the pfnComPropSheet() function
  3148. // pointer provided to add new pages to the
  3149. // hComPropSheet handle passed. The UserData in this
  3150. // data structure is initially set equal to zero (0).
  3151. //
  3152. // * Return > 0 to indicate sucesful and <= 0 to
  3153. // indicate error.
  3154. //
  3155. // *NOTE*
  3156. //
  3157. // The lParam MUST NOT be a variable or a pointer to
  3158. // memory block which resides on the caller function's
  3159. // stack, since after this function exit, the lParam
  3160. // will become invalid and can cause fatal system
  3161. // error.
  3162. //
  3163. // If this function reason returned failed ( <= 0),
  3164. // this function (pfnPropSheetUI) will received a
  3165. // PROPSHEETUI_REASON_DESTROY function reason right
  3166. // after this function reason returned.
  3167. //
  3168. //
  3169. // PROPSHEETUI_REASON_GET_INFO_HEADER
  3170. //
  3171. // It is called after the PROPSHEETUI_REASON_INIT is
  3172. // successful returned. This reason is used to asked
  3173. // the function fill in the PROPSHEETUI_INFO_HEADER
  3174. // for pop-up the property sheet dialog boxes.
  3175. //
  3176. // lParam in this reason is a pointer to the
  3177. // PROPSHEETUI_INFO_HEADER data structure, following
  3178. // fields are requrested to be filled in.
  3179. //
  3180. // Flags - PSUIHDRF_xxx flags
  3181. // pTitle - The property sheet title
  3182. // hWndParent - handle to the parent of property
  3183. // sheet pages.
  3184. // hInst - Instance data handle for this
  3185. // function.
  3186. // hIcon
  3187. // IconID - Icon used on the title bar.
  3188. //
  3189. // * Return > 0 to indicate sucesful and pop-up the
  3190. // property sheet dialog boxes or returned <= 0 to
  3191. // indicate error (not property sheet UI appeared)
  3192. //
  3193. //
  3194. // PROPSHEETUI_REASON_DESTROY
  3195. //
  3196. // When the property sheet ready to dismissed or the
  3197. // caller is delete the common UI pages added by the
  3198. // pfnPropSheetUI(), the common UI will call this
  3199. // entry point to have it de-initialized itself and
  3200. // free up all the memory used for this function
  3201. // instance. The UserData field passed is the
  3202. // 'UserData' field which returned from previous
  3203. // PROPSHEETUI_REASON_xxxx.
  3204. //
  3205. // When this function called, all hComPropSheet's
  3206. // children are desotroyed and children's common UI
  3207. // handles are not longer valid.
  3208. //
  3209. // * Return > 0 to indicate sucesful and <= 0 to
  3210. // indicate error.
  3211. //
  3212. //
  3213. // PROPSHEETUI_REASON_SET_RESULT
  3214. //
  3215. // The reason is used when an added handle from
  3216. // CPSFUNC_ADD_xxxx whant to return the result to
  3217. // this pfnPropSheetUI() caller.
  3218. //
  3219. // The lParam in second parameter is a pointer to a
  3220. // SETRESULT_INFO data structure.
  3221. //
  3222. // hSetResult: specified the common UI property
  3223. // sheet page handle which added by
  3224. // this function using
  3225. // CPSFUNC_ADD_xxx indicies.
  3226. //
  3227. // Result: Specified the Result to be set to
  3228. // this pfnPropSheetUI() form the
  3229. // hSetResult property sheet page
  3230. // handle. If return value is greater
  3231. // than zero then the value in this
  3232. // Result field will be set to its
  3233. // parent if one exist, at this case
  3234. // this function can alter the Result
  3235. // field value for its parent.
  3236. //
  3237. // * Returned greater than zero to continue send to
  3238. // its parent, else it stop sending the Result filed
  3239. // value to its parent.
  3240. //
  3241. //
  3242. // PROPSHEETUI_REASON_GET_ICON
  3243. //
  3244. // The reason is used to retrived the Icon which
  3245. // represent this pfnPropSheetUI().
  3246. //
  3247. // lParam is a pointer to PROPSHEETUI_GETICON_INFO '
  3248. // data structure. Fields in PROPSHEETUI_GETICON_INFO
  3249. // data structure are set to following
  3250. //
  3251. // cxIcon = cx Icon size in pixel
  3252. // cyIcon = cy Icon size in pixel
  3253. // hIcon = Initial to NULL, and this function
  3254. // must put the created icon handle in
  3255. // this field before return.
  3256. //
  3257. //
  3258. // * Return > 0 to indicate sucesful (hIcon is the
  3259. // requested icon handle). Return = 0 to indicate
  3260. // no icon available, or return < 0 to indicate an
  3261. // error.
  3262. //
  3263. // *NOTE*
  3264. //
  3265. // * For all PROPSHEETUI_REASON_xxx, the function can set new
  3266. // user defined DWORD data in the PROPSHEETUI_INFO data
  3267. // structure's UserData field.
  3268. //
  3269. // * For all PROPSHEETUI_REASON_xxx, the function can set new
  3270. // pfnPropSheetUI() DWORD result in PROPSHEETUI_INFO data
  3271. // structure's Result field.
  3272. //
  3273. //
  3274. // hComPropSheet - Handle to the COMPROPSHEETPAGE which this function should
  3275. // used as hComPropSheet parameter when calling
  3276. // pfnComPropSheet() to add or delete common UI property
  3277. // sheet pages. The hComPropSheet is the instance handle to
  3278. // pfnPropSheetUI() function.
  3279. //
  3280. // pfnComPropSheet - Pointer to the common UI callback function which for the
  3281. // pfnPropSheetUI() to add, delete, set user data, for a
  3282. // completed set of callback, see CPSFUNC_xxx descriptions
  3283. // above.
  3284. //
  3285. // lParamInit - The lParam originally passed duning the the first call
  3286. // reason PROPSHEETUI_REASON_INIT. The lParamInit will be
  3287. // passed to each PROPSHEETUI_REASON_xxx calls.
  3288. //
  3289. // UserData - the UserData field is an IN and OUT parameter for each
  3290. // of the Reason,
  3291. //
  3292. // PROPSHEETUI_REASON_INIT
  3293. //
  3294. // IN: Initial set to zero (0).
  3295. //
  3296. // OUT: Specified new callee's own user data which
  3297. // will be passed back to other reason calls.
  3298. //
  3299. //
  3300. // PROPSHEETUI_REASON_DESTROY
  3301. // PROPSHEETUI_REASON_SET_RESULT
  3302. // PROPSHEETUI_REASON_GET_INFO_HEADER
  3303. //
  3304. // IN: The UserData specified at time when returned
  3305. // from the previous PROPSHEETUI_REASON_xxx
  3306. //
  3307. // OUT: Specified new callee's own user data which
  3308. // will be passed back to other reason calls.
  3309. //
  3310. //
  3311. // Result - The Result field is an IN and OUT parameter for each of
  3312. // the reason.
  3313. //
  3314. // PROPSHEETUI_REASON_INIT
  3315. //
  3316. // IN: Set to zero (0).
  3317. //
  3318. // OUT: Set to default result of this PropSheetUI()
  3319. // function.
  3320. //
  3321. //
  3322. // PROPSHEETUI_REASON_DESTROY
  3323. // PROPSHEETUI_REASON_GET_INFO_HEADER
  3324. // PROPSHEETUI_REASON_SET_RESULT
  3325. //
  3326. // IN: The current 'Result' returned from previous
  3327. // PROPSHEETUI_REASON_xxx function.
  3328. //
  3329. // OUT: Set the new result of this PropSheetUI()
  3330. // function.
  3331. //
  3332. //
  3333. #define PSUIHDRF_OBSOLETE 0x0001
  3334. #define PSUIHDRF_NOAPPLYNOW 0x0002
  3335. #define PSUIHDRF_PROPTITLE 0x0004
  3336. #define PSUIHDRF_USEHICON 0x0008
  3337. #define PSUIHDRF_DEFTITLE 0x0010
  3338. #define PSUIHDRF_EXACT_PTITLE 0x0020
  3339. typedef struct _PROPSHEETUI_INFO_HEADER {
  3340. WORD cbSize;
  3341. WORD Flags;
  3342. LPTSTR pTitle;
  3343. HWND hWndParent;
  3344. HINSTANCE hInst;
  3345. union {
  3346. HICON hIcon;
  3347. ULONG_PTR IconID;
  3348. } DUMMYUNIONNAME;
  3349. } PROPSHEETUI_INFO_HEADER, *PPROPSHEETUI_INFO_HEADER;
  3350. //
  3351. // PROPSHEETUI_INFO_HEADER
  3352. //
  3353. // This data structure is used when common UI ready to pop-up the property
  3354. // sheet page dialog boxes and it asked caller to provide more information.
  3355. //
  3356. // Common property sheet UI passed this data structure as lParam when it call
  3357. // provided pfnPropSheetUI() with PROPSHEETUI_REASON_GET_INFO_HEADER reason.
  3358. //
  3359. //
  3360. // cbSize - size of this structure
  3361. //
  3362. // Flags - PSUIHDRF_xxxx flags
  3363. //
  3364. // PSUIHDRF_OBSOLETE
  3365. //
  3366. // Not used, must not set this bit
  3367. //
  3368. //
  3369. // PSUIHDRF_NOAPPLYNOW
  3370. //
  3371. // Remove 'Apply Now' button.
  3372. //
  3373. //
  3374. // PSUIHDRF_PROPTITLE
  3375. //
  3376. // Automatically include 'Properties' in the title bar
  3377. //
  3378. //
  3379. // PSUIHDRF_USEHICON
  3380. //
  3381. // If this bit is specified then hIcon union field is
  3382. // a valid handle to the icon otherwise the IconID is
  3383. // the either caller's resource ID or common UI standard
  3384. // icon ID.
  3385. //
  3386. // PSUIHDRF_DEFTITLE
  3387. //
  3388. // Automatically include 'Default' in the title bar, the
  3389. // 'Default' always added right after pTitle and before
  3390. // 'Properties' if PSUIHDRF_PROPTITLE flag is set.
  3391. //
  3392. // PSUIHDRF_EXACT_PTITLE
  3393. //
  3394. // This flag indicate the pTitle set in this structure
  3395. // will be use without any modification by the compstui
  3396. // ie. compstui will not modified pTitle in any way and
  3397. // it will ignored PSUIHDRF_PROPTITLE, PSUIHDRF_DEFTITLE
  3398. //
  3399. //
  3400. // pTitle - Pointer to the NULL terminated caption name for the
  3401. // property sheets.
  3402. //
  3403. // ** See LPTSTR typedef description above
  3404. //
  3405. // hWndParent - The handle of the window which will be parent of the common
  3406. // UI property sheets, if NULL then current active window for
  3407. // the calling thread is used.
  3408. //
  3409. // hInst - the caller's handle to its instance. Commom UI use this
  3410. // handle to load caller's icon and other resources.
  3411. //
  3412. // hIcon
  3413. // IconID - Specified the icon which put on the title bar, it either a
  3414. // handle to the icon or a icon resource ID depends on the
  3415. // PSUIHDRF_USEHICON flag.
  3416. //
  3417. //
  3418. // LONG
  3419. // CommonPropertySheetUI(
  3420. // HWND hWndOwner,
  3421. // PFNPROPSHEETUI pfnPropSheetUI,
  3422. // LPARAM lParam,
  3423. // LPDWORD pResult
  3424. // );
  3425. //
  3426. //
  3427. // The CommonPropSheetUI is the main entry point for the common property sheet
  3428. // user interface. The original caller that wish to using common UI to pop-up
  3429. // property sheet will call this function and passed its own PFNPROPSHEETUI
  3430. // function address and a long parameter.
  3431. //
  3432. // If pfnPropSheetUI function return a LONG number greater than zero (0) then
  3433. // common UI will pop-up the property sheet page dialog boxes, when Property
  3434. // sheet pages is finished. (either hit Ok or Cancel) it will return the
  3435. // result of CPSUI_xxxx back to the caller.
  3436. //
  3437. // If pfnPropSheetUI function return a LONG number equal or less than zero (0)
  3438. // then it will return the CPSUI_CANCEL back to caller without pop-up the
  3439. // property sheet page dialog boxes.
  3440. //
  3441. //
  3442. // Parameters:
  3443. //
  3444. // hWndOwner - Window handle for the owner of this proerty sheet
  3445. // pages dialog boxes.
  3446. //
  3447. // pfnPropSheetUI - a PFNPROPSHEETUI function pointer which is used by
  3448. // the caller to add its property sheet pages.
  3449. //
  3450. // lParam - a long parameter will be passed to the pfnPropSheetUI
  3451. // funciton. The common UI called the pfnPropSheetUI as
  3452. //
  3453. // PROPSHEETUI_INFO PSUIInfo;
  3454. //
  3455. // pfnPropSheetUI(&PSUIInfo, lParam);
  3456. //
  3457. // The caller must use pfnComPropSheet() to add/delete
  3458. // pages. When it is done adding pages, it retuned
  3459. // greater than zero to indicate successful, and return
  3460. // less or equal to zero to indicate failure.
  3461. //
  3462. // pResult - a pointer to DWORD which received the final result
  3463. // of pfnPropSheetUI() funciton, this result is a copy
  3464. // from Result field of PROPSHEETUI_INFO data structure
  3465. // which passed to the pfnPropSheetUI() as the first
  3466. // parameter. The pResult only will be set if the
  3467. // returned value from CommonPropertySheetUI() is not
  3468. // ERR_CPSUI_xxx.
  3469. //
  3470. // if pResult is NULL then common UI will not return
  3471. // pfnPropSheetUI()'s result back.
  3472. //
  3473. //
  3474. // Return Value:
  3475. //
  3476. // LONG - < 0 - property page does not displayed and
  3477. // ERR_CPSUI_xxx is the error code
  3478. // CPSUI_OK - property page displayed.
  3479. // CPSUI_RESTARTWINDOWS - property page displayed and need to
  3480. // restart window to take effect
  3481. // CPSUI_REBOOTSYSTEM - property page dispalyed and need
  3482. // to reboot system to take effect
  3483. //
  3484. //
  3485. LONG
  3486. APIENTRY
  3487. CommonPropertySheetUIA(
  3488. HWND hWndOwner,
  3489. PFNPROPSHEETUI pfnPropSheetUI,
  3490. LPARAM lParam,
  3491. LPDWORD pResult
  3492. );
  3493. LONG
  3494. APIENTRY
  3495. CommonPropertySheetUIW(
  3496. HWND hWndOwner,
  3497. PFNPROPSHEETUI pfnPropSheetUI,
  3498. LPARAM lParam,
  3499. LPDWORD pResult
  3500. );
  3501. #ifdef UNICODE
  3502. #define CommonPropertySheetUI CommonPropertySheetUIW
  3503. #else
  3504. #define CommonPropertySheetUI CommonPropertySheetUIA
  3505. #endif
  3506. //
  3507. // GetCPSUIUserData() and SetCPSUIUserData() is used for the pages added
  3508. // by the CPSFUNC_ADD_PCOMPROPSHEETUI. The caller add this function and has
  3509. // sub class dialog procedure should not set DWLP_USERDATA but calling these
  3510. // function instead, otherwise the system can failed.
  3511. //
  3512. ULONG_PTR
  3513. APIENTRY
  3514. GetCPSUIUserData(
  3515. HWND hDlg
  3516. );
  3517. BOOL
  3518. APIENTRY
  3519. SetCPSUIUserData(
  3520. HWND hDlg,
  3521. ULONG_PTR CPSUIUserData
  3522. );
  3523. #define CPSUI_CANCEL 0
  3524. #define CPSUI_OK 1
  3525. #define CPSUI_RESTARTWINDOWS 2
  3526. #define CPSUI_REBOOTSYSTEM 3
  3527. #define ERR_CPSUI_GETLASTERROR -1
  3528. #define ERR_CPSUI_ALLOCMEM_FAILED -2
  3529. #define ERR_CPSUI_INVALID_PDATA -3
  3530. #define ERR_CPSUI_INVALID_LPARAM -4
  3531. #define ERR_CPSUI_NULL_HINST -5
  3532. #define ERR_CPSUI_NULL_CALLERNAME -6
  3533. #define ERR_CPSUI_NULL_OPTITEMNAME -7
  3534. #define ERR_CPSUI_NO_PROPSHEETPAGE -8
  3535. #define ERR_CPSUI_TOO_MANY_PROPSHEETPAGES -9
  3536. #define ERR_CPSUI_CREATEPROPPAGE_FAILED -10
  3537. #define ERR_CPSUI_MORE_THAN_ONE_TVPAGE -11
  3538. #define ERR_CPSUI_MORE_THAN_ONE_STDPAGE -12
  3539. #define ERR_CPSUI_INVALID_PDLGPAGE -13
  3540. #define ERR_CPSUI_INVALID_DLGPAGE_CBSIZE -14
  3541. #define ERR_CPSUI_TOO_MANY_DLGPAGES -15
  3542. #define ERR_CPSUI_INVALID_DLGPAGEIDX -16
  3543. #define ERR_CPSUI_SUBITEM_DIFF_DLGPAGEIDX -17
  3544. #define ERR_CPSUI_NULL_POPTITEM -18
  3545. #define ERR_CPSUI_INVALID_OPTITEM_CBSIZE -19
  3546. #define ERR_CPSUI_INVALID_OPTTYPE_CBSIZE -20
  3547. #define ERR_CPSUI_INVALID_OPTTYPE_COUNT -21
  3548. #define ERR_CPSUI_NULL_POPTPARAM -22
  3549. #define ERR_CPSUI_INVALID_OPTPARAM_CBSIZE -23
  3550. #define ERR_CPSUI_INVALID_EDITBOX_PSEL -24
  3551. #define ERR_CPSUI_INVALID_EDITBOX_BUF_SIZE -25
  3552. #define ERR_CPSUI_INVALID_ECB_CBSIZE -26
  3553. #define ERR_CPSUI_NULL_ECB_PTITLE -27
  3554. #define ERR_CPSUI_NULL_ECB_PCHECKEDNAME -28
  3555. #define ERR_CPSUI_INVALID_DMPUBID -29
  3556. #define ERR_CPSUI_INVALID_DMPUB_TVOT -30
  3557. #define ERR_CPSUI_CREATE_TRACKBAR_FAILED -31
  3558. #define ERR_CPSUI_CREATE_UDARROW_FAILED -32
  3559. #define ERR_CPSUI_CREATE_IMAGELIST_FAILED -33
  3560. #define ERR_CPSUI_INVALID_TVOT_TYPE -34
  3561. #define ERR_CPSUI_INVALID_LBCB_TYPE -35
  3562. #define ERR_CPSUI_SUBITEM_DIFF_OPTIF_HIDE -36
  3563. #define ERR_CPSUI_INVALID_PUSHBUTTON_TYPE -38
  3564. #define ERR_CPSUI_INVALID_EXTPUSH_CBSIZE -39
  3565. #define ERR_CPSUI_NULL_EXTPUSH_DLGPROC -40
  3566. #define ERR_CPSUI_NO_EXTPUSH_DLGTEMPLATEID -41
  3567. #define ERR_CPSUI_NULL_EXTPUSH_CALLBACK -42
  3568. #define ERR_CPSUI_DMCOPIES_USE_EXTPUSH -43
  3569. #define ERR_CPSUI_ZERO_OPTITEM -44
  3570. #define ERR_CPSUI_FUNCTION_NOT_IMPLEMENTED -9999
  3571. #define ERR_CPSUI_INTERNAL_ERROR -10000
  3572. #endif // (!defined(RC_INVOKED))
  3573. //
  3574. //****************************************************************************
  3575. //* *
  3576. //* Common Property Sheet UI resource ID for the ICONs and STRINGs *
  3577. //* *
  3578. //* The Resource ID from 64000 to 65535 are reserved for common UI and must *
  3579. //* not used as caller resource ID else the string, icon loading will not be *
  3580. //* correct. *
  3581. //* *
  3582. //****************************************************************************
  3583. //
  3584. //
  3585. // Common UI standard 32x32, 16x16 color and monochrome Icon IDs
  3586. //
  3587. #define IDI_CPSUI_ICONID_FIRST 64000
  3588. #define IDI_CPSUI_EMPTY 64000
  3589. #define IDI_CPSUI_SEL_NONE 64001
  3590. #define IDI_CPSUI_WARNING 64002
  3591. #define IDI_CPSUI_NO 64003
  3592. #define IDI_CPSUI_YES 64004
  3593. #define IDI_CPSUI_FALSE 64005
  3594. #define IDI_CPSUI_TRUE 64006
  3595. #define IDI_CPSUI_OFF 64007
  3596. #define IDI_CPSUI_ON 64008
  3597. #define IDI_CPSUI_PAPER_OUTPUT 64009
  3598. #define IDI_CPSUI_ENVELOPE 64010
  3599. #define IDI_CPSUI_MEM 64011
  3600. #define IDI_CPSUI_FONTCARTHDR 64012
  3601. #define IDI_CPSUI_FONTCART 64013
  3602. #define IDI_CPSUI_STAPLER_ON 64014
  3603. #define IDI_CPSUI_STAPLER_OFF 64015
  3604. #define IDI_CPSUI_HT_HOST 64016
  3605. #define IDI_CPSUI_HT_DEVICE 64017
  3606. #define IDI_CPSUI_TT_PRINTASGRAPHIC 64018
  3607. #define IDI_CPSUI_TT_DOWNLOADSOFT 64019
  3608. #define IDI_CPSUI_TT_DOWNLOADVECT 64020
  3609. #define IDI_CPSUI_TT_SUBDEV 64021
  3610. #define IDI_CPSUI_PORTRAIT 64022
  3611. #define IDI_CPSUI_LANDSCAPE 64023
  3612. #define IDI_CPSUI_ROT_LAND 64024
  3613. #define IDI_CPSUI_AUTOSEL 64025
  3614. #define IDI_CPSUI_PAPER_TRAY 64026
  3615. #define IDI_CPSUI_PAPER_TRAY2 64027
  3616. #define IDI_CPSUI_PAPER_TRAY3 64028
  3617. #define IDI_CPSUI_TRANSPARENT 64029
  3618. #define IDI_CPSUI_COLLATE 64030
  3619. #define IDI_CPSUI_DUPLEX_NONE 64031
  3620. #define IDI_CPSUI_DUPLEX_HORZ 64032
  3621. #define IDI_CPSUI_DUPLEX_VERT 64033
  3622. #define IDI_CPSUI_RES_DRAFT 64034
  3623. #define IDI_CPSUI_RES_LOW 64035
  3624. #define IDI_CPSUI_RES_MEDIUM 64036
  3625. #define IDI_CPSUI_RES_HIGH 64037
  3626. #define IDI_CPSUI_RES_PRESENTATION 64038
  3627. #define IDI_CPSUI_MONO 64039
  3628. #define IDI_CPSUI_COLOR 64040
  3629. #define IDI_CPSUI_DITHER_NONE 64041
  3630. #define IDI_CPSUI_DITHER_COARSE 64042
  3631. #define IDI_CPSUI_DITHER_FINE 64043
  3632. #define IDI_CPSUI_DITHER_LINEART 64044
  3633. #define IDI_CPSUI_SCALING 64045
  3634. #define IDI_CPSUI_COPY 64046
  3635. #define IDI_CPSUI_HTCLRADJ 64047
  3636. #define IDI_CPSUI_HALFTONE_SETUP 64048
  3637. #define IDI_CPSUI_WATERMARK 64049
  3638. #define IDI_CPSUI_ERROR 64050
  3639. #define IDI_CPSUI_ICM_OPTION 64051
  3640. #define IDI_CPSUI_ICM_METHOD 64052
  3641. #define IDI_CPSUI_ICM_INTENT 64053
  3642. #define IDI_CPSUI_STD_FORM 64054
  3643. #define IDI_CPSUI_OUTBIN 64055
  3644. #define IDI_CPSUI_OUTPUT 64056
  3645. #define IDI_CPSUI_GRAPHIC 64057
  3646. #define IDI_CPSUI_ADVANCE 64058
  3647. #define IDI_CPSUI_DOCUMENT 64059
  3648. #define IDI_CPSUI_DEVICE 64060
  3649. #define IDI_CPSUI_DEVICE2 64061
  3650. #define IDI_CPSUI_PRINTER 64062
  3651. #define IDI_CPSUI_PRINTER2 64063
  3652. #define IDI_CPSUI_PRINTER3 64064
  3653. #define IDI_CPSUI_PRINTER4 64065
  3654. #define IDI_CPSUI_OPTION 64066
  3655. #define IDI_CPSUI_OPTION2 64067
  3656. #define IDI_CPSUI_STOP 64068
  3657. #define IDI_CPSUI_NOTINSTALLED 64069
  3658. #define IDI_CPSUI_WARNING_OVERLAY 64070
  3659. #define IDI_CPSUI_STOP_WARNING_OVERLAY 64071
  3660. #define IDI_CPSUI_GENERIC_OPTION 64072
  3661. #define IDI_CPSUI_GENERIC_ITEM 64073
  3662. #define IDI_CPSUI_RUN_DIALOG 64074
  3663. #define IDI_CPSUI_QUESTION 64075
  3664. #define IDI_CPSUI_FORMTRAYASSIGN 64076
  3665. #define IDI_CPSUI_PRINTER_FOLDER 64077
  3666. #define IDI_CPSUI_INSTALLABLE_OPTION 64078
  3667. #define IDI_CPSUI_PRINTER_FEATURE 64079
  3668. #define IDI_CPSUI_DEVICE_FEATURE 64080
  3669. #define IDI_CPSUI_FONTSUB 64081
  3670. #define IDI_CPSUI_POSTSCRIPT 64082
  3671. #define IDI_CPSUI_TELEPHONE 64083
  3672. #define IDI_CPSUI_DUPLEX_NONE_L 64084
  3673. #define IDI_CPSUI_DUPLEX_HORZ_L 64085
  3674. #define IDI_CPSUI_DUPLEX_VERT_L 64086
  3675. #define IDI_CPSUI_LF_PEN_PLOTTER 64087
  3676. #define IDI_CPSUI_SF_PEN_PLOTTER 64088
  3677. #define IDI_CPSUI_LF_RASTER_PLOTTER 64089
  3678. #define IDI_CPSUI_SF_RASTER_PLOTTER 64090
  3679. #define IDI_CPSUI_ROLL_PAPER 64091
  3680. #define IDI_CPSUI_PEN_CARROUSEL 64092
  3681. #define IDI_CPSUI_PLOTTER_PEN 64093
  3682. #define IDI_CPSUI_MANUAL_FEED 64094
  3683. #define IDI_CPSUI_FAX 64095
  3684. #define IDI_CPSUI_PAGE_PROTECT 64096
  3685. #define IDI_CPSUI_ENVELOPE_FEED 64097
  3686. #define IDI_CPSUI_FONTCART_SLOT 64098
  3687. #define IDI_CPSUI_LAYOUT_BMP_PORTRAIT 64099
  3688. #define IDI_CPSUI_LAYOUT_BMP_ARROWL 64100
  3689. #define IDI_CPSUI_LAYOUT_BMP_ARROWS 64101
  3690. #define IDI_CPSUI_LAYOUT_BMP_BOOKLETL 64102
  3691. #define IDI_CPSUI_LAYOUT_BMP_BOOKLETP 64103
  3692. #define IDI_CPSUI_ICONID_LAST 64103
  3693. //
  3694. // Common UI standard String IDs
  3695. //
  3696. #define IDS_CPSUI_STRID_FIRST 64700
  3697. #define IDS_CPSUI_SETUP 64700
  3698. #define IDS_CPSUI_MORE 64701
  3699. #define IDS_CPSUI_CHANGE 64702
  3700. #define IDS_CPSUI_OPTION 64703
  3701. #define IDS_CPSUI_OF 64704
  3702. #define IDS_CPSUI_RANGE_FROM 64705
  3703. #define IDS_CPSUI_TO 64706
  3704. #define IDS_CPSUI_COLON_SEP 64707
  3705. #define IDS_CPSUI_LEFT_ANGLE 64708
  3706. #define IDS_CPSUI_RIGHT_ANGLE 64709
  3707. #define IDS_CPSUI_SLASH_SEP 64710
  3708. #define IDS_CPSUI_PERCENT 64711
  3709. #define IDS_CPSUI_LBCB_NOSEL 64712
  3710. #define IDS_CPSUI_PROPERTIES 64713
  3711. #define IDS_CPSUI_DEFAULTDOCUMENT 64714
  3712. #define IDS_CPSUI_DOCUMENT 64715
  3713. #define IDS_CPSUI_ADVANCEDOCUMENT 64716
  3714. #define IDS_CPSUI_PRINTER 64717
  3715. #define IDS_CPSUI_AUTOSELECT 64718
  3716. #define IDS_CPSUI_PAPER_OUTPUT 64719
  3717. #define IDS_CPSUI_GRAPHIC 64720
  3718. #define IDS_CPSUI_OPTIONS 64721
  3719. #define IDS_CPSUI_ADVANCED 64722
  3720. #define IDS_CPSUI_STDDOCPROPTAB 64723
  3721. #define IDS_CPSUI_STDDOCPROPTVTAB 64724
  3722. #define IDS_CPSUI_DEVICEOPTIONS 64725
  3723. #define IDS_CPSUI_FALSE 64726
  3724. #define IDS_CPSUI_TRUE 64727
  3725. #define IDS_CPSUI_NO 64728
  3726. #define IDS_CPSUI_YES 64729
  3727. #define IDS_CPSUI_OFF 64730
  3728. #define IDS_CPSUI_ON 64731
  3729. #define IDS_CPSUI_DEFAULT 64732
  3730. #define IDS_CPSUI_ERROR 64733
  3731. #define IDS_CPSUI_NONE 64734
  3732. #define IDS_CPSUI_NOT 64735
  3733. #define IDS_CPSUI_EXIST 64736
  3734. #define IDS_CPSUI_NOTINSTALLED 64737
  3735. #define IDS_CPSUI_ORIENTATION 64738
  3736. #define IDS_CPSUI_SCALING 64739
  3737. #define IDS_CPSUI_NUM_OF_COPIES 64740
  3738. #define IDS_CPSUI_SOURCE 64741
  3739. #define IDS_CPSUI_PRINTQUALITY 64742
  3740. #define IDS_CPSUI_RESOLUTION 64743
  3741. #define IDS_CPSUI_COLOR_APPERANCE 64744
  3742. #define IDS_CPSUI_DUPLEX 64745
  3743. #define IDS_CPSUI_TTOPTION 64746
  3744. #define IDS_CPSUI_FORMNAME 64747
  3745. #define IDS_CPSUI_ICM 64748
  3746. #define IDS_CPSUI_ICMMETHOD 64749
  3747. #define IDS_CPSUI_ICMINTENT 64750
  3748. #define IDS_CPSUI_MEDIA 64751
  3749. #define IDS_CPSUI_DITHERING 64752
  3750. #define IDS_CPSUI_PORTRAIT 64753
  3751. #define IDS_CPSUI_LANDSCAPE 64754
  3752. #define IDS_CPSUI_ROT_LAND 64755
  3753. #define IDS_CPSUI_COLLATE 64756
  3754. #define IDS_CPSUI_COLLATED 64757
  3755. #define IDS_CPSUI_PRINTFLDSETTING 64758
  3756. #define IDS_CPSUI_DRAFT 64759
  3757. #define IDS_CPSUI_LOW 64760
  3758. #define IDS_CPSUI_MEDIUM 64761
  3759. #define IDS_CPSUI_HIGH 64762
  3760. #define IDS_CPSUI_PRESENTATION 64763
  3761. #define IDS_CPSUI_COLOR 64764
  3762. #define IDS_CPSUI_GRAYSCALE 64765
  3763. #define IDS_CPSUI_MONOCHROME 64766
  3764. #define IDS_CPSUI_SIMPLEX 64767
  3765. #define IDS_CPSUI_HORIZONTAL 64768
  3766. #define IDS_CPSUI_VERTICAL 64769
  3767. #define IDS_CPSUI_LONG_SIDE 64770
  3768. #define IDS_CPSUI_SHORT_SIDE 64771
  3769. #define IDS_CPSUI_TT_PRINTASGRAPHIC 64772
  3770. #define IDS_CPSUI_TT_DOWNLOADSOFT 64773
  3771. #define IDS_CPSUI_TT_DOWNLOADVECT 64774
  3772. #define IDS_CPSUI_TT_SUBDEV 64775
  3773. #define IDS_CPSUI_ICM_BLACKWHITE 64776
  3774. #define IDS_CPSUI_ICM_NO 64777
  3775. #define IDS_CPSUI_ICM_YES 64778
  3776. #define IDS_CPSUI_ICM_SATURATION 64779
  3777. #define IDS_CPSUI_ICM_CONTRAST 64780
  3778. #define IDS_CPSUI_ICM_COLORMETRIC 64781
  3779. #define IDS_CPSUI_STANDARD 64782
  3780. #define IDS_CPSUI_GLOSSY 64783
  3781. #define IDS_CPSUI_TRANSPARENCY 64784
  3782. #define IDS_CPSUI_REGULAR 64785
  3783. #define IDS_CPSUI_BOND 64786
  3784. #define IDS_CPSUI_COARSE 64787
  3785. #define IDS_CPSUI_FINE 64788
  3786. #define IDS_CPSUI_LINEART 64789
  3787. #define IDS_CPSUI_ERRDIFFUSE 64790
  3788. #define IDS_CPSUI_HALFTONE 64791
  3789. #define IDS_CPSUI_HTCLRADJ 64792
  3790. #define IDS_CPSUI_USE_HOST_HT 64793
  3791. #define IDS_CPSUI_USE_DEVICE_HT 64794
  3792. #define IDS_CPSUI_USE_PRINTER_HT 64795
  3793. #define IDS_CPSUI_OUTBINASSIGN 64796
  3794. #define IDS_CPSUI_WATERMARK 64797
  3795. #define IDS_CPSUI_FORMTRAYASSIGN 64798
  3796. #define IDS_CPSUI_UPPER_TRAY 64799
  3797. #define IDS_CPSUI_ONLYONE 64800
  3798. #define IDS_CPSUI_LOWER_TRAY 64801
  3799. #define IDS_CPSUI_MIDDLE_TRAY 64802
  3800. #define IDS_CPSUI_MANUAL_TRAY 64803
  3801. #define IDS_CPSUI_ENVELOPE_TRAY 64804
  3802. #define IDS_CPSUI_ENVMANUAL_TRAY 64805
  3803. #define IDS_CPSUI_TRACTOR_TRAY 64806
  3804. #define IDS_CPSUI_SMALLFMT_TRAY 64807
  3805. #define IDS_CPSUI_LARGEFMT_TRAY 64808
  3806. #define IDS_CPSUI_LARGECAP_TRAY 64809
  3807. #define IDS_CPSUI_CASSETTE_TRAY 64810
  3808. #define IDS_CPSUI_DEFAULT_TRAY 64811
  3809. #define IDS_CPSUI_FORMSOURCE 64812
  3810. #define IDS_CPSUI_MANUALFEED 64813
  3811. #define IDS_CPSUI_PRINTERMEM_KB 64814
  3812. #define IDS_CPSUI_PRINTERMEM_MB 64815
  3813. #define IDS_CPSUI_PAGEPROTECT 64816
  3814. #define IDS_CPSUI_HALFTONE_SETUP 64817
  3815. #define IDS_CPSUI_INSTFONTCART 64818
  3816. #define IDS_CPSUI_SLOT1 64819
  3817. #define IDS_CPSUI_SLOT2 64820
  3818. #define IDS_CPSUI_SLOT3 64821
  3819. #define IDS_CPSUI_SLOT4 64822
  3820. #define IDS_CPSUI_LEFT_SLOT 64823
  3821. #define IDS_CPSUI_RIGHT_SLOT 64824
  3822. #define IDS_CPSUI_STAPLER 64825
  3823. #define IDS_CPSUI_STAPLER_ON 64826
  3824. #define IDS_CPSUI_STAPLER_OFF 64827
  3825. #define IDS_CPSUI_STACKER 64828
  3826. #define IDS_CPSUI_MAILBOX 64829
  3827. #define IDS_CPSUI_COPY 64830
  3828. #define IDS_CPSUI_COPIES 64831
  3829. #define IDS_CPSUI_TOTAL 64832
  3830. #define IDS_CPSUI_MAKE 64833
  3831. #define IDS_CPSUI_PRINT 64834
  3832. #define IDS_CPSUI_FAX 64835
  3833. #define IDS_CPSUI_PLOT 64836
  3834. #define IDS_CPSUI_SLOW 64837
  3835. #define IDS_CPSUI_FAST 64838
  3836. #define IDS_CPSUI_ROTATED 64839
  3837. #define IDS_CPSUI_RESET 64840
  3838. #define IDS_CPSUI_ALL 64841
  3839. #define IDS_CPSUI_DEVICE 64842
  3840. #define IDS_CPSUI_SETTINGS 64843
  3841. #define IDS_CPSUI_REVERT 64844
  3842. #define IDS_CPSUI_CHANGES 64845
  3843. #define IDS_CPSUI_CHANGED 64846
  3844. #define IDS_CPSUI_WARNING 64847
  3845. #define IDS_CPSUI_ABOUT 64848
  3846. #define IDS_CPSUI_VERSION 64849
  3847. #define IDS_CPSUI_NO_NAME 64850
  3848. #define IDS_CPSUI_SETTING 64851
  3849. #define IDS_CPSUI_DEVICE_SETTINGS 64852
  3850. #define IDS_CPSUI_STDDOCPROPTAB1 64853
  3851. #define IDS_CPSUI_STDDOCPROPTAB2 64854
  3852. #define IDS_CPSUI_PAGEORDER 64855
  3853. #define IDS_CPSUI_FRONTTOBACK 64856
  3854. #define IDS_CPSUI_BACKTOFRONT 64857
  3855. #define IDS_CPSUI_QUALITY_SETTINGS 64858
  3856. #define IDS_CPSUI_QUALITY_DRAFT 64859
  3857. #define IDS_CPSUI_QUALITY_BETTER 64860
  3858. #define IDS_CPSUI_QUALITY_BEST 64861
  3859. #define IDS_CPSUI_QUALITY_CUSTOM 64862
  3860. #define IDS_CPSUI_OUTPUTBIN 64863
  3861. #define IDS_CPSUI_NUP 64864
  3862. #define IDS_CPSUI_NUP_NORMAL 64865
  3863. #define IDS_CPSUI_NUP_TWOUP 64866
  3864. #define IDS_CPSUI_NUP_FOURUP 64867
  3865. #define IDS_CPSUI_NUP_SIXUP 64868
  3866. #define IDS_CPSUI_NUP_NINEUP 64869
  3867. #define IDS_CPSUI_NUP_SIXTEENUP 64870
  3868. #define IDS_CPSUI_SIDE1 64871
  3869. #define IDS_CPSUI_SIDE2 64872
  3870. #define IDS_CPSUI_BOOKLET 64873
  3871. #define IDS_CPSUI_STRID_LAST 64873
  3872. #ifdef __cplusplus
  3873. }
  3874. #endif
  3875. #endif // _COMPSTUI