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.

269 lines
9.9 KiB

  1. //////////////////////////////////////////////////////////////////
  2. // File : exres.h
  3. // Copyright(c) 1991-1997, Microsoft Corp. All rights reserved
  4. //
  5. // This includes extended function for getting resource.
  6. //
  7. //////////////////////////////////////////////////////////////////
  8. #ifndef __EXRES_H__
  9. #define __EXRES_H__
  10. #ifdef UNDER_CE // Windows CE
  11. typedef VOID MENUTEMPLATE;
  12. #endif // UNDER_CE
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif //__cplusplus
  16. //////////////////////////////////////////////////////////////////
  17. // Function : ExLoadStringW
  18. // Type : INT
  19. // Purpose : Load Unicode string with specified Language
  20. // in any platform.
  21. // Args :
  22. // : LANGID lgid
  23. // : HINSTANCE hInst
  24. // : UINT uID
  25. // : LPWSTR lpBuffer
  26. // : INT nBufferMax
  27. // Return :
  28. // DATE : 971028
  29. //////////////////////////////////////////////////////////////////
  30. INT WINAPI ExLoadStringW(LANGID lgid,
  31. HINSTANCE hInst,
  32. UINT uID,
  33. LPWSTR lpBuffer,
  34. INT nBufferMax);
  35. //////////////////////////////////////////////////////////////////
  36. // Function : ExLoadStringW
  37. // Type : INT
  38. // Purpose : Load Ansi string with specified Language
  39. // in any platform.
  40. // Args :
  41. // : LCID lcid
  42. // : HINSTANCE hInst
  43. // : UINT uID
  44. // : LPSTR lpBuffer
  45. // : INT nBufferMax
  46. // Return :
  47. // DATE : 971028
  48. //////////////////////////////////////////////////////////////////
  49. INT WINAPI ExLoadStringA(LANGID lcid,
  50. HINSTANCE hInst,
  51. INT uID,
  52. LPSTR lpBuffer,
  53. INT nBufferMax);
  54. //////////////////////////////////////////////////////////////////
  55. // Function : ExDialogBoxParamA
  56. // Type : int
  57. // Purpose : Create modal dialog box with specified language dialalog template
  58. // Args :
  59. // : LANGID lgid
  60. // : HINSTANCE hInstance // handle to application instance
  61. // : LPCTSTR lpTemplateName // identifies dialog box template
  62. // : HWND hWndParent // handle to owner window
  63. // : DLGPROC lpDialogFunc // pointer to dialog box procedure
  64. // : LPARAM dwInitParam // initialization value
  65. // Return :
  66. // DATE : 971028
  67. //////////////////////////////////////////////////////////////////
  68. int WINAPI ExDialogBoxParamA(LANGID lgid,
  69. HINSTANCE hInstance,
  70. LPCTSTR lpTemplateName,
  71. HWND hWndParent,
  72. DLGPROC lpDialogFunc,
  73. LPARAM dwInitParam);
  74. //////////////////////////////////////////////////////////////////
  75. // Function : ExDialogBoxParamW
  76. // Type : int
  77. // Purpose :
  78. // Args :
  79. // : LANGID lgid
  80. // : HINSTANCE hInstance // handle to application instance
  81. // : LPCWSTR lpTemplateName // identifies dialog box template
  82. // : HWND hWndParent // handle to owner window
  83. // : DLGPROC lpDialogFunc // pointer to dialog box procedure
  84. // : LPARAM dwInitParam // initialization value
  85. // Return :
  86. // DATE :
  87. //////////////////////////////////////////////////////////////////
  88. int WINAPI ExDialogBoxParamW(LANGID lgid,
  89. HINSTANCE hInstance,
  90. LPCWSTR lpTemplateName,
  91. HWND hWndParent,
  92. DLGPROC lpDialogFunc,
  93. LPARAM dwInitParam);
  94. //////////////////////////////////////////////////////////////////
  95. // Function : ExDialogBoxParamA
  96. // Purpose : Create modal dialog box with specified language dialalog template
  97. // Args :
  98. // : LANGID lgid
  99. // : HINSTANCE hInstance // handle to application instance
  100. // : LPCTSTR lpTemplateName // identifies dialog box template
  101. // : HWND hWndParent // handle to owner window
  102. // : DLGPROC lpDialogFunc // pointer to dialog box procedure
  103. // Return :
  104. // DATE : 971028
  105. //////////////////////////////////////////////////////////////////
  106. #define ExDialogBoxA(lgid, hInstance,lpTemplateName, hWndParent, lpDialogFunc) \
  107. ExDialogBoxParamA(lgid, hInstance,lpTemplateName, hWndParent, lpDialogFunc, 0L)
  108. //////////////////////////////////////////////////////////////////
  109. // Function : ExCreateDialogParamA
  110. // Type : HWND
  111. // Purpose :
  112. // Args :
  113. // : LANGID lgid
  114. // : HINSTANCE hInstance // handle to application instance
  115. // : LPCTSTR lpTemplateName // identifies dialog box template
  116. // : HWND hWndParent // handle to owner window
  117. // : DLGPROC lpDialogFunc // pointer to dialog box procedure
  118. // : LPARAM dwInitParam // initialization value
  119. // Return :
  120. // DATE :
  121. //////////////////////////////////////////////////////////////////
  122. HWND WINAPI ExCreateDialogParamA(LANGID lgid,
  123. HINSTANCE hInstance,
  124. LPCTSTR lpTemplateName,
  125. HWND hWndParent,
  126. DLGPROC lpDialogFunc,
  127. LPARAM dwInitParam);
  128. //////////////////////////////////////////////////////////////////
  129. // Function : ExCreateDialogParamW
  130. // Type : HWND
  131. // Purpose :
  132. // Args :
  133. // : LANGID lgid
  134. // : HINSTANCE hInstance // handle to application instance
  135. // : LPCWSTR lpTemplateName // identifies dialog box template
  136. // : HWND hWndParent // handle to owner window
  137. // : DLGPROC lpDialogFunc // pointer to dialog box procedure
  138. // : LPARAM dwInitParam // initialization value
  139. // Return :
  140. // DATE :
  141. //////////////////////////////////////////////////////////////////
  142. HWND WINAPI ExCreateDialogParamW(LANGID lgid,
  143. HINSTANCE hInstance,
  144. LPCWSTR lpTemplateName,
  145. HWND hWndParent,
  146. DLGPROC lpDialogFunc,
  147. LPARAM dwInitParam);
  148. //////////////////////////////////////////////////////////////////
  149. // Function : ExCreateDialogA
  150. // Type : HWND
  151. // Purpose :
  152. // Args :
  153. // : LANGID lgid
  154. // : HINSTANCE hInstance // handle to application instance
  155. // : LPCTSTR lpTemplateName // identifies dialog box template
  156. // : HWND hWndParent // handle to owner window
  157. // : DLGPROC lpDialogFunc // pointer to dialog box procedure
  158. // Return :
  159. // DATE :
  160. //////////////////////////////////////////////////////////////////
  161. #define ExCreateDialogA(lgid, hInstance, lpTemplateName, hWndParent, lpDialogFunc) \
  162. ExCreateDialogParamA(lgid, hInstance, lpTemplateName, hWndParent, lpDialogFunc, 0L)
  163. //////////////////////////////////////////////////////////////////
  164. // Function : ExCreateDialogW
  165. // Type : HWND
  166. // Purpose :
  167. // Args :
  168. // : LANGID lgid
  169. // : HINSTANCE hInstance // handle to application instance
  170. // : LPCWSTR lpTemplateName // identifies dialog box template
  171. // : HWND hWndParent // handle to owner window
  172. // : DLGPROC lpDialogFunc // pointer to dialog box procedure
  173. // Return :
  174. // DATE :
  175. //////////////////////////////////////////////////////////////////
  176. #define ExCreateDialogW(lgid, hInstance, lpTemplateName, hWndParent, lpDialogFunc) \
  177. ExCreateDialogParamW(lgid, hInstance, lpTemplateName, hWndParent, lpDialogFunc, 0L)
  178. //////////////////////////////////////////////////////////////////
  179. // Function : ExLoadDialogTemplate
  180. // Type : DLGTEMPLATE *
  181. // Purpose :
  182. // Args :
  183. // : LANGID lgid
  184. // : HINSTANCE hInstance
  185. // : LPCSTR pchTemplate
  186. // Return :
  187. // DATE :
  188. //////////////////////////////////////////////////////////////////
  189. DLGTEMPLATE * WINAPI ExLoadDialogTemplate(LANGID lgid,
  190. HINSTANCE hInstance,
  191. #ifndef UNDER_CE
  192. LPCSTR pchTemplate);
  193. #else // UNDER_CE
  194. LPCTSTR pchTemplate);
  195. #endif // UNDER_CE
  196. //////////////////////////////////////////////////////////////////
  197. // Function : ExLoadMenu
  198. // Type : HMENU
  199. // Purpose :
  200. // Args :
  201. // : LANGID lgid
  202. // : HINSTANCE hInstance // handle to application instance
  203. // : LPCTSTR lpMenuName // identifies menu template
  204. // Return :
  205. // DATE :
  206. //////////////////////////////////////////////////////////////////
  207. HMENU WINAPI ExLoadMenu (LANGID lgid,
  208. HINSTANCE hInstance,
  209. LPCTSTR lpMenuName );
  210. //////////////////////////////////////////////////////////////////
  211. // Function : WINAPI ExSetDefaultGUIFontEx
  212. // Type : VOID
  213. // Purpose : Change GUI font to given font.
  214. // It should be called in WM_INITDIALOG. If you are creating new child window,
  215. // you have to call it after new window was created.
  216. // If hFont is NULL, it will call ExSetDefaultGUIFont
  217. // Args :
  218. // : HWND hwndDlg: Set the Dialog window handle to change font.
  219. // : HFONT hFont : Font handle which will be applied to.
  220. // Return : none
  221. // DATE :
  222. //////////////////////////////////////////////////////////////////
  223. VOID WINAPI ExSetDefaultGUIFontEx(HWND hwndDlg, HFONT hFont);
  224. //////////////////////////////////////////////////////////////////
  225. // Function : WINAPI ExSetDefaultGUIFont
  226. // Type : VOID
  227. // Purpose : Change GUI font as DEFAULT_GUI_FONT
  228. // In Win95, WinNT4, DEFAULT_GUI_FONT is "�l�r �o �S�V�b�N"
  229. // In Memphis, WinNT5.0 DEFAULT_GUI_FONT is "MS UI Gothic"
  230. // IME98's Dialog resource uses "MS UI Gothic" as it's dialog font.
  231. // if IME98 works in Win95 or WinNT40, This API Call SendMessage() with WM_SETFONT
  232. // to all children window. So, Dialog's font will be changed to "�l�r �o �S�V�b�N"
  233. //
  234. // It should be called in WM_INITDIALOG. If you are creating new child window,
  235. // you have to call it after new window was created.
  236. // Args :
  237. // : HWND hwndDlg: Set the Dialog window handle to change font.
  238. // Return : none
  239. // DATE :
  240. //////////////////////////////////////////////////////////////////
  241. VOID WINAPI ExSetDefaultGUIFont(HWND hwndDlg);
  242. #ifdef __cplusplus
  243. }
  244. #endif
  245. #endif //__EXRES_H__