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.

275 lines
11 KiB

  1. /////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998 Active Voice Corporation. All Rights Reserved.
  4. //
  5. // Active Agent(r) and Unified Communications(tm) are trademarks of Active Voice Corporation.
  6. //
  7. // Other brand and product names used herein are trademarks of their respective owners.
  8. //
  9. // The entire program and user interface including the structure, sequence, selection,
  10. // and arrangement of the dialog, the exclusively "yes" and "no" choices represented
  11. // by "1" and "2," and each dialog message are protected by copyrights registered in
  12. // the United States and by international treaties.
  13. //
  14. // Protected by one or more of the following United States patents: 5,070,526, 5,488,650,
  15. // 5,434,906, 5,581,604, 5,533,102, 5,568,540, 5,625,676, 5,651,054.
  16. //
  17. // Active Voice Corporation
  18. // Seattle, Washington
  19. // USA
  20. //
  21. /////////////////////////////////////////////////////////////////////////////////////////
  22. ////
  23. // res.h - interface for resource functions in res.c
  24. ////
  25. #ifndef __RES_H__
  26. #define __RES_H__
  27. #include "winlocal.h"
  28. #include "commdlg.h"
  29. #define RES_VERSION 0x00000107
  30. // handle to res engine
  31. //
  32. DECLARE_HANDLE32(HRES);
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36. // ResInit - initialize resource engine
  37. // <dwVersion> (i) must be RES_VERSION
  38. // <hInst> (i) instance handle of calling module
  39. // return handle (NULL if error)
  40. //
  41. HRES DLLEXPORT WINAPI ResInit(DWORD dwVersion, HINSTANCE hInst);
  42. // ResTerm - shut down resource engine
  43. // <hRes> (i) handle returned from ResInit
  44. // return 0 if success
  45. //
  46. int DLLEXPORT WINAPI ResTerm(HRES hRes);
  47. // ResAddModule - add module resources to res engine
  48. // <hRes> (i) handle returned from ResInit
  49. // <hInst> (i) instance handle of resource module
  50. // return 0 if success
  51. //
  52. int DLLEXPORT WINAPI ResAddModule(HRES hRes, HINSTANCE hInst);
  53. // ResRemoveModule - remove module resources from res engine
  54. // <hRes> (i) handle returned from ResInit
  55. // <hInst> (i) instance handle of resource module
  56. // return 0 if success
  57. //
  58. int DLLEXPORT WINAPI ResRemoveModule(HRES hRes, HINSTANCE hInst);
  59. // ResLoadAccelerators - load specified accelerator table
  60. // <hRes> (i) handle returned from ResInit
  61. // <lpszTableName> (i) name of accelerator table
  62. // or MAKEINTRESOURCE(idAccel)
  63. // return accel handle if success, otherwise NULL
  64. // NOTE: see documentation for LoadAccelerators function
  65. //
  66. HACCEL DLLEXPORT WINAPI ResLoadAccelerators(HRES hRes, LPCTSTR lpszTableName);
  67. // ResLoadBitmap - load specified bitmap resource
  68. // <hRes> (i) handle returned from ResInit
  69. // NULL load pre-defined Windows bitmap
  70. // <lpszBitmap> (i) name of bitmap resource
  71. // or MAKEINTRESOURCE(idBitmap)
  72. // or <OBM_xxx> if hRes is NULL
  73. // return bitmap handle if success, otherwise NULL
  74. // NOTE: see documentation for LoadBitmap function
  75. //
  76. HBITMAP DLLEXPORT WINAPI ResLoadBitmap(HRES hRes, LPCTSTR lpszBitmap);
  77. // ResLoadCursor - load specified cursor resource
  78. // <hRes> (i) handle returned from ResInit
  79. // NULL load pre-defined Windows cursor
  80. // <lpszCursor> (i) name of cursor resource
  81. // or MAKEINTRESOURCE(idCursor)
  82. // or <IDC_xxx> if hRes is NULL
  83. // return cursor handle if success, otherwise NULL
  84. // NOTE: see documentation for LoadCursor function
  85. //
  86. HCURSOR DLLEXPORT WINAPI ResLoadCursor(HRES hRes, LPCTSTR lpszCursor);
  87. // ResLoadIcon - load specified icon resource
  88. // <hRes> (i) handle returned from ResInit
  89. // NULL load pre-defined Windows icon
  90. // <lpszIcon> (i) name of icon resource
  91. // or MAKEINTRESOURCE(idIcon)
  92. // or <IDI_xxx> if hRes is NULL
  93. // return icon handle if success, otherwise NULL
  94. // NOTE: see documentation for LoadIcon function
  95. //
  96. HICON DLLEXPORT WINAPI ResLoadIcon(HRES hRes, LPCTSTR lpszIcon);
  97. // ResLoadMenu - load specified menu resource
  98. // <hRes> (i) handle returned from ResInit
  99. // <lpszMenu> (i) name of menu resource
  100. // or MAKEINTRESOURCE(idMenu)
  101. // return menu handle if success, otherwise NULL
  102. // NOTE: see documentation for LoadMenu function
  103. //
  104. HMENU DLLEXPORT WINAPI ResLoadMenu(HRES hRes, LPCTSTR lpszMenu);
  105. // ResFindResource - find specified resource
  106. // <hRes> (i) handle returned from ResInit
  107. // <lpszName> (i) resource name
  108. // or MAKEINTRESOURCE(idResource)
  109. // <lpszType> (i) resource type (RT_xxx)
  110. // return resource handle if success, otherwise NULL
  111. // NOTE: see documentation for FindResource function
  112. //
  113. HRSRC DLLEXPORT WINAPI ResFindResource(HRES hRes, LPCTSTR lpszName, LPCTSTR lpszType);
  114. // ResLoadResource - load specified resource
  115. // <hRes> (i) handle returned from ResInit
  116. // <hrsrc> (i) handle returned from ResFindResource
  117. // return resource handle if success, otherwise NULL
  118. // NOTE: see documentation for LoadResource function
  119. //
  120. HGLOBAL DLLEXPORT WINAPI ResLoadResource(HRES hRes, HRSRC hrsrc);
  121. // ResLoadString - load specified string resource
  122. // <hRes> (i) handle returned from ResInit
  123. // <idResource> (i) string id
  124. // <lpszBuffer> (o) buffer to receive the string
  125. // <cbBuffer> (i) buffer size in bytes
  126. // return number of bytes copied to <lpszBuffer>, -1 if error, 0 if not found
  127. // NOTE: see documentation for LoadString function
  128. //
  129. int DLLEXPORT WINAPI ResLoadString(HRES hRes, UINT idResource, LPTSTR lpszBuffer, int cbBuffer);
  130. // ResString - return specified string resource
  131. // <hRes> (i) handle returned from ResInit
  132. // <idResource> (i) string id
  133. // return ptr to string in next available string buffer (NULL if error)
  134. // NOTE: If the the specified id in <idResource> is not found,
  135. // a string in the form "String #<idResource>" is returned.
  136. //
  137. LPTSTR DLLEXPORT WINAPI ResString(HRES hRes, UINT idResource);
  138. // ResCreateDialog - create modeless dialog box from template resource
  139. // <hRes> (i) handle returned from ResInit
  140. // <lpszDlgTemp> (i) dialog box template name
  141. // or MAKEINTRESOURCE(idDlg)
  142. // <hwndOwner> (i) handle of owner window
  143. // <dlgproc> (i) instance address of dialog box procedure
  144. // return dialog box window handle (NULL if error)
  145. // NOTE: see documentation for CreateDialog function
  146. //
  147. HWND DLLEXPORT WINAPI ResCreateDialog(HRES hRes,
  148. LPCTSTR lpszDlgTemp, HWND hwndOwner, DLGPROC dlgproc);
  149. // ResCreateDialogIndirect - create modeless dialog box from template resource
  150. // <hRes> (i) handle returned from ResInit
  151. // <lpvDlgTemp> (i) dialog box header structure
  152. // <hwndOwner> (i) handle of owner window
  153. // <dlgproc> (i) instance address of dialog box procedure
  154. // return dialog box window handle (NULL if error)
  155. // NOTE: see documentation for CreateDialogIndirect function
  156. //
  157. HWND DLLEXPORT WINAPI ResCreateDialogIndirect(HRES hRes,
  158. const void FAR* lpvDlgTemp, HWND hwndOwner, DLGPROC dlgproc);
  159. // ResCreateDialogParam - create modeless dialog box from template resource
  160. // <hRes> (i) handle returned from ResInit
  161. // <lpszDlgTemp> (i) dialog box template name
  162. // or MAKEINTRESOURCE(idDlg)
  163. // <hwndOwner> (i) handle of owner window
  164. // <dlgproc> (i) instance address of dialog box procedure
  165. // <lParamInit> (i) initialization value
  166. // return dialog box window handle (NULL if error)
  167. // NOTE: see documentation for CreateDialogParam function
  168. //
  169. HWND DLLEXPORT WINAPI ResCreateDialogParam(HRES hRes,
  170. LPCTSTR lpszDlgTemp, HWND hwndOwner, DLGPROC dlgproc, LPARAM lParamInit);
  171. // ResCreateDialogIndirectParam - create modeless dialog box from template resource
  172. // <hRes> (i) handle returned from ResInit
  173. // <lpvDlgTemp> (i) dialog box header structure
  174. // <hwndOwner> (i) handle of owner window
  175. // <dlgproc> (i) instance address of dialog box procedure
  176. // <lParamInit> (i) initialization value
  177. // return dialog box window handle (NULL if error)
  178. // NOTE: see documentation for CreateDialogIndirectParam function
  179. //
  180. HWND DLLEXPORT WINAPI ResCreateDialogIndirectParam(HRES hRes,
  181. const void FAR* lpvDlgTemp, HWND hwndOwner, DLGPROC dlgproc, LPARAM lParamInit);
  182. // ResDialogBox - create modal dialog box from template resource
  183. // <hRes> (i) handle returned from ResInit
  184. // <lpszDlgTemp> (i) dialog box template name
  185. // or MAKEINTRESOURCE(idDlg)
  186. // <hwndOwner> (i) handle of owner window
  187. // <dlgproc> (i) instance address of dialog box procedure
  188. // return dialog box return code (-1 if error)
  189. // NOTE: see documentation for DialogBox function
  190. //
  191. INT_PTR DLLEXPORT WINAPI ResDialogBox(HRES hRes,
  192. LPCTSTR lpszDlgTemp, HWND hwndOwner, DLGPROC dlgproc);
  193. // ResDialogBoxIndirect - create modal dialog box from template resource
  194. // <hRes> (i) handle returned from ResInit
  195. // <hglbDlgTemp> (i) dialog box header structure
  196. // <hwndOwner> (i) handle of owner window
  197. // <dlgproc> (i) instance address of dialog box procedure
  198. // return dialog box return code (-1 if error)
  199. // NOTE: see documentation for DialogBoxIndirect function
  200. //
  201. INT_PTR DLLEXPORT WINAPI ResDialogBoxIndirect(HRES hRes,
  202. HGLOBAL hglbDlgTemp, HWND hwndOwner, DLGPROC dlgproc);
  203. // ResDialogBoxParam - create modal dialog box from template resource
  204. // <hRes> (i) handle returned from ResInit
  205. // <lpszDlgTemp> (i) dialog box template name
  206. // or MAKEINTRESOURCE(idDlg)
  207. // <hwndOwner> (i) handle of owner window
  208. // <dlgproc> (i) instance address of dialog box procedure
  209. // <lParamInit> (i) initialization value
  210. // return dialog box return code (-1 if error)
  211. // NOTE: see documentation for DialogBoxParam function
  212. //
  213. INT_PTR DLLEXPORT WINAPI ResDialogBoxParam(HRES hRes,
  214. LPCTSTR lpszDlgTemp, HWND hwndOwner, DLGPROC dlgproc, LPARAM lParamInit);
  215. // ResDialogBoxIndirectParam - create modal dialog box from template resource
  216. // <hRes> (i) handle returned from ResInit
  217. // <hglbDlgTemp> (i) dialog box header structure
  218. // <hwndOwner> (i) handle of owner window
  219. // <dlgproc> (i) instance address of dialog box procedure
  220. // <lParamInit> (i) initialization value
  221. // return dialog box return code (-1 if error)
  222. // NOTE: see documentation for DialogBoxIndirectParam function
  223. //
  224. INT_PTR DLLEXPORT WINAPI ResDialogBoxIndirectParam(HRES hRes,
  225. HGLOBAL hglbDlgTemp, HWND hwndOwner, DLGPROC dlgproc, LPARAM lParamInit);
  226. // ResGetOpenFileName - display common dialog for selecting a file to open
  227. // <hRes> (i) handle returned from ResInit
  228. // <lpofn> (i/o) address of struct with initialization data
  229. // return non-zero if file chosen, 0 if error or no file chosen
  230. // NOTE: see documentation for GetOpenFileName function
  231. //
  232. BOOL DLLEXPORT WINAPI ResGetOpenFileName(HRES hRes, LPOPENFILENAME lpofn);
  233. // ResGetSaveFileName - display common dialog for selecting a file to save
  234. // <hRes> (i) handle returned from ResInit
  235. // <lpofn> (i/o) address of struct with initialization data
  236. // return non-zero if file chosen, 0 if error or no file chosen
  237. // NOTE: see documentation for GetSaveFileName function
  238. //
  239. BOOL DLLEXPORT WINAPI ResGetSaveFileName(HRES hRes, LPOPENFILENAME lpofn);
  240. #ifdef __cplusplus
  241. }
  242. #endif
  243. #endif // __RES_H__