]>
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 #define DOCINFOW DOCINFO
122 #define DOCINFOA DOCINFO
125 inline int StartDoc(HDC h
, CONST DOCINFOW
* info
)
127 return StartDocW(h
, info
);
130 inline int StartDoc(HDC h
, CONST DOCINFOA
* info
)
132 return StartDocA(h
, info
);
141 inline int GetObject(HGDIOBJ h
, int i
, LPVOID buffer
)
144 return GetObjectW(h
, i
, buffer
);
146 return GetObjectA(h
, i
, buffer
);
152 // For ming and cygwin
157 inline HWND
GetFirstChild(HWND h
)
159 return GetTopWindow(h
);
165 #ifdef GetNextSibling
166 #undef GetNextSibling
167 inline HWND
GetNextSibling(HWND h
)
169 return GetWindow(h
, GW_HWNDNEXT
);
174 //ifdef GetWindowProc
175 // #undef GetWindowProc
178 // #undef GetNextChild
181 #endif // _WX_WINUNDEF_H_