home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / MS_VC.50 / VC / MFC / SRC / COMMIMPL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-30  |  16.3 KB  |  542 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1997 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11.  
  12. /////////////////////////////////////////////////////////////////////////////
  13. // AFX_COMCTL_CALL - used to dynamically load the COMCTL32 library
  14.  
  15. #ifdef _AFXDLL
  16.  
  17. #undef AFX_DATA
  18. #define AFX_DATA AFX_CORE_DATA
  19.  
  20. struct AFX_COMMCTRL_CALL
  21. {
  22. // housekeeping and other
  23.     void (STDAPICALLTYPE* pfnInitCommonControls)();
  24.     int (STDAPICALLTYPE* pfnLBItemFromPt)(HWND hLB, POINT pt, BOOL bAutoScroll);
  25.  
  26.     HBITMAP (STDAPICALLTYPE* pfnCreateMappedBitmap)(HINSTANCE hInstance, int idBitmap,
  27.                                   UINT wFlags, LPCOLORMAP lpColorMap, int iNumMaps);
  28.     BOOL (STDAPICALLTYPE* pfnMakeDragList)(HWND hLB);
  29.  
  30. // image lists
  31.     BOOL (STDAPICALLTYPE* pfnImageList_SetOverlayImage)(HIMAGELIST himl, int iImage, int iOverlay);
  32.     COLORREF (STDAPICALLTYPE* pfnImageList_GetBkColor)(HIMAGELIST himl);
  33.     COLORREF (STDAPICALLTYPE* pfnImageList_SetBkColor)(HIMAGELIST himl, COLORREF clrBk);
  34.     BOOL (STDAPICALLTYPE* pfnImageList_GetImageInfo)(HIMAGELIST himl, int i, IMAGEINFO FAR* pImageInfo);
  35.     BOOL (STDAPICALLTYPE* pfnImageList_Draw)(HIMAGELIST himl, int i, HDC hdcDst, int x, int y, UINT fStyle);
  36.     HICON (STDAPICALLTYPE* pfnImageList_GetIcon)(HIMAGELIST himl, int i, UINT flags);
  37.     int (STDAPICALLTYPE* pfnImageList_ReplaceIcon)(HIMAGELIST himl, int i, HICON hicon);
  38.     BOOL (STDAPICALLTYPE* pfnImageList_Replace)(HIMAGELIST himl, int i, HBITMAP hbmImage, HBITMAP hbmMask);
  39.     BOOL (STDAPICALLTYPE* pfnImageList_Remove)(HIMAGELIST himl, int i);
  40.     int (STDAPICALLTYPE* pfnImageList_AddMasked)(HIMAGELIST himl, HBITMAP hbmImage, COLORREF crMask);
  41.     void (STDAPICALLTYPE* pfnImageList_EndDrag)();
  42.     BOOL (STDAPICALLTYPE* pfnImageList_BeginDrag)(HIMAGELIST himlTrack, int iTrack, int dxHotspot, int dyHotspot);
  43.     HIMAGELIST (STDAPICALLTYPE* pfnImageList_Merge)(HIMAGELIST himl1, int i1, HIMAGELIST himl2, int i2, int dx, int dy);
  44.     HIMAGELIST (STDAPICALLTYPE* pfnImageList_Create)(int cx, int cy, UINT flags, int cInitial, int cGrow);
  45.     BOOL (STDAPICALLTYPE* pfnImageList_Destroy)(HIMAGELIST himl);
  46.     BOOL (STDAPICALLTYPE* pfnImageList_DragMove)(int x, int y);
  47.     BOOL (STDAPICALLTYPE* pfnImageList_SetDragCursorImage)(HIMAGELIST himlDrag, int iDrag, int dxHotspot, int dyHotspot);
  48.     BOOL (STDAPICALLTYPE* pfnImageList_DragShowNolock)(BOOL fShow);
  49.     HIMAGELIST (STDAPICALLTYPE* pfnImageList_GetDragImage)(POINT FAR* ppt,POINT FAR* pptHotspot);
  50.     BOOL (STDAPICALLTYPE* pfnImageList_DragEnter)(HWND hwndLock, int x, int y);
  51.     BOOL (STDAPICALLTYPE* pfnImageList_DragLeave)(HWND hwndLock);
  52.     int (STDAPICALLTYPE* pfnImageList_GetImageCount)(HIMAGELIST himl);
  53.     int (STDAPICALLTYPE* pfnImageList_Add)(HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask);
  54.  
  55.     HIMAGELIST (STDAPICALLTYPE* pfnImageList_LoadImage)(HINSTANCE hi, LPCTSTR lpbmp, int cx, int cGrow, COLORREF crMask, UINT uType, UINT uFlags);
  56.  
  57. #ifndef _AFX_NO_OLE_SUPPORT
  58.     BOOL (STDAPICALLTYPE* pfnImageList_Write)(HIMAGELIST himl, LPSTREAM pstm);
  59.     HIMAGELIST (STDAPICALLTYPE* pfnImageList_Read)(LPSTREAM pstm);
  60. #endif
  61.  
  62. // property sheets
  63.     BOOL (STDAPICALLTYPE* pfnDestroyPropertySheetPage)(HPROPSHEETPAGE);
  64.  
  65.     int  (STDAPICALLTYPE* pfnPropertySheet)(LPCPROPSHEETHEADER);
  66.     HPROPSHEETPAGE (STDAPICALLTYPE* pfnCreatePropertySheetPage)(LPCPROPSHEETPAGE);
  67. };
  68.  
  69. extern AFX_DATA AFX_COMMCTRL_CALL _afxCommCtrl;
  70.  
  71. /////////////////////////////////////////////////////////////////////////////
  72. // AFX_SHELL_CALL - used to dynamically load SHELL32.DLL
  73.  
  74. #ifndef _MAC
  75. struct AFX_SHELL_CALL
  76. {
  77.     DWORD (WINAPI* pfnSHGetFileInfo)(LPCTSTR pszPath, DWORD dwFileAttributes, SHFILEINFO FAR *psfi, UINT cbFileInfo, UINT uFlags);
  78.     HICON (WINAPI* pfnExtractIcon)(HINSTANCE hInst, LPCTSTR lpszExeFileName, UINT nIconIndex);
  79.     UINT (WINAPI* pfnDragQueryFile)(HDROP,UINT,LPTSTR,UINT);
  80.     VOID (WINAPI* pfnDragAcceptFiles)(HWND,BOOL);
  81.     VOID (WINAPI* pfnDragFinish)(HDROP);
  82. };
  83.  
  84. /////////////////////////////////////////////////////////////////////////////
  85. // AFX_WINSPOOL_CALL - used to dynamically load WINSPOOL.DLL
  86.  
  87. struct AFX_WINSPOOL_CALL
  88. {
  89.     BOOL (APIENTRY* pfnOpenPrinter)(LPTSTR, LPHANDLE, LPPRINTER_DEFAULTS);
  90.     BOOL (APIENTRY* pfnClosePrinter)(HANDLE hPrinter);
  91.     LONG (APIENTRY* pfnDocumentProperties)(HWND hWnd, HANDLE hPrinter,
  92.         LPTSTR pDeviceName, PDEVMODE pDevModeOutput, PDEVMODE pDevModeInput,
  93.         DWORD fMode);
  94. };
  95.  
  96. /////////////////////////////////////////////////////////////////////////////
  97. // AFX_COMDLG_CALL - used to dynamically load COMDLG32.DLL
  98.  
  99. struct AFX_COMDLG_CALL
  100. {
  101.     BOOL (APIENTRY* pfnChooseColor)(LPCHOOSECOLOR);
  102.     DWORD (APIENTRY* pfnCommDlgExtendedError)(VOID);
  103.     HWND (APIENTRY* pfnReplaceText)(LPFINDREPLACE);
  104.     BOOL (APIENTRY* pfnGetSaveFileName)(LPOPENFILENAME);
  105.     short (APIENTRY* pfnGetFileTitle)(LPCTSTR, LPTSTR, WORD);
  106.     BOOL (APIENTRY* pfnPrintDlg)(LPPRINTDLG);
  107.     BOOL (APIENTRY* pfnChooseFont)(LPCHOOSEFONT);
  108.     HWND (APIENTRY* pfnFindText)(LPFINDREPLACE);
  109.     BOOL (APIENTRY* pfnPageSetupDlg)(LPPAGESETUPDLG);
  110.     BOOL (APIENTRY* pfnGetOpenFileName)(LPOPENFILENAME);
  111. };
  112.  
  113. /////////////////////////////////////////////////////////////////////////////
  114. // AFX_ADVAPI_CALL - used to dynamically load ADVAPI.DLL
  115.  
  116. struct AFX_ADVAPI_CALL
  117. {
  118.     LONG (APIENTRY* pfnRegCreateKeyEx)(HKEY hKey, LPCTSTR lpSubKey,
  119.         DWORD Reserved, LPTSTR lpClass, DWORD dwOptions, REGSAM samDesired,
  120.         LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult,
  121.         LPDWORD lpdwDisposition);
  122.     LONG (APIENTRY* pfnRegEnumKey)(HKEY hKey, DWORD dwIndex, LPTSTR lpName,
  123.         DWORD cbName);
  124.     LONG (APIENTRY* pfnRegDeleteKey)(HKEY hKey, LPCTSTR lpSubKey);
  125.     LONG (APIENTRY* pfnRegDeleteValue)(HKEY hKey, LPCTSTR lpValueName);
  126.     LONG (APIENTRY* pfnRegOpenKeyEx)(HKEY hKey, LPCTSTR lpSubKey,
  127.         DWORD ulOptions, REGSAM samDesired, PHKEY phkResult);
  128.     LONG (APIENTRY* pfnRegCloseKey)(HKEY hKey);
  129.     LONG (APIENTRY* pfnRegSetValue)(HKEY hKey, LPCTSTR lpSubKey, DWORD dwType,
  130.         LPCTSTR lpData, DWORD cbData);
  131.     LONG (APIENTRY* pfnRegCreateKey)(HKEY hKey, LPCTSTR lpSubKey,
  132.         PHKEY phkResult);
  133.     LONG (APIENTRY* pfnRegSetValueEx)(HKEY hKey, LPCTSTR lpValueName,
  134.         DWORD Reserved, DWORD dwType, CONST BYTE* lpData, DWORD cbData);
  135.     LONG (APIENTRY* pfnRegQueryValue)(HKEY hKey, LPCTSTR lpSubKey,
  136.         LPTSTR lpValue, PLONG lpcbValue);
  137.     LONG (APIENTRY* pfnRegOpenKey)(HKEY hKey, LPCTSTR lpSubKey,
  138.         PHKEY phkResult);
  139.     LONG (APIENTRY* pfnRegQueryValueEx)(HKEY hKey, LPCTSTR lpValueName,
  140.         LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData);
  141. #ifndef _MAC
  142.     BOOL (APIENTRY* pfnSetFileSecurity)(LPCTSTR lpszFile, SECURITY_INFORMATION si,
  143.        PSECURITY_DESCRIPTOR psd);
  144.     BOOL (APIENTRY* pfnGetFileSecurity)(LPCTSTR lpFileName,
  145.         SECURITY_INFORMATION RequestedInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor,
  146.         DWORD nLength, LPDWORD lpnLengthNeeded);
  147. #endif
  148. };
  149.  
  150. extern AFX_DATA AFX_COMDLG_CALL _afxComDlg;
  151. extern AFX_DATA AFX_SHELL_CALL _afxShell;
  152. extern AFX_DATA AFX_WINSPOOL_CALL _afxWinSpool;
  153. extern AFX_DATA AFX_ADVAPI_CALL _afxAdvApi;
  154.  
  155. #endif //!_MAC
  156.  
  157. /////////////////////////////////////////////////////////////////////////////
  158. // macros for AFX_COMCTL_CALL access
  159.  
  160. #ifdef InitCommonControls
  161. #undef InitCommonControls
  162. #endif
  163. #define InitCommonControls _afxCommCtrl.pfnInitCommonControls
  164.  
  165. #ifdef LBItemFromPt
  166. #undef LBItemFromPt
  167. #endif
  168. #define LBItemFromPt _afxCommCtrl.pfnLBItemFromPt
  169.  
  170. #ifdef CreateMappedBitmap
  171. #undef CreateMappedBitmap
  172. #endif
  173. #define CreateMappedBitmap _afxCommCtrl.pfnCreateMappedBitmap
  174.  
  175. #ifdef MakeDragList
  176. #undef MakeDragList
  177. #endif
  178. #define MakeDragList _afxCommCtrl.pfnMakeDragList
  179.  
  180. #ifdef ImageList_SetOverlayImage
  181. #undef ImageList_SetOverlayImage
  182. #endif
  183. #define ImageList_SetOverlayImage _afxCommCtrl.pfnImageList_SetOverlayImage
  184.  
  185. #ifdef ImageList_GetBkColor
  186. #undef ImageList_GetBkColor
  187. #endif
  188. #define ImageList_GetBkColor    _afxCommCtrl.pfnImageList_GetBkColor
  189.  
  190. #ifdef ImageList_SetBkColor
  191. #undef ImageList_SetBkColor
  192. #endif
  193. #define ImageList_SetBkColor    _afxCommCtrl.pfnImageList_SetBkColor
  194.  
  195. #ifdef ImageList_GetImageInfo
  196. #undef ImageList_GetImageInfo
  197. #endif
  198. #define ImageList_GetImageInfo  _afxCommCtrl.pfnImageList_GetImageInfo
  199.  
  200. #ifdef ImageList_Draw
  201. #undef ImageList_Draw
  202. #endif
  203. #define ImageList_Draw  _afxCommCtrl.pfnImageList_Draw
  204.  
  205. #ifdef ImageList_GetIcon
  206. #undef ImageList_GetIcon
  207. #endif
  208. #define ImageList_GetIcon   _afxCommCtrl.pfnImageList_GetIcon
  209.  
  210. #ifdef ImageList_ReplaceIcon
  211. #undef ImageList_ReplaceIcon
  212. #endif
  213. #define ImageList_ReplaceIcon   _afxCommCtrl.pfnImageList_ReplaceIcon
  214.  
  215. #ifdef ImageList_Replace
  216. #undef ImageList_Replace
  217. #endif
  218. #define ImageList_Replace   _afxCommCtrl.pfnImageList_Replace
  219.  
  220. #ifdef ImageList_Remove
  221. #undef ImageList_Remove
  222. #endif
  223. #define ImageList_Remove    _afxCommCtrl.pfnImageList_Remove
  224.  
  225. #ifdef ImageList_AddMasked
  226. #undef ImageList_AddMasked
  227. #endif
  228. #define ImageList_AddMasked _afxCommCtrl.pfnImageList_AddMasked
  229.  
  230. #ifdef ImageList_EndDrag
  231. #undef ImageList_EndDrag
  232. #endif
  233. #define ImageList_EndDrag   _afxCommCtrl.pfnImageList_EndDrag
  234.  
  235. #ifdef ImageList_BeginDrag
  236. #undef ImageList_BeginDrag
  237. #endif
  238. #define ImageList_BeginDrag _afxCommCtrl.pfnImageList_BeginDrag
  239.  
  240. #ifdef ImageList_LoadImage
  241. #undef ImageList_LoadImage
  242. #endif
  243. #define ImageList_LoadImage _afxCommCtrl.pfnImageList_LoadImage
  244.  
  245. #ifndef _AFX_NO_OLE_SUPPORT
  246.  
  247. #ifdef ImageList_Write
  248. #undef ImageList_Write
  249. #endif
  250. #define ImageList_Write _afxCommCtrl.pfnImageList_Write
  251.  
  252. #ifdef ImageList_Read
  253. #undef ImageList_Read
  254. #endif
  255. #define ImageList_Read  _afxCommCtrl.pfnImageList_Read
  256.  
  257. #endif  // !_AFX_NO_OLE_SUPPORT
  258.  
  259. #ifdef ImageList_Merge
  260. #undef ImageList_Merge
  261. #endif
  262. #define ImageList_Merge _afxCommCtrl.pfnImageList_Merge
  263.  
  264. #ifdef ImageList_Create
  265. #undef ImageList_Create
  266. #endif
  267. #define ImageList_Create    _afxCommCtrl.pfnImageList_Create
  268.  
  269. #ifdef ImageList_Destroy
  270. #undef ImageList_Destroy
  271. #endif
  272. #define ImageList_Destroy   _afxCommCtrl.pfnImageList_Destroy
  273.  
  274. #ifdef ImageList_DragMove
  275. #undef ImageList_DragMove
  276. #endif
  277. #define ImageList_DragMove  _afxCommCtrl.pfnImageList_DragMove
  278.  
  279. #ifdef ImageList_SetDragCursorImage
  280. #undef ImageList_SetDragCursorImage
  281. #endif
  282. #define ImageList_SetDragCursorImage    _afxCommCtrl.pfnImageList_SetDragCursorImage
  283.  
  284. #ifdef ImageList_DragShowNolock
  285. #undef ImageList_DragShowNolock
  286. #endif
  287. #define ImageList_DragShowNolock    _afxCommCtrl.pfnImageList_DragShowNolock
  288.  
  289. #ifdef ImageList_GetDragImage
  290. #undef ImageList_GetDragImage
  291. #endif
  292. #define ImageList_GetDragImage  _afxCommCtrl.pfnImageList_GetDragImage
  293.  
  294. #ifdef ImageList_DragEnter
  295. #undef ImageList_DragEnter
  296. #endif
  297. #define ImageList_DragEnter _afxCommCtrl.pfnImageList_DragEnter
  298.  
  299. #ifdef ImageList_DragLeave
  300. #undef ImageList_DragLeave
  301. #endif
  302. #define ImageList_DragLeave _afxCommCtrl.pfnImageList_DragLeave
  303.  
  304. #ifdef ImageList_GetImageCount
  305. #undef ImageList_GetImageCount
  306. #endif
  307. #define ImageList_GetImageCount _afxCommCtrl.pfnImageList_GetImageCount
  308.  
  309. #ifdef ImageList_Add
  310. #undef ImageList_Add
  311. #endif
  312. #define ImageList_Add   _afxCommCtrl.pfnImageList_Add
  313.  
  314. #ifdef DestroyPropertySheetPage
  315. #undef DestroyPropertySheetPage
  316. #endif
  317. #define DestroyPropertySheetPage _afxCommCtrl.pfnDestroyPropertySheetPage
  318.  
  319. #ifdef PropertySheet
  320. #undef PropertySheet
  321. #endif
  322. #define PropertySheet _afxCommCtrl.pfnPropertySheet
  323.  
  324. #ifdef CreatePropertySheetPage
  325. #undef CreatePropertySheetPage
  326. #endif
  327. #define CreatePropertySheetPage _afxCommCtrl.pfnCreatePropertySheetPage
  328.  
  329. #ifndef _MAC
  330. /////////////////////////////////////////////////////////////////////////////
  331. // macros for AFX_COMDLG_CALL access
  332.  
  333. #ifdef ChooseColor
  334. #undef ChooseColor
  335. #endif
  336. #define ChooseColor _afxComDlg.pfnChooseColor
  337.  
  338. #ifdef CommDlgExtendedError
  339. #undef CommDlgExtendedError
  340. #endif
  341. #define CommDlgExtendedError _afxComDlg.pfnCommDlgExtendedError
  342.  
  343. #ifdef ReplaceText
  344. #undef ReplaceText
  345. #endif
  346. #define ReplaceText _afxComDlg.pfnReplaceText
  347.  
  348. #ifdef GetSaveFileName
  349. #undef GetSaveFileName
  350. #endif
  351. #define GetSaveFileName _afxComDlg.pfnGetSaveFileName
  352.  
  353. //#define GetFileTitle _afxComDlg.pfnGetFileTitle
  354.  
  355. #ifdef PrintDlg
  356. #undef PrintDlg
  357. #endif
  358. #define PrintDlg _afxComDlg.pfnPrintDlg
  359.  
  360. #ifdef ChooseFont
  361. #undef ChooseFont
  362. #endif
  363. #define ChooseFont _afxComDlg.pfnChooseFont
  364.  
  365. //#define FindText _afxComDlg.pfnFindText
  366. inline HWND APIENTRY FindText(LPFINDREPLACE lp)
  367. {
  368.     return _afxComDlg.pfnFindText(lp);
  369. }
  370.  
  371. #ifdef PageSetupDlg
  372. #undef PageSetupDlg
  373. #endif
  374. #define PageSetupDlg _afxComDlg.pfnPageSetupDlg
  375.  
  376. #ifdef GetOpenFileName
  377. #undef GetOpenFileName
  378. #endif
  379. #define GetOpenFileName _afxComDlg.pfnGetOpenFileName
  380.  
  381.  
  382. /////////////////////////////////////////////////////////////////////////////
  383. // macros for AFX_SHELL_CALL access
  384.  
  385. #ifdef SHGetFileInfo
  386. #undef SHGetFileInfo
  387. #endif
  388. #define SHGetFileInfo _afxShell.pfnSHGetFileInfo
  389.  
  390. //#define ExtractIcon _afxShell.pfnExtractIcon
  391.  
  392. #ifdef DragQueryFile
  393. #undef DragQueryFile
  394. #endif
  395. #define DragQueryFile _afxShell.pfnDragQueryFile
  396.  
  397. //#define DragAcceptFiles _afxShell.pfnDragAcceptFiles
  398.  
  399. #ifdef DragFinish
  400. #undef DragFinish
  401. #endif
  402. #define DragFinish _afxShell.pfnDragFinish
  403.  
  404. /////////////////////////////////////////////////////////////////////////////
  405. // macros for AFX_WINSPOOL_CALL access
  406.  
  407. #ifdef DocumentProperties
  408. #undef DocumentProperties
  409. #endif
  410. #define DocumentProperties _afxWinSpool.pfnDocumentProperties
  411.  
  412. #ifdef OpenPrinter
  413. #undef OpenPrinter
  414. #endif
  415. #define OpenPrinter _afxWinSpool.pfnOpenPrinter
  416.  
  417. #ifdef ClosePrinter
  418. #undef ClosePrinter
  419. #endif
  420. #define ClosePrinter _afxWinSpool.pfnClosePrinter
  421.  
  422. /////////////////////////////////////////////////////////////////////////////
  423. // macros for AFX_ADVAPI_CALL access
  424.  
  425. #ifdef RegCreateKeyEx
  426. #undef RegCreateKeyEx
  427. #endif
  428. #define RegCreateKeyEx _afxAdvApi.pfnRegCreateKeyEx
  429.  
  430. #ifdef RegEnumKey
  431. #undef RegEnumKey
  432. #endif
  433. #define RegEnumKey _afxAdvApi.pfnRegEnumKey
  434.  
  435. #ifdef RegDeleteKey
  436. #undef RegDeleteKey
  437. #endif
  438. #define RegDeleteKey _afxAdvApi.pfnRegDeleteKey
  439.  
  440. #ifdef RegDeleteValue
  441. #undef RegDeleteValue
  442. #endif
  443. #define RegDeleteValue _afxAdvApi.pfnRegDeleteValue
  444.  
  445. #ifdef RegOpenKeyEx
  446. #undef RegOpenKeyEx
  447. #endif
  448. #define RegOpenKeyEx _afxAdvApi.pfnRegOpenKeyEx
  449.  
  450. #ifdef RegCloseKey
  451. #undef RegCloseKey
  452. #endif
  453. #define RegCloseKey _afxAdvApi.pfnRegCloseKey
  454.  
  455. #ifdef RegSetValue
  456. #undef RegSetValue
  457. #endif
  458. #define RegSetValue _afxAdvApi.pfnRegSetValue
  459.  
  460. #ifdef RegCreateKey
  461. #undef RegCreateKey
  462. #endif
  463. #define RegCreateKey _afxAdvApi.pfnRegCreateKey
  464.  
  465. #ifdef RegSetValueEx
  466. #undef RegSetValueEx
  467. #endif
  468. #define RegSetValueEx _afxAdvApi.pfnRegSetValueEx
  469.  
  470. #ifdef RegQueryValue
  471. #undef RegQueryValue
  472. #endif
  473. #define RegQueryValue _afxAdvApi.pfnRegQueryValue
  474.  
  475. #ifdef RegOpenKey
  476. #undef RegOpenKey
  477. #endif
  478. #define RegOpenKey _afxAdvApi.pfnRegOpenKey
  479.  
  480. #ifdef RegQueryValueEx
  481. #undef RegQueryValueEx
  482. #endif
  483. #define RegQueryValueEx _afxAdvApi.pfnRegQueryValueEx
  484.  
  485. #ifdef SetFileSecurity
  486. #undef SetFileSecurity
  487. #endif
  488. #define SetFileSecurity _afxAdvApi.pfnSetFileSecurity
  489.  
  490. #ifdef GetFileSecurity
  491. #undef GetFileSecurity
  492. #endif
  493. #define GetFileSecurity _afxAdvApi.pfnGetFileSecurity
  494.  
  495. #define AfxDllExtractIcon _afxShell.pfnExtractIcon
  496. #define AfxDllDragAcceptFiles _afxShell.pfnDragAcceptFiles
  497. #define AfxDllGetFileTitle _afxComDlg.pfnGetFileTitle
  498.  
  499. #else // !_MAC
  500.  
  501. #define AfxDllExtractIcon ::ExtractIcon
  502. #define AfxDllDragAcceptFiles ::DragAcceptFiles
  503. #define AfxDllGetFileTitle ::GetFileTitle
  504.  
  505. #endif // !_MAC
  506.  
  507. /////////////////////////////////////////////////////////////////////////////
  508. // _AFX_EXTDLL_STATE
  509.  
  510. #undef AFX_DATA
  511. #define AFX_DATA
  512.  
  513. class _AFX_EXTDLL_STATE : public CNoTrackObject
  514. {
  515. public:
  516.     _AFX_EXTDLL_STATE::~_AFX_EXTDLL_STATE();
  517.  
  518.     // Note: only necessary to initialize non-zero data
  519. #ifdef _AFXDLL
  520.     HINSTANCE m_hInstCommCtrl;
  521. #ifndef _MAC
  522.     HINSTANCE m_hInstComDlg;
  523.     HINSTANCE m_hInstShell;
  524.     HINSTANCE m_hInstWinSpool;
  525.     HINSTANCE m_hInstAdvApi;
  526.     HINSTANCE m_hInstInternet;
  527. #endif
  528. #endif
  529. };
  530.  
  531. EXTERN_PROCESS_LOCAL(_AFX_EXTDLL_STATE, _afxExtDllState)
  532.  
  533. ///////////////////////////////////////////////////////////////////////////////
  534.  
  535. #else // _AFXDLL
  536.  
  537. #define AfxDllExtractIcon ::ExtractIcon
  538. #define AfxDllDragAcceptFiles ::DragAcceptFiles
  539. #define AfxDllGetFileTitle ::GetFileTitle
  540.  
  541. #endif // _AFXDLL
  542.