]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/winundef.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: undefine the common symbols #define'd by <windows.h>
4 // Author: Vadim Zeitlin
8 // Copyright: (c) wxWindows team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_WINUNDEF_H_
13 #define _WX_WINUNDEF_H_
15 // windows.h #defines the following identifiers which are also used in wxWin
24 inline BOOL
GetCharWidth(HDC dc
, UINT first
, UINT last
, LPINT buffer
)
27 return GetCharWidthW(dc
, first
, last
, buffer
);
29 return GetCharWidthA(dc
, first
, last
, buffer
);
42 inline HWND
FindWindow(LPCWSTR classname
, LPCWSTR windowname
)
44 return FindWindowW(classname
, windowname
);
47 inline HWND
FindWindow(LPCSTR classname
, LPCSTR windowname
)
49 return FindWindowA(classname
, windowname
);
62 inline int GetClassName(HWND h
, LPWSTR classname
, int maxcount
)
64 return GetClassNameW(h
, classname
, maxcount
);
67 inline int GetClassName(HWND h
, LPSTR classname
, int maxcount
)
69 return GetClassNameA(h
, classname
, maxcount
);
82 inline BOOL
GetClassInfo(HINSTANCE h
, LPCWSTR name
, LPWNDCLASSW winclass
)
84 return GetClassInfoW(h
, name
, winclass
);
87 inline BOOL
GetClassInfo(HINSTANCE h
, LPCSTR name
, LPWNDCLASSA winclass
)
89 return GetClassInfoA(h
, name
, winclass
);
96 #ifdef LoadAccelerators
97 #undef LoadAccelerators
102 inline HACCEL
LoadAccelerators(HINSTANCE h
, LPCWSTR name
)
104 return LoadAcceleratorsW(h
, name
);
107 inline HACCEL
LoadAccelerators(HINSTANCE h
, LPCSTR name
)
109 return LoadAcceleratorsA(h
, name
);
114 // GetWindowProc... this isn't a Windows API function?!?!
115 //ifdef GetWindowProc
116 // #undef GetWindowProc
128 inline int DrawText(HDC h
, LPCWSTR str
, int count
, LPRECT rect
, UINT format
)
130 return DrawTextW(h
, str
, count
, rect
, format
);
133 inline int DrawText(HDC h
, LPCSTR str
, int count
, LPRECT rect
, UINT format
)
135 return DrawTextA(h
, str
, count
, rect
, format
);
148 inline int StartDoc(HDC h
, CONST DOCINFOW
* info
)
150 return StartDocW(h
, info
);
153 inline int StartDoc(HDC h
, CONST DOCINFOA
* info
)
155 return StartDocA(h
, info
);
160 // GetFirstChild... not a Windows API Function!?!?!
161 //ifdef GetFirstChild
162 // #undef GetFirstChild
166 // #undef GetNextChild
169 //ifdef GetNextSibling
170 // #undef GetNextSibling
180 inline int GetObject(HGDIOBJ h
, int i
, LPVOID buffer
)
183 return GetObjectW(h
, i
, buffer
);
185 return GetObjectA(h
, i
, buffer
);
190 #endif // _WX_WINUNDEF_H_