]>
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
23 inline BOOL
GetCharWidth(HDC dc
, UINT first
, UINT last
, LPINT buffer
)
26 return GetCharWidthW(dc
, first
, last
, buffer
);
28 return GetCharWidthA(dc
, first
, last
, buffer
);
39 inline HWND
FindWindow(LPCWSTR classname
, LPCWSTR windowname
)
41 return FindWindowW(classname
, windowname
);
44 inline HWND
FindWindow(LPCSTR classname
, LPCSTR windowname
)
46 return FindWindowA(classname
, windowname
);
57 inline int GetClassName(HWND h
, LPWSTR classname
, int maxcount
)
59 return GetClassNameW(h
, classname
, maxcount
);
62 inline int GetClassName(HWND h
, LPSTR classname
, int maxcount
)
64 return GetClassNameA(h
, classname
, maxcount
);
75 inline BOOL
GetClassInfo(HINSTANCE h
, LPCWSTR name
, LPWNDCLASSW winclass
)
77 return GetClassInfoW(h
, name
, winclass
);
80 inline BOOL
GetClassInfo(HINSTANCE h
, LPCSTR name
, LPWNDCLASSA winclass
)
82 return GetClassInfoA(h
, name
, winclass
);
88 #ifdef LoadAccelerators
89 #undef LoadAccelerators
93 inline HACCEL
LoadAccelerators(HINSTANCE h
, LPCWSTR name
)
95 return LoadAcceleratorsW(h
, name
);
98 inline HACCEL
LoadAccelerators(HINSTANCE h
, LPCSTR name
)
100 return LoadAcceleratorsA(h
, name
);
105 // GetWindowProc... this isn't a Windows API function?!?!
106 //ifdef GetWindowProc
107 // #undef GetWindowProc
118 inline int DrawText(HDC h
, LPCWSTR str
, int count
, LPRECT rect
, UINT format
)
120 return DrawTextW(h
, str
, count
, rect
, format
);
123 inline int DrawText(HDC h
, LPCSTR str
, int count
, LPRECT rect
, UINT format
)
125 return DrawTextA(h
, str
, count
, rect
, format
);
136 inline int StartDoc(HDC h
, CONST DOCINFOW
* info
)
138 return StartDocW(h
, info
);
141 inline int StartDoc(HDC h
, CONST DOCINFOA
* info
)
143 return StartDocA(h
, info
);
147 // GetFirstChild... not a Windows API Function!?!?!
148 //ifdef GetFirstChild
149 // #undef GetFirstChild
153 // #undef GetNextChild
156 //ifdef GetNextSibling
157 // #undef GetNextSibling
166 inline int GetObject(HGDIOBJ h
, int i
, LPVOID buffer
)
169 return GetObjectW(h
, i
, buffer
);
171 return GetObjectA(h
, i
, buffer
);
175 #endif // _WX_WINUNDEF_H_