]>
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
21 inline BOOL
GetCharWidth(HDC dc
, UINT first
, UINT last
, LPINT buffer
)
24 return GetCharWidthW(dc
, first
, last
, buffer
);
26 return GetCharWidthA(dc
, first
, last
, buffer
);
36 inline HWND
FindWindow(LPCWSTR classname
, LPCWSTR windowname
)
38 return FindWindowW(classname
, windowname
);
41 inline HWND
FindWindow(LPCSTR classname
, LPCSTR windowname
)
43 return FindWindowA(classname
, windowname
);
53 inline int GetClassName(HWND h
, LPWSTR classname
, int maxcount
)
55 return GetClassNameW(h
, classname
, maxcount
);
58 inline int GetClassName(HWND h
, LPSTR classname
, int maxcount
)
60 return GetClassNameA(h
, classname
, maxcount
);
70 inline BOOL
GetClassInfo(HINSTANCE h
, LPCWSTR name
, LPWNDCLASSW winclass
)
72 return GetClassInfoW(h
, name
, winclass
);
75 inline BOOL
GetClassInfo(HINSTANCE h
, LPCSTR name
, LPWNDCLASSA winclass
)
77 return GetClassInfoA(h
, name
, winclass
);
84 #ifdef LoadAccelerators
85 #undef LoadAccelerators
87 inline HACCEL
LoadAccelerators(HINSTANCE h
, LPCWSTR name
)
89 return LoadAcceleratorsW(h
, name
);
92 inline HACCEL
LoadAccelerators(HINSTANCE h
, LPCSTR name
)
94 return LoadAcceleratorsA(h
, name
);
104 inline int DrawText(HDC h
, LPCWSTR str
, int count
, LPRECT rect
, UINT format
)
106 return DrawTextW(h
, str
, count
, rect
, format
);
109 inline int DrawText(HDC h
, LPCSTR str
, int count
, LPRECT rect
, UINT format
)
111 return DrawTextA(h
, str
, count
, rect
, format
);
121 inline int StartDoc(HDC h
, CONST DOCINFOW
* info
)
123 return StartDocW(h
, info
);
126 inline int StartDoc(HDC h
, CONST DOCINFOA
* info
)
128 return StartDocA(h
, info
);
137 inline int GetObject(HGDIOBJ h
, int i
, LPVOID buffer
)
140 return GetObjectW(h
, i
, buffer
);
142 return GetObjectA(h
, i
, buffer
);
148 // For ming and cygwin
153 inline HWND
GetFirstChild(HWND h
)
155 return GetTopWindow(h
);
161 #ifdef GetNextSibling
162 #undef GetNextSibling
163 inline HWND
GetNextSibling(HWND h
)
165 return GetWindow(h
, GW_HWNDNEXT
);
170 //ifdef GetWindowProc
171 // #undef GetWindowProc
174 // #undef GetNextChild
177 #endif // _WX_WINUNDEF_H_