The information in this article applies to:
SYMPTOMSWhen using a function or a symbol dependent upon the Macintosh Operating System headers, the following error message may appear:
CAUSEThe native Macintosh header, MACOS\WINDOWS.H (or others), was not included before the Winwlm.h file. RESOLUTIONInclude the required header (macos/windows.h for GetWrapperWindow) before including Winwlm.h for MFC applications. Winwlm.h is included in the Afxwin.h file. For example:
STATUSThis behavior is by design. MORE INFORMATION
When targeting applications for the Macintosh platform, the Winwlm.h header
file is pulled in the default WLM libraries and declares many symbols
needed to use Macintosh specific objects from a Windows application. For
example, GetWrapperWindow returns the Macintosh window data structure
WindowRef underlying the given the Windows HWND.
However, the Winwlm.h file excludes many symbols if certain native
Macintosh header files are not previously included. For example,
GetWrapperWindow is defined if MACOS\Windows.h is included beforehand. This
behavior occurs because GetWrapperWindow, along with other symbols, is in a
section dependent upon __WINDOWS__ being defined. MACOS\Windows.h defines
__WINDOWS__ .
Below is a list of some of the more commonly-used symbols and the required header file. The header file must be included before Winwlm.h or Afxwin.h and surrounded by the inclusion Macname1.h and Macname2.h. For example:
If these header files are not included, the following error messages are
generated:
If the following errors occur after including these headers it is because the Afxcmn.h header file was included later. The Afxcmn.h header file contains GetItem and SetItem member functions of several MFC classes that conflict with the ones defined in MACOS\Menus.h. For example:
The workaround is to define OLDROUTINENAMES as 0. Below is an example
of a typical MFC project's Stdafx.h file. This project uses the common
controls. For example:
REFERENCES
Books Online
Additional query words:
Keywords : kberrmsg kbMAC kbMFC kbVC |
Last Reviewed: January 20, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |